summaryrefslogtreecommitdiffstats
path: root/mount
diff options
context:
space:
mode:
authorKarel Zak2007-03-22 12:51:47 +0100
committerKarel Zak2007-03-22 12:51:47 +0100
commit460e061dd93e9f4df45ee50f0ddd3cc2d38a8255 (patch)
treea809d08cbd79fff5b806c96b459c8194e53d8bcd /mount
parentmount: call /sbin/mount.<type> also when mounting without "-t" (diff)
downloadkernel-qcow2-util-linux-460e061dd93e9f4df45ee50f0ddd3cc2d38a8255.tar.gz
kernel-qcow2-util-linux-460e061dd93e9f4df45ee50f0ddd3cc2d38a8255.tar.xz
kernel-qcow2-util-linux-460e061dd93e9f4df45ee50f0ddd3cc2d38a8255.zip
mount: add -s and -f and note to man page for external mount helpers
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>
Diffstat (limited to 'mount')
-rw-r--r--mount/mount.810
-rw-r--r--mount/mount.c20
2 files changed, 22 insertions, 8 deletions
diff --git a/mount/mount.8 b/mount/mount.8
index 21d9245a3..2cfaae243 100644
--- a/mount/mount.8
+++ b/mount/mount.8
@@ -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
diff --git a/mount/mount.c b/mount/mount.c
index 28e75ce6f..6c9aec077 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -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]) {