Sat Sep 5 11:45:06 2009 UTC ()
Pull up following revision(s) (requested by tron in ticket #914):
	sbin/fsck_ext2fs/main.c: revision 1.33
Ignore the "-P" option as intended to make this work with e.g.
"fsck_flags=3D-pP" in "/etc/rc.conf".
Patch supplied by Pierre Pronchery in PR bin/41490.


(bouyer)
diff -r1.32 -r1.32.2.1 src/sbin/fsck_ext2fs/main.c

cvs diff -r1.32 -r1.32.2.1 src/sbin/fsck_ext2fs/main.c (expand / switch to unified diff)

--- src/sbin/fsck_ext2fs/main.c 2008/10/12 20:49:43 1.32
+++ src/sbin/fsck_ext2fs/main.c 2009/09/05 11:45:06 1.32.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: main.c,v 1.32 2008/10/12 20:49:43 wiz Exp $ */ 1/* $NetBSD: main.c,v 1.32.2.1 2009/09/05 11:45:06 bouyer Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1980, 1986, 1993 4 * Copyright (c) 1980, 1986, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -58,27 +58,27 @@ @@ -58,27 +58,27 @@
58 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 58 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
59 */ 59 */
60 60
61#include <sys/cdefs.h> 61#include <sys/cdefs.h>
62#ifndef lint 62#ifndef lint
63__COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\ 63__COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\
64 The Regents of the University of California. All rights reserved."); 64 The Regents of the University of California. All rights reserved.");
65#endif /* not lint */ 65#endif /* not lint */
66 66
67#ifndef lint 67#ifndef lint
68#if 0 68#if 0
69static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/23/94"; 69static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/23/94";
70#else 70#else
71__RCSID("$NetBSD: main.c,v 1.32 2008/10/12 20:49:43 wiz Exp $"); 71__RCSID("$NetBSD: main.c,v 1.32.2.1 2009/09/05 11:45:06 bouyer Exp $");
72#endif 72#endif
73#endif /* not lint */ 73#endif /* not lint */
74 74
75#include <sys/param.h> 75#include <sys/param.h>
76#include <sys/time.h> 76#include <sys/time.h>
77#include <sys/mount.h> 77#include <sys/mount.h>
78#include <ufs/ufs/ufsmount.h> 78#include <ufs/ufs/ufsmount.h>
79#include <ufs/ext2fs/ext2fs_dinode.h> 79#include <ufs/ext2fs/ext2fs_dinode.h>
80#include <ufs/ext2fs/ext2fs.h> 80#include <ufs/ext2fs/ext2fs.h>
81#include <fstab.h> 81#include <fstab.h>
82#include <stdlib.h> 82#include <stdlib.h>
83#include <string.h> 83#include <string.h>
84#include <ctype.h> 84#include <ctype.h>
@@ -97,27 +97,27 @@ int returntosingle = 0; @@ -97,27 +97,27 @@ int returntosingle = 0;
97 97
98static int argtoi(int, const char *, const char *, int); 98static int argtoi(int, const char *, const char *, int);
99static int checkfilesys(const char *, char *, long, int); 99static int checkfilesys(const char *, char *, long, int);
100static void usage(void) __dead; 100static void usage(void) __dead;
101 101
102int 102int
103main(int argc, char *argv[]) 103main(int argc, char *argv[])
104{ 104{
105 int ch; 105 int ch;
106 int ret = FSCK_EXIT_OK; 106 int ret = FSCK_EXIT_OK;
107 107
108 sync(); 108 sync();
109 skipclean = 1; 109 skipclean = 1;
110 while ((ch = getopt(argc, argv, "b:dfm:npqUy")) != -1) { 110 while ((ch = getopt(argc, argv, "b:dfm:npPqUy")) != -1) {
111 switch (ch) { 111 switch (ch) {
112 case 'b': 112 case 'b':
113 skipclean = 0; 113 skipclean = 0;
114 bflag = argtoi('b', "number", optarg, 10); 114 bflag = argtoi('b', "number", optarg, 10);
115 printf("Alternate super block location: %d\n", bflag); 115 printf("Alternate super block location: %d\n", bflag);
116 break; 116 break;
117 117
118 case 'd': 118 case 'd':
119 debug++; 119 debug++;
120 break; 120 break;
121 121
122 case 'f': 122 case 'f':
123 skipclean = 0; 123 skipclean = 0;