From 290c0d22623d332dcf4d9217dd5423bb637ff9a2 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Fri, 6 Feb 2004 22:11:48 +0000 Subject: [PATCH] Allows option to be specified on the command line when mount with -a. Patch submitted by Chis Pressey , backported from FreeBSD. --- sbin/mount/mount.8 | 3 ++- sbin/mount/mount.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8 index 5564be03b4..f56fdf1f75 100644 --- a/sbin/mount/mount.8 +++ b/sbin/mount/mount.8 @@ -31,7 +31,7 @@ .\" .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD: src/sbin/mount/mount.8,v 1.31.2.12 2003/02/23 21:17:42 trhodes Exp $ -.\" $DragonFly: src/sbin/mount/mount.8,v 1.2 2003/06/17 04:27:33 dillon Exp $ +.\" $DragonFly: src/sbin/mount/mount.8,v 1.3 2004/02/06 22:11:48 joerg Exp $ .\" .Dd June 16, 1994 .Dt MOUNT 8 @@ -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 diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index b6383a8e35..01608e4516 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -33,7 +33,7 @@ * @(#) Copyright (c) 1980, 1989, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)mount.c 8.25 (Berkeley) 5/8/95 * $FreeBSD: src/sbin/mount/mount.c,v 1.39.2.3 2001/08/01 08:26:23 obrien Exp $ - * $DragonFly: src/sbin/mount/mount.c,v 1.5 2003/11/03 19:51:05 eirikn Exp $ + * $DragonFly: src/sbin/mount/mount.c,v 1.6 2004/02/06 22:11:48 joerg Exp $ */ #include @@ -192,6 +192,8 @@ main(int argc, char **argv) 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 @@ usage(void) (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); } -- 2.41.0