DragonFly submit List (threaded) for 2004-02
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
patch to mount(8): allow specifying options during 'mount -a'
Hi,
This patch allows options to be specified on the command line when
mounting all filesystems. e.g. mount -a -o sync,nodev
Seems like a good idea from the orthogonality/POLA viewpoint at least.
Thought it would probably be wise to get it in before making other
changes to mount.c.
Backported from The FreeBSD Project. Lightly tested.
-Chris
Index: mount.8
===================================================================
RCS file: /home/dcvs/src/sbin/mount/mount.8,v
retrieving revision 1.2
diff -u -r1.2 mount.8
--- mount.8 17 Jun 2003 04:27:33 -0000 1.2
+++ mount.8 1 Feb 2004 11:43:12 -0000
@@ -42,6 +42,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl adfpruvw
+.Op Fl o Ar options
.Op Fl t Ar ufs | external_type
.Nm
.Op Fl dfpruvw
Index: mount.c
===================================================================
RCS file: /home/dcvs/src/sbin/mount/mount.c,v
retrieving revision 1.5
diff -u -r1.5 mount.c
--- mount.c 3 Nov 2003 19:51:05 -0000 1.5
+++ mount.c 1 Feb 2004 11:41:27 -0000
@@ -192,6 +192,8 @@
if (!(init_flags & MNT_UPDATE) &&
ismounted(fs, mntbuf, mntsize))
continue;
+ options = update_options(options,
+ fs->fs_mntops, mntbuf->f_flags);
if (mountfs(fs->fs_vfstype, fs->fs_spec,
fs->fs_file, init_flags, options,
fs->fs_mntops))
@@ -661,7 +663,7 @@
(void)fprintf(stderr, "%s\n%s\n%s\n",
"usage: mount [-dfpruvw] [-o options] [-t ufs | external_type] special node",
-" mount [-adfpruvw] [-t ufs | external_type]",
+" mount [-adfpruvw] [-o options] [-t ufs | external_type]",
" mount [-dfpruvw] special | node");
exit(1);
}
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]