cvs commit: src/sbin/fsck_ffs main.c

Yar Tikhiy yar at comp.chem.msu.su
Fri Apr 4 08:57:42 UTC 2008


On Fri, Apr 04, 2008 at 01:50:58AM +0000, Craig Rodrigues wrote:
> rodrigc     2008-04-04 01:50:58 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sbin/fsck_ffs        main.c 
>   Log:
>   Add comment about specifying "ro" mount option when
>   doing an update mount on a read-only file system.
>   
>   Requested by:   yar
>   
>   Revision  Changes    Path
>   1.50      +4 -0      src/sbin/fsck_ffs/main.c

Thanks!  (But see below.)

> Index: src/sbin/fsck_ffs/main.c
> diff -u src/sbin/fsck_ffs/main.c:1.49 src/sbin/fsck_ffs/main.c:1.50
> --- src/sbin/fsck_ffs/main.c:1.49     Wed Mar  5 08:25:49 2008
> +++ src/sbin/fsck_ffs/main.c  Fri Apr  4 01:50:58 2008
> @@ -541,6 +541,10 @@
>               build_iovec(&iov, &iovlen, "errmsg", errmsg,
>                   sizeof(errmsg));
>               build_iovec(&iov, &iovlen, "update", NULL, 0);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As I've already pointed out, this line you also added is dangerous
because it installs the string "update" to among the root mount
point options, which may blow up later with more changes to the
mount framework.  The option still needs to be spelled MNT_UPDATE
and passed as a flag for now.

> +             /*
> +              * XX: We need the following line until we clean up
> +              * nmount parsing of root mounts and NFS root mounts.
> +              */
>               build_iovec(&iov, &iovlen, "ro", NULL, 0);
>               if (nmount(iov, iovlen, fflags) == 0) {
>                       return (0);

-- 
Yar


More information about the cvs-src mailing list