On Mon, May 29, 2006 at 10:01:00PM +0400, Maxim Konovalov wrote:
> So "mount -u -o ro" doesn't work but "mount -u -o rw" does.
Can you try the following patch?
Index: mount.c
===================================================================
RCS file: /home/ncvs/src/sbin/mount/mount.c,v
retrieving revision 1.84
diff -u -u -r1.84 mount.c
--- mount.c 10 May 2006 14:40:40 -0000 1.84
+++ mount.c 30 May 2006 03:39:32 -0000
@@ -184,6 +184,19 @@
return (0);
}
+static
+int specified_ro(int argc, char *argv[])
+{
+ int i;
+ for (i=1; i < argc; i++) {
+ if (strcmp(argv[i], "ro") == 0 &&
+ strcmp(argv[i-1], "-o") == 0) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
int
main(int argc, char *argv[])
{
@@ -200,6 +213,9 @@
options = NULL;
vfslist = NULL;
vfstype = "ufs";
+
+ if (specified_ro(argc, argv))
+ ro = 1;
while ((ch = getopt(argc, argv, "adF:fo:prwt:uv")) != -1)
switch (ch) {
case 'a':
--
Craig Rodrigues
[EMAIL PROTECTED]
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"