summaryrefslogtreecommitdiffstats
path: root/sys-utils/mount.c
diff options
context:
space:
mode:
authorKarel Zak2012-02-28 00:02:30 +0100
committerKarel Zak2012-02-28 00:02:30 +0100
commit772cce373f693096c2ae6f156306acf9e20c09e8 (patch)
tree10717529b89a18bcafa4f9b6ea64ad21a7d11393 /sys-utils/mount.c
parentlibmount: use mount.<type> -s for NFS only (diff)
downloadkernel-qcow2-util-linux-772cce373f693096c2ae6f156306acf9e20c09e8.tar.gz
kernel-qcow2-util-linux-772cce373f693096c2ae6f156306acf9e20c09e8.tar.xz
kernel-qcow2-util-linux-772cce373f693096c2ae6f156306acf9e20c09e8.zip
libmount: allow empty source for mount(2) syscall
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=797438 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/mount.c')
-rw-r--r--sys-utils/mount.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index 3fbac04a1..23abc9173 100644
--- a/sys-utils/mount.c
+++ b/sys-utils/mount.c
@@ -347,7 +347,11 @@ try_readonly:
return MOUNT_EX_USAGE;
}
- if (src == NULL || tgt == NULL) {
+ /*
+ * TODO: add mnt_context_fstab_applied() to check if we found
+ * target/source in the file.
+ */
+ if (!tgt) {
if (mflags & MS_REMOUNT)
warnx(_("%s not mounted"), src ? src : tgt);
else