From owner-freebsd-bugs Thu Apr 26 18:40: 9 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3034037B424 for ; Thu, 26 Apr 2001 18:40:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f3R1e3a57145; Thu, 26 Apr 2001 18:40:03 -0700 (PDT) (envelope-from gnats) Date: Thu, 26 Apr 2001 18:40:03 -0700 (PDT) Message-Id: <200104270140.f3R1e3a57145@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Dima Dorfman Subject: Re: bin/26886: mount -w doesn't work on a normally read-only filesystem Reply-To: Dima Dorfman Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/26886; it has been noted by GNATS. From: Dima Dorfman 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 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