]> err.no Git - util-linux/commitdiff
mount: add -s and -f and note to man page for external mount helpers
authorKarel Zak <kzak@redhat.com>
Thu, 22 Mar 2007 11:51:47 +0000 (12:51 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 22 Mar 2007 11:51:47 +0000 (12:51 +0100)
The mount -s (for nfs only) and -f options must be exported to
external /sbin/mount.<type> helpers.

Signed-off-by: Karel Zak <kzak@redhat.com>
mount/mount.8
mount/mount.c

index 21d9245a39b08257c0214c395c87fd08c07cadb4..2cfaae243b8185fe01fa715672658e68913f496e 100644 (file)
@@ -1900,6 +1900,16 @@ mount failure
 .BR 64
 some mount succeeded
 
+.SH NOTES
+The syntax of external mount helpers is:
+
+.br
+.BI "/sbin/mount.<suffix> spec dir [\-sfnv] [\-o options]
+.br
+
+where the <suffix> is filesystem type and \-sfnvo options have same meaning like
+standard mount options.
+
 .SH FILES
 .TP 18n
 .I /etc/fstab
index 28e75ce6fcbb350a8c7aa3c57e5bd6117fc965a3..6c9aec077896e912724832d323b1dce649c1eba5 100644 (file)
@@ -499,18 +499,22 @@ check_special_mountprog(const char *spec, const char *node, const char *type, in
                 setuid(getuid());
                 setgid(getgid());
                 oo = fix_opts_string (flags, extra_opts, NULL);
-                mountargs[i++] = mountprog;
-                mountargs[i++] = spec;
-                mountargs[i++] = node;
+                mountargs[i++] = mountprog;                            /* 1 */
+                mountargs[i++] = spec;                                 /* 2 */
+                mountargs[i++] = node;                                 /* 3 */
+                if (sloppy && strncmp(type, "nfs", 3) == 0)
+                     mountargs[i++] = "-s";                            /* 4 */
+                if (fake)
+                     mountargs[i++] = "-f";                            /* 5 */
                 if (nomtab)
-                     mountargs[i++] = "-n";
+                     mountargs[i++] = "-n";                            /* 6 */
                 if (verbose)
-                     mountargs[i++] = "-v";
+                     mountargs[i++] = "-v";                            /* 7 */
                 if (oo && *oo) {
-                     mountargs[i++] = "-o";
-                     mountargs[i++] = oo;
+                     mountargs[i++] = "-o";                            /* 8 */
+                     mountargs[i++] = oo;                              /* 9 */
                 }
-                mountargs[i] = NULL;
+                mountargs[i] = NULL;                                   /* 10 */
 
                 i = 0;
                 while(mount_debug && mountargs[i]) {