| Summary: | mount -w doesn't work on a normally read-only filesystem | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Archie Cobbs <archie> |
| Component: | bin | Assignee: | dd <dd> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.3-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Archie Cobbs
2001-04-27 02:00:03 UTC
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 State Changed From-To: open->analyzed Problem fixed in -current. -stable is also affected; I'll MFC this later. Responsible Changed From-To: freebsd-bugs->dd My MFC reminder. State Changed From-To: analyzed->closed MFC'd |