]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: use -t for type.subtype in helpers API
authorKarel Zak <kzak@redhat.com>
Thu, 21 Aug 2014 12:58:40 +0000 (14:58 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 21 Aug 2014 12:58:40 +0000 (14:58 +0200)
References: https://github.com/karelzak/util-linux/issues/116
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context_mount.c
libmount/src/context_umount.c

index 015171e3c09183dd2d091e993e3a9fb4a3a527c0..71a4e85f9bd58b35d42b7541d2cb56e838c2c22a 100644 (file)
@@ -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 */
                }
index 220f28bc6d291ee05915681ee4eb8ebf317ebfa9..73e8214c8a721aaa547393d3364871296c40c2c6 100644 (file)
@@ -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 */