diff options
author | Gleb Fotengauer-Malinovskiy | 2012-09-27 18:48:34 +0200 |
---|---|---|
committer | Karel Zak | 2012-11-16 10:31:49 +0100 |
commit | bbf9ce79eca50e2c9464a4f81571dc2616a5a59b (patch) | |
tree | 945920e644c908200ae21aa1ff1b9a1c53cd0e7f /libmount/src/context_mount.c | |
parent | umount: (recursive) don't call umount(2) for already unmounted targets (diff) | |
download | kernel-qcow2-util-linux-bbf9ce79eca50e2c9464a4f81571dc2616a5a59b.tar.gz kernel-qcow2-util-linux-bbf9ce79eca50e2c9464a4f81571dc2616a5a59b.tar.xz kernel-qcow2-util-linux-bbf9ce79eca50e2c9464a4f81571dc2616a5a59b.zip |
libmount: fix support of comma-separated fs types lists
# grep cdrom /etc/fstab
/dev/sr0 /media/cdrom udf,iso9660 ro,noauto,user,utf8 0 0
# mount /media/cdrom
mount: unknown filesystem type 'udf,iso9660'
# mount -t udf,iso9660 /dev/sr0 /media/cdrom
mount: /dev/sr0 is write-protected, mounting read-only
[kzak@redhat.com: - add some comments
- don't try to found external helpers for the types]
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_mount.c')
-rw-r--r-- | libmount/src/context_mount.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c index 6dc8e6486..1e21db7c6 100644 --- a/libmount/src/context_mount.c +++ b/libmount/src/context_mount.c @@ -690,9 +690,13 @@ int mnt_context_do_mount(struct libmnt_context *cxt) cxt->mountdata = (char *) mnt_fs_get_fs_options(cxt->fs); type = mnt_fs_get_fstype(cxt->fs); - if (type) - res = do_mount(cxt, NULL); - else + if (type) { + if (strchr(type, ',')) + /* this only happen if fstab countains list of filesystems */ + res = do_mount_by_pattern(cxt, type); + else + res = do_mount(cxt, NULL); + } else res = do_mount_by_pattern(cxt, cxt->fstype_pattern); if (mnt_context_get_status(cxt) |