From: Karel Zak Date: Thu, 21 Aug 2014 12:58:40 +0000 (+0200) Subject: libmount: use -t for type.subtype in helpers API X-Git-Tag: v2.26-rc1~495 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4ea53de0b6bc31303fdfc9ebb546bce4527c5d6;p=thirdparty%2Futil-linux.git libmount: use -t for type.subtype in helpers API References: https://github.com/karelzak/util-linux/issues/116 Signed-off-by: Karel Zak --- diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c index 015171e3c0..71a4e85f9b 100644 --- a/libmount/src/context_mount.c +++ b/libmount/src/context_mount.c @@ -580,7 +580,9 @@ static int exec_helper(struct libmnt_context *cxt) args[i++] = "-o"; /* 8 */ args[i++] = o; /* 9 */ } - if (type && !endswith(cxt->helper, type)) { + if (type + && strchr(type, '.') + && !endswith(cxt->helper, type)) { args[i++] = "-t"; /* 10 */ args[i++] = type; /* 11 */ } diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c index 220f28bc6d..73e8214c8a 100644 --- a/libmount/src/context_umount.c +++ b/libmount/src/context_umount.c @@ -559,9 +559,11 @@ static int exec_helper(struct libmnt_context *cxt) args[i++] = "-v"; /* 6 */ if (mnt_context_is_rdonly_umount(cxt)) args[i++] = "-r"; /* 7 */ - if (type && !endswith(cxt->helper, type)) { + if (type + && strchr(type, '.') + && !endswith(cxt->helper, type)) { args[i++] = "-t"; /* 8 */ - args[i++] = (char *) type; /* 9 */ + args[i++] = (char *) type; /* 9 */ } args[i] = NULL; /* 10 */