Date: Mon, 29 May 2006 23:45:31 -0400 From: Craig Rodrigues <rodrigc@crodrigues.org> To: Maxim Konovalov <maxim@macomnet.ru> Cc: Craig Rodrigues <rodrigc@freebsd.org>, cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/ufs/ffs ffs_vfsops.c Message-ID: <20060530034531.GA36462@crodrigues.org> In-Reply-To: <20060529215827.D78736@mp2.macomnet.net> References: <200605261244.k4QCiCsl057619@repoman.freebsd.org> <20060529193947.M63890@mp2.macomnet.net> <20060529215827.D78736@mp2.macomnet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 rodrigc@crodrigues.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060530034531.GA36462>