Date: Fri, 2 Nov 2012 10:21:43 -0400 From: Eitan Adler <lists@eitanadler.com> To: Chris Rees <utisoft@gmail.com> Cc: freebsd-rc@freebsd.org, Mateusz Guzik <mjg@freebsd.org> Subject: Re: mountlate being too mount-happy Message-ID: <CAF6rxgkQZ-FUcMsMmV31s87kwdo0D3bJti-qTWbG7vsXz5EjYQ@mail.gmail.com> In-Reply-To: <CADLo83-pYaXyg8AejwVG6TiWKu8P5Y82PQP5-qyUUjfzZG0dXw@mail.gmail.com> References: <CADLo83_rUTsw_mgxX8xuK9v5Zhm2DFaycyMyW0PH99LxLeN8dA@mail.gmail.com> <CAF6rxgnRf1pxrXSsOgD-4w5w6XHJpLxxw31h3YLL=Nk0c2K=wA@mail.gmail.com> <CADLo83-pYaXyg8AejwVG6TiWKu8P5Y82PQP5-qyUUjfzZG0dXw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2 November 2012 09:56, Chris Rees <utisoft@gmail.com> wrote: > I'll take a look. untested: diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 1984eac..167c90c 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -245,14 +245,15 @@ main(int argc, char *argv[]) struct fstab *fs; struct statfs *mntbuf; int all, ch, i, init_flags, late, failok, mntsize, rval, have_fstab, ro; + int onlylate; char *cp, *ep, *options; - all = init_flags = late = 0; + all = init_flags = late = onlylate = 0; ro = 0; options = NULL; vfslist = NULL; vfstype = "ufs"; - while ((ch = getopt(argc, argv, "adF:flo:prt:uvw")) != -1) + while ((ch = getopt(argc, argv, "adF:fLlo:prt:uvw")) != -1) switch (ch) { case 'a': all = 1; @@ -269,6 +270,9 @@ main(int argc, char *argv[]) case 'l': late = 1; break; + case 'L': + onlylate = 1; + break; case 'o': if (*optarg) { options = catopt(options, optarg); @@ -329,6 +333,8 @@ main(int argc, char *argv[]) continue; if (hasopt(fs->fs_mntops, "late") && !late) continue; + if (!hasopt(fs->fs_mntops, "late") && onlylate) + continue; if (hasopt(fs->fs_mntops, "failok")) failok = 1; else -- Eitan Adler
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgkQZ-FUcMsMmV31s87kwdo0D3bJti-qTWbG7vsXz5EjYQ>