Module Name: src Committed By: tls Date: Sun Aug 10 06:52:52 UTC 2014
Modified Files: src/sbin/fsck_lfs [tls-earlyentropy]: fsck_lfs.8 lfs.c lfs_user.h main.c Log Message: Rebase. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.24.2.1 src/sbin/fsck_lfs/fsck_lfs.8 cvs rdiff -u -r1.41 -r1.41.2.1 src/sbin/fsck_lfs/lfs.c cvs rdiff -u -r1.5 -r1.5.4.1 src/sbin/fsck_lfs/lfs_user.h cvs rdiff -u -r1.45 -r1.45.4.1 src/sbin/fsck_lfs/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/fsck_lfs/fsck_lfs.8 diff -u src/sbin/fsck_lfs/fsck_lfs.8:1.24 src/sbin/fsck_lfs/fsck_lfs.8:1.24.2.1 --- src/sbin/fsck_lfs/fsck_lfs.8:1.24 Tue Mar 18 18:20:38 2014 +++ src/sbin/fsck_lfs/fsck_lfs.8 Sun Aug 10 06:52:52 2014 @@ -1,4 +1,4 @@ -.\" $NetBSD: fsck_lfs.8,v 1.24 2014/03/18 18:20:38 riastradh Exp $ +.\" $NetBSD: fsck_lfs.8,v 1.24.2.1 2014/08/10 06:52:52 tls Exp $ .\" .\" Copyright (c) 1980, 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)fsck.8 8.3 (Berkeley) 11/29/94 .\" -.Dd October 9, 2008 +.Dd July 12, 2014 .Dt FSCK_LFS 8 .Os .Sh NAME @@ -134,7 +134,8 @@ Specify mode. Currently, in this mode .Nm -rolls forward from the older checkpoint, and performs no other action. +does nothing. +.\" rolls forward from the older checkpoint, and performs no other action. .It Fl q Quiet mode, do not output any messages for clean filesystems. .It Fl U Index: src/sbin/fsck_lfs/lfs.c diff -u src/sbin/fsck_lfs/lfs.c:1.41 src/sbin/fsck_lfs/lfs.c:1.41.2.1 --- src/sbin/fsck_lfs/lfs.c:1.41 Sat Oct 19 01:09:58 2013 +++ src/sbin/fsck_lfs/lfs.c Sun Aug 10 06:52:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs.c,v 1.41 2013/10/19 01:09:58 christos Exp $ */ +/* $NetBSD: lfs.c,v 1.41.2.1 2014/08/10 06:52:52 tls Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. * All rights reserved. Index: src/sbin/fsck_lfs/lfs_user.h diff -u src/sbin/fsck_lfs/lfs_user.h:1.5 src/sbin/fsck_lfs/lfs_user.h:1.5.4.1 --- src/sbin/fsck_lfs/lfs_user.h:1.5 Sat Jun 8 21:13:19 2013 +++ src/sbin/fsck_lfs/lfs_user.h Sun Aug 10 06:52:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_user.h,v 1.5 2013/06/08 21:13:19 dholland Exp $ */ +/* $NetBSD: lfs_user.h,v 1.5.4.1 2014/08/10 06:52:52 tls Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. * All rights reserved. Index: src/sbin/fsck_lfs/main.c diff -u src/sbin/fsck_lfs/main.c:1.45 src/sbin/fsck_lfs/main.c:1.45.4.1 --- src/sbin/fsck_lfs/main.c:1.45 Sat Jun 8 02:16:03 2013 +++ src/sbin/fsck_lfs/main.c Sun Aug 10 06:52:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.45 2013/06/08 02:16:03 dholland Exp $ */ +/* $NetBSD: main.c,v 1.45.4.1 2014/08/10 06:52:52 tls Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -35,6 +35,7 @@ #include <ufs/lfs/lfs.h> #include <fstab.h> +#include <stdbool.h> #include <stdarg.h> #include <stdlib.h> #include <string.h> @@ -73,7 +74,9 @@ main(int argc, char **argv) int ch; int ret = FSCK_EXIT_OK; const char *optstring = "b:dfi:m:npPqUy"; + bool reallypreen; + reallypreen = false; ckfinish = ckfini; skipclean = 1; exitonfail = 0; @@ -95,6 +98,7 @@ main(int argc, char **argv) break; case 'f': skipclean = 0; + reallypreen = true; break; case 'i': idaddr = strtol(optarg, NULL, 0); @@ -142,6 +146,29 @@ main(int argc, char **argv) if (!argc) usage(); + /* + * Don't do anything in preen mode. This is a replacement for + * version 1.111 of src/distrib/utils/sysinst/disks.c, which + * disabled fsck on installer-generated lfs partitions. That + * isn't the right way to do it; better to run fsck but have + * it not do anything, so that when the issues in fsck get + * resolved it can be turned back on. + * + * If you really want to run fsck in preen mode you can do: + * fsck_lfs -p -f image + * + * This was prompted by + * http://mail-index.netbsd.org/tech-kern/2010/02/09/msg007306.html. + * + * It would be nice if someone prepared a more detailed report + * of the problems. + * + * XXX. + */ + if (preen && !reallypreen) { + return ret; + } + if (signal(SIGINT, SIG_IGN) != SIG_IGN) (void) signal(SIGINT, catch); if (preen)