From owner-cvs-src@FreeBSD.ORG Wed May 31 21:26:48 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7124816B9A3; Wed, 31 May 2006 21:26:48 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.192.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5448443D4C; Wed, 31 May 2006 21:26:47 +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 (rwcrmhc11) with ESMTP id <20060531212645m1100gkpu7e>; Wed, 31 May 2006 21:26:46 +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 k4VLQjNa007550; Wed, 31 May 2006 17:26:45 -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 k4VLQiFs007549; Wed, 31 May 2006 17:26:44 -0400 (EDT) (envelope-from rodrigc) Date: Wed, 31 May 2006 17:26:44 -0400 From: Craig Rodrigues To: Maxim Konovalov Message-ID: <20060531212644.GA7541@crodrigues.org> References: <200605261244.k4QCiCsl057619@repoman.freebsd.org> <20060529193947.M63890@mp2.macomnet.net> <20060529215827.D78736@mp2.macomnet.net> <20060530034531.GA36462@crodrigues.org> <20060530110750.A96470@mp2.macomnet.net> <20060530224448.GA42556@crodrigues.org> <20060531114119.T70660@mp2.macomnet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060531114119.T70660@mp2.macomnet.net> User-Agent: Mutt/1.4.2.1i Cc: 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-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2006 21:26:50 -0000 On Wed, May 31, 2006 at 11:44:14AM +0400, Maxim Konovalov wrote: > This one works, thanks! But I worry about mountd/NFS interaction to > mount I described in my first email. Any ideas? Not sure about the mountd/NFS interaction yet. This patch is a bit better for mount(8): 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 31 May 2006 21:23:35 -0000 @@ -184,6 +184,26 @@ return (0); } +static +int specified_ro(const char *arg) +{ + char *optbuf, *opt; + int ret = 0; + + optbuf = strdup(arg); + if (optbuf == NULL) + err(1, NULL); + + for (opt = optbuf; (opt = strtok(opt, ",")) != NULL; opt = NULL) { + if (strcmp(opt, "ro") == 0) { + ret = 1; + break; + } + } + free(optbuf); + return (ret); +} + int main(int argc, char *argv[]) { @@ -215,8 +236,11 @@ init_flags |= MNT_FORCE; break; case 'o': - if (*optarg) + if (*optarg) { options = catopt(options, optarg); + if (specified_ro(optarg)) + ro = 1; + } break; case 'p': fstab_style = 1; -- Craig Rodrigues rodrigc@crodrigues.org