summaryrefslogtreecommitdiffstats
path: root/libmount/src/context_mount.c
diff options
context:
space:
mode:
authorKarel Zak2012-11-26 11:21:40 +0100
committerKarel Zak2012-11-26 11:21:40 +0100
commitec8121b103bafec90bc1d2fef524f94d408caab3 (patch)
treea0993bfb03c8ebdd7111fdf46c269c0b5ae10e71 /libmount/src/context_mount.c
parentlscpu: remove unnecessary variable (diff)
downloadkernel-qcow2-util-linux-ec8121b103bafec90bc1d2fef524f94d408caab3.tar.gz
kernel-qcow2-util-linux-ec8121b103bafec90bc1d2fef524f94d408caab3.tar.xz
kernel-qcow2-util-linux-ec8121b103bafec90bc1d2fef524f94d408caab3.zip
libmount: correctly interpret '*' from /etc/filesystems
- single line with '*' in /etc/filesystems means that libmount has to read /proc/filesystems, otherwise /proc/filesystems has to be ignored - mount(2) ENODEV is no reason to break the do_mount_by_pattern() loop when trying to mount by /{etc,proc}/filesystems Reported-by: NeilBrown <neilb@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_mount.c')
-rw-r--r--libmount/src/context_mount.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
index 1e21db7c6..196e3a249 100644
--- a/libmount/src/context_mount.c
+++ b/libmount/src/context_mount.c
@@ -590,7 +590,8 @@ static int do_mount_by_pattern(struct libmnt_context *cxt, const char *pattern)
rc = do_mount(cxt, *fp);
if (mnt_context_get_status(cxt))
break;
- if (mnt_context_get_syscall_errno(cxt) != EINVAL)
+ if (mnt_context_get_syscall_errno(cxt) != EINVAL &&
+ mnt_context_get_syscall_errno(cxt) != ENODEV)
break;
}
mnt_free_filesystems(filesystems);