Date: Thu, 26 Apr 2001 18:40:03 -0700 (PDT) From: Dima Dorfman <dima@unixfreak.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/26886: mount -w doesn't work on a normally read-only filesystem Message-ID: <200104270140.f3R1e3a57145@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/26886; it has been noted by GNATS. From: Dima Dorfman <dima@unixfreak.org> To: archie@packetdesign.com Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/26886: mount -w doesn't work on a normally read-only filesystem Date: Thu, 26 Apr 2001 18:35:57 -0700 Archie Cobbs <archie@packetdesign.com> writes: > > >Number: 26886 > >Category: bin > >Synopsis: mount -w doesn't work on a normally read-only filesystem > >Description: > > The "-w" flag to mount(8) doesn't work if the filesystem > is marked with the "ro" option in /etc/fstab. > > It seems like "-w" should override /etc/fstab. Could you please try the attached patch? (There may be a little fuzz; I've some local modifications that I had to coerce out of the diff manually.) Thanks, Dima Dorfman dima@unixfreak.org Index: mount.c =================================================================== RCS file: /st/src/FreeBSD/src/sbin/mount/mount.c,v retrieving revision 1.41 diff -u -r1.41 mount.c --- mount.c 2000/11/22 17:54:56 1.41 +++ mount.c 2001/04/27 01:34:17 @@ -410,6 +412,9 @@ optbuf = catopt(optbuf, "force"); if (flags & MNT_RDONLY) optbuf = catopt(optbuf, "ro"); + else + remopt(optbuf, "ro"); + /* * XXX * The mount_mfs (newfs) command uses -o to select the To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104270140.f3R1e3a57145>