From owner-cvs-all@FreeBSD.ORG Tue May 30 03:45:34 2006 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 481B216A464; Tue, 30 May 2006 03:45:34 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [63.240.77.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 874C443D46; Tue, 30 May 2006 03:45:33 +0000 (GMT) (envelope-from rodrigc@crodrigues.org) Received: from c-24-147-19-128.hsd1.ma.comcast.net (c-71-233-168-2.hsd1.ma.comcast.net[71.233.168.2](misconfigured sender)) by comcast.net (sccrmhc12) with ESMTP id <2006053003453201200ek8t6e>; Tue, 30 May 2006 03:45:32 +0000 Received: from c-24-147-19-128.hsd1.ma.comcast.net (localhost [127.0.0.1]) by c-24-147-19-128.hsd1.ma.comcast.net (8.13.6/8.13.1) with ESMTP id k4U3jWLT036495; Mon, 29 May 2006 23:45:32 -0400 (EDT) (envelope-from rodrigc@c-24-147-19-128.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-24-147-19-128.hsd1.ma.comcast.net (8.13.6/8.13.1/Submit) id k4U3jVxS036494; Mon, 29 May 2006 23:45:31 -0400 (EDT) (envelope-from rodrigc) Date: Mon, 29 May 2006 23:45:31 -0400 From: Craig Rodrigues To: Maxim Konovalov Message-ID: <20060530034531.GA36462@crodrigues.org> References: <200605261244.k4QCiCsl057619@repoman.freebsd.org> <20060529193947.M63890@mp2.macomnet.net> <20060529215827.D78736@mp2.macomnet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060529215827.D78736@mp2.macomnet.net> User-Agent: Mutt/1.4.2.1i Cc: Craig Rodrigues , cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/ufs/ffs ffs_vfsops.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 May 2006 03:45:34 -0000 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