Thu Jan 7 01:39:56 2010 UTC ()
make this compile again.


(christos)
diff -r1.35 -r1.36 src/sbin/fsck_ext2fs/main.c
diff -r1.20 -r1.21 src/sbin/fsck_ext2fs/utilities.c
diff -r1.74 -r1.75 src/sbin/fsck_ffs/main.c
diff -r1.57 -r1.58 src/sbin/fsck_ffs/utilities.c
diff -r1.41 -r1.42 src/sbin/fsck_lfs/main.c
diff -r1.28 -r1.29 src/sbin/fsck_lfs/utilities.c

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

--- src/sbin/fsck_ext2fs/main.c 2010/01/06 18:12:37 1.35
+++ src/sbin/fsck_ext2fs/main.c 2010/01/07 01:39:56 1.36
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: main.c,v 1.35 2010/01/06 18:12:37 christos Exp $ */ 1/* $NetBSD: main.c,v 1.36 2010/01/07 01:39:56 christos 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.
@@ -53,51 +53,51 @@ @@ -53,51 +53,51 @@
53 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 53 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 */ 54 */
55 55
56#include <sys/cdefs.h> 56#include <sys/cdefs.h>
57#ifndef lint 57#ifndef lint
58__COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\ 58__COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\
59 The Regents of the University of California. All rights reserved."); 59 The Regents of the University of California. All rights reserved.");
60#endif /* not lint */ 60#endif /* not lint */
61 61
62#ifndef lint 62#ifndef lint
63#if 0 63#if 0
64static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/23/94"; 64static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/23/94";
65#else 65#else
66__RCSID("$NetBSD: main.c,v 1.35 2010/01/06 18:12:37 christos Exp $"); 66__RCSID("$NetBSD: main.c,v 1.36 2010/01/07 01:39:56 christos Exp $");
67#endif 67#endif
68#endif /* not lint */ 68#endif /* not lint */
69 69
70#include <sys/param.h> 70#include <sys/param.h>
71#include <sys/time.h> 71#include <sys/time.h>
72#include <sys/mount.h> 72#include <sys/mount.h>
73#include <ufs/ufs/ufsmount.h> 73#include <ufs/ufs/ufsmount.h>
74#include <ufs/ext2fs/ext2fs_dinode.h> 74#include <ufs/ext2fs/ext2fs_dinode.h>
75#include <ufs/ext2fs/ext2fs.h> 75#include <ufs/ext2fs/ext2fs.h>
76#include <fstab.h> 76#include <fstab.h>
77#include <stdlib.h> 77#include <stdlib.h>
78#include <string.h> 78#include <string.h>
79#include <ctype.h> 79#include <ctype.h>
80#include <stdio.h> 80#include <stdio.h>
81#include <time.h> 81#include <time.h>
82#include <unistd.h> 82#include <unistd.h>
83#include <signal.h> 83#include <signal.h>
84 84
85#include "fsck.h" 85#include "fsck.h"
86#include "extern.h" 86#include "extern.h"
87#include "fsutil.h" 87#include "fsutil.h"
88#include "exitvalues.h" 88#include "exitvalues.h"
89 89
90volatilel sigatomic_t returntosingle = 0; 90volatile sig_atomic_t returntosingle = 0;
91 91
92 92
93static int argtoi(int, const char *, const char *, int); 93static int argtoi(int, const char *, const char *, int);
94static int checkfilesys(const char *, char *, long, int); 94static int checkfilesys(const char *, char *, long, int);
95static void usage(void) __dead; 95static void usage(void) __dead;
96 96
97int 97int
98main(int argc, char *argv[]) 98main(int argc, char *argv[])
99{ 99{
100 int ch; 100 int ch;
101 int ret = FSCK_EXIT_OK; 101 int ret = FSCK_EXIT_OK;
102 102
103 sync(); 103 sync();

cvs diff -r1.20 -r1.21 src/sbin/fsck_ext2fs/utilities.c (expand / switch to unified diff)

--- src/sbin/fsck_ext2fs/utilities.c 2010/01/06 18:12:37 1.20
+++ src/sbin/fsck_ext2fs/utilities.c 2010/01/07 01:39:56 1.21
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: utilities.c,v 1.20 2010/01/06 18:12:37 christos Exp $ */ 1/* $NetBSD: utilities.c,v 1.21 2010/01/07 01:39:56 christos 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.
@@ -48,53 +48,54 @@ @@ -48,53 +48,54 @@
48 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 48 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
49 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 49 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
50 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 50 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
51 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 51 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
53 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 53 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 */ 54 */
55 55
56#include <sys/cdefs.h> 56#include <sys/cdefs.h>
57#ifndef lint 57#ifndef lint
58#if 0 58#if 0
59static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93"; 59static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93";
60#else 60#else
61__RCSID("$NetBSD: utilities.c,v 1.20 2010/01/06 18:12:37 christos Exp $"); 61__RCSID("$NetBSD: utilities.c,v 1.21 2010/01/07 01:39:56 christos Exp $");
62#endif 62#endif
63#endif /* not lint */ 63#endif /* not lint */
64 64
65#include <sys/param.h> 65#include <sys/param.h>
66#include <sys/time.h> 66#include <sys/time.h>
67#include <ufs/ext2fs/ext2fs_dinode.h> 67#include <ufs/ext2fs/ext2fs_dinode.h>
68#include <ufs/ext2fs/ext2fs_dir.h> 68#include <ufs/ext2fs/ext2fs_dir.h>
69#include <ufs/ext2fs/ext2fs.h> 69#include <ufs/ext2fs/ext2fs.h>
70#include <ufs/ufs/dinode.h> /* for IFMT & friends */ 70#include <ufs/ufs/dinode.h> /* for IFMT & friends */
71#include <stdio.h> 71#include <stdio.h>
72#include <stdlib.h> 72#include <stdlib.h>
 73#include <errno.h>
73#include <string.h> 74#include <string.h>
74#include <ctype.h> 75#include <ctype.h>
75#include <unistd.h> 76#include <unistd.h>
76#include <signal.h> 77#include <signal.h>
77 78
78#include "fsutil.h" 79#include "fsutil.h"
79#include "fsck.h" 80#include "fsck.h"
80#include "extern.h" 81#include "extern.h"
81#include "exitvalues.h" 82#include "exitvalues.h"
82 83
83long diskreads, totalreads; /* Disk cache statistics */ 84long diskreads, totalreads; /* Disk cache statistics */
84 85
85static void rwerror(const char *, daddr_t); 86static void rwerror(const char *, daddr_t);
86 87
87extern volatile sigatomic_t returntosingle; 88extern volatile sig_atomic_t returntosingle;
88 89
89int 90int
90ftypeok(struct ext2fs_dinode *dp) 91ftypeok(struct ext2fs_dinode *dp)
91{ 92{
92 switch (fs2h16(dp->e2di_mode) & IFMT) { 93 switch (fs2h16(dp->e2di_mode) & IFMT) {
93 94
94 case IFDIR: 95 case IFDIR:
95 case IFREG: 96 case IFREG:
96 case IFBLK: 97 case IFBLK:
97 case IFCHR: 98 case IFCHR:
98 case IFLNK: 99 case IFLNK:
99 case IFSOCK: 100 case IFSOCK:
100 case IFIFO: 101 case IFIFO:
@@ -146,27 +147,27 @@ void @@ -146,27 +147,27 @@ void
146bufinit(void) 147bufinit(void)
147{ 148{
148 struct bufarea *bp; 149 struct bufarea *bp;
149 long bufcnt, i; 150 long bufcnt, i;
150 char *bufp; 151 char *bufp;
151 152
152 diskreads = totalreads = 0; 153 diskreads = totalreads = 0;
153 pbp = pdirbp = (struct bufarea *)0; 154 pbp = pdirbp = (struct bufarea *)0;
154 bufhead.b_next = bufhead.b_prev = &bufhead; 155 bufhead.b_next = bufhead.b_prev = &bufhead;
155 bufcnt = MAXBUFSPACE / sblock.e2fs_bsize; 156 bufcnt = MAXBUFSPACE / sblock.e2fs_bsize;
156 if (bufcnt < MINBUFS) 157 if (bufcnt < MINBUFS)
157 bufcnt = MINBUFS; 158 bufcnt = MINBUFS;
158 for (i = 0; i < bufcnt; i++) { 159 for (i = 0; i < bufcnt; i++) {
159 bp = size_t(sizeof(struct bufarea)); 160 bp = malloc(sizeof(struct bufarea));
160 bufp = malloc((size_t)sblock.e2fs_bsize); 161 bufp = malloc((size_t)sblock.e2fs_bsize);
161 if (bp == NULL || bufp == NULL) { 162 if (bp == NULL || bufp == NULL) {
162 free(bp); 163 free(bp);
163 free(bufp); 164 free(bufp);
164 if (i >= MINBUFS) 165 if (i >= MINBUFS)
165 break; 166 break;
166 errexit("cannot allocate buffer pool"); 167 errexit("cannot allocate buffer pool");
167 } 168 }
168 bp->b_un.b_buf = bufp; 169 bp->b_un.b_buf = bufp;
169 bp->b_prev = &bufhead; 170 bp->b_prev = &bufhead;
170 bp->b_next = bufhead.b_next; 171 bp->b_next = bufhead.b_next;
171 bufhead.b_next->b_prev = bp; 172 bufhead.b_next->b_prev = bp;
172 bufhead.b_next = bp; 173 bufhead.b_next = bp;

cvs diff -r1.74 -r1.75 src/sbin/fsck_ffs/main.c (expand / switch to unified diff)

--- src/sbin/fsck_ffs/main.c 2010/01/06 18:12:37 1.74
+++ src/sbin/fsck_ffs/main.c 2010/01/07 01:39:56 1.75
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: main.c,v 1.74 2010/01/06 18:12:37 christos Exp $ */ 1/* $NetBSD: main.c,v 1.75 2010/01/07 01:39:56 christos 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.
@@ -29,27 +29,27 @@ @@ -29,27 +29,27 @@
29 * SUCH DAMAGE. 29 * SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33#ifndef lint 33#ifndef lint
34__COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\ 34__COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1993\
35 The Regents of the University of California. All rights reserved."); 35 The Regents of the University of California. All rights reserved.");
36#endif /* not lint */ 36#endif /* not lint */
37 37
38#ifndef lint 38#ifndef lint
39#if 0 39#if 0
40static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; 40static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95";
41#else 41#else
42__RCSID("$NetBSD: main.c,v 1.74 2010/01/06 18:12:37 christos Exp $"); 42__RCSID("$NetBSD: main.c,v 1.75 2010/01/07 01:39:56 christos Exp $");
43#endif 43#endif
44#endif /* not lint */ 44#endif /* not lint */
45 45
46#include <sys/param.h> 46#include <sys/param.h>
47#include <sys/time.h> 47#include <sys/time.h>
48#include <sys/mount.h> 48#include <sys/mount.h>
49#include <sys/resource.h> 49#include <sys/resource.h>
50 50
51#include <ufs/ufs/dinode.h> 51#include <ufs/ufs/dinode.h>
52#include <ufs/ufs/ufsmount.h> 52#include <ufs/ufs/ufsmount.h>
53#include <ufs/ffs/fs.h> 53#include <ufs/ffs/fs.h>
54#include <ufs/ffs/ffs_extern.h> 54#include <ufs/ffs/ffs_extern.h>
55 55
@@ -61,27 +61,27 @@ __RCSID("$NetBSD: main.c,v 1.74 2010/01/ @@ -61,27 +61,27 @@ __RCSID("$NetBSD: main.c,v 1.74 2010/01/
61#include <time.h> 61#include <time.h>
62#include <stdio.h> 62#include <stdio.h>
63#include <stdlib.h> 63#include <stdlib.h>
64#include <unistd.h> 64#include <unistd.h>
65#include <signal.h> 65#include <signal.h>
66 66
67#include "fsck.h" 67#include "fsck.h"
68#include "extern.h" 68#include "extern.h"
69#include "fsutil.h" 69#include "fsutil.h"
70#include "exitvalues.h" 70#include "exitvalues.h"
71#include "snapshot.h" 71#include "snapshot.h"
72 72
73int progress = 0; 73int progress = 0;
74volatile sigatomic_t returntosingle = 0; 74volatile sig_atomic_t returntosingle = 0;
75 75
76static int argtoi(int, const char *, const char *, int); 76static int argtoi(int, const char *, const char *, int);
77static int checkfilesys(const char *, const char *, int); 77static int checkfilesys(const char *, const char *, int);
78static void usage(void); 78static void usage(void);
79static char *get_snap_device(char *); 79static char *get_snap_device(char *);
80 80
81int 81int
82main(int argc, char *argv[]) 82main(int argc, char *argv[])
83{ 83{
84 struct rlimit r; 84 struct rlimit r;
85 int ch; 85 int ch;
86 int ret = FSCK_EXIT_OK; 86 int ret = FSCK_EXIT_OK;
87 char *snap_backup = NULL; 87 char *snap_backup = NULL;

cvs diff -r1.57 -r1.58 src/sbin/fsck_ffs/utilities.c (expand / switch to unified diff)

--- src/sbin/fsck_ffs/utilities.c 2010/01/06 18:12:37 1.57
+++ src/sbin/fsck_ffs/utilities.c 2010/01/07 01:39:56 1.58
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: utilities.c,v 1.57 2010/01/06 18:12:37 christos Exp $ */ 1/* $NetBSD: utilities.c,v 1.58 2010/01/07 01:39:56 christos 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.
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE. 29 * SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33#ifndef lint 33#ifndef lint
34#if 0 34#if 0
35static char sccsid[] = "@(#)utilities.c 8.6 (Berkeley) 5/19/95"; 35static char sccsid[] = "@(#)utilities.c 8.6 (Berkeley) 5/19/95";
36#else 36#else
37__RCSID("$NetBSD: utilities.c,v 1.57 2010/01/06 18:12:37 christos Exp $"); 37__RCSID("$NetBSD: utilities.c,v 1.58 2010/01/07 01:39:56 christos Exp $");
38#endif 38#endif
39#endif /* not lint */ 39#endif /* not lint */
40 40
41#include <sys/param.h> 41#include <sys/param.h>
42#include <sys/time.h> 42#include <sys/time.h>
43 43
44#include <ufs/ufs/dinode.h> 44#include <ufs/ufs/dinode.h>
45#include <ufs/ufs/dir.h> 45#include <ufs/ufs/dir.h>
46#include <ufs/ffs/fs.h> 46#include <ufs/ffs/fs.h>
47#include <ufs/ffs/ffs_extern.h> 47#include <ufs/ffs/ffs_extern.h>
48#include <ufs/ufs/ufs_bswap.h> 48#include <ufs/ufs/ufs_bswap.h>
49 49
50#include <ctype.h> 50#include <ctype.h>
@@ -55,27 +55,27 @@ __RCSID("$NetBSD: utilities.c,v 1.57 201 @@ -55,27 +55,27 @@ __RCSID("$NetBSD: utilities.c,v 1.57 201
55#include <string.h> 55#include <string.h>
56#include <unistd.h> 56#include <unistd.h>
57#include <signal.h> 57#include <signal.h>
58 58
59#include "fsutil.h" 59#include "fsutil.h"
60#include "fsck.h" 60#include "fsck.h"
61#include "extern.h" 61#include "extern.h"
62#include "exitvalues.h" 62#include "exitvalues.h"
63 63
64long diskreads, totalreads; /* Disk cache statistics */ 64long diskreads, totalreads; /* Disk cache statistics */
65 65
66static void rwerror(const char *, daddr_t); 66static void rwerror(const char *, daddr_t);
67 67
68extern volatile sigatomic_t returntosingle; 68extern volatile sig_atomic_t returntosingle;
69 69
70int 70int
71ftypeok(union dinode *dp) 71ftypeok(union dinode *dp)
72{ 72{
73 switch (iswap16(DIP(dp, mode)) & IFMT) { 73 switch (iswap16(DIP(dp, mode)) & IFMT) {
74 74
75 case IFDIR: 75 case IFDIR:
76 case IFREG: 76 case IFREG:
77 case IFBLK: 77 case IFBLK:
78 case IFCHR: 78 case IFCHR:
79 case IFLNK: 79 case IFLNK:
80 case IFSOCK: 80 case IFSOCK:
81 case IFIFO: 81 case IFIFO:

cvs diff -r1.41 -r1.42 src/sbin/fsck_lfs/main.c (expand / switch to unified diff)

--- src/sbin/fsck_lfs/main.c 2010/01/06 18:12:37 1.41
+++ src/sbin/fsck_lfs/main.c 2010/01/07 01:39:56 1.42
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: main.c,v 1.41 2010/01/06 18:12:37 christos Exp $ */ 1/* $NetBSD: main.c,v 1.42 2010/01/07 01:39:56 christos 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.
@@ -42,27 +42,27 @@ @@ -42,27 +42,27 @@
42#include <string.h> 42#include <string.h>
43#include <ctype.h> 43#include <ctype.h>
44#include <stdio.h> 44#include <stdio.h>
45#include <unistd.h> 45#include <unistd.h>
46#include <err.h> 46#include <err.h>
47#include <util.h> 47#include <util.h>
48#include <signal.h> 48#include <signal.h>
49 49
50#include "fsck.h" 50#include "fsck.h"
51#include "extern.h" 51#include "extern.h"
52#include "fsutil.h" 52#include "fsutil.h"
53#include "exitvalues.h" 53#include "exitvalues.h"
54 54
55volatile sigatomic_t returntosingle = 0; 55volatile sig_atomic_t returntosingle = 0;
56 56
57static int argtoi(int, const char *, const char *, int); 57static int argtoi(int, const char *, const char *, int);
58static int checkfilesys(const char *, char *, long, int); 58static int checkfilesys(const char *, char *, long, int);
59static void usage(void); 59static void usage(void);
60static void efun(int, const char *, ...); 60static void efun(int, const char *, ...);
61extern void (*panic_func)(int, const char *, va_list); 61extern void (*panic_func)(int, const char *, va_list);
62 62
63static void 63static void
64efun(int eval, const char *fmt, ...) 64efun(int eval, const char *fmt, ...)
65{ 65{
66 va_list ap; 66 va_list ap;
67 va_start(ap, fmt); 67 va_start(ap, fmt);
68 verr(EEXIT, fmt, ap); 68 verr(EEXIT, fmt, ap);

cvs diff -r1.28 -r1.29 src/sbin/fsck_lfs/utilities.c (expand / switch to unified diff)

--- src/sbin/fsck_lfs/utilities.c 2010/01/06 18:12:37 1.28
+++ src/sbin/fsck_lfs/utilities.c 2010/01/07 01:39:56 1.29
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: utilities.c,v 1.28 2010/01/06 18:12:37 christos Exp $ */ 1/* $NetBSD: utilities.c,v 1.29 2010/01/07 01:39:56 christos 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.
@@ -50,27 +50,27 @@ @@ -50,27 +50,27 @@
50 50
51#include "bufcache.h" 51#include "bufcache.h"
52#include "vnode.h" 52#include "vnode.h"
53#include "lfs_user.h" 53#include "lfs_user.h"
54#include "segwrite.h" 54#include "segwrite.h"
55 55
56#include "fsutil.h" 56#include "fsutil.h"
57#include "fsck.h" 57#include "fsck.h"
58#include "extern.h" 58#include "extern.h"
59#include "exitvalues.h" 59#include "exitvalues.h"
60 60
61long diskreads, totalreads; /* Disk cache statistics */ 61long diskreads, totalreads; /* Disk cache statistics */
62 62
63extern volatile sigatomic_t returntosingle; 63extern volatile sig_atomic_t returntosingle;
64extern off_t locked_queue_bytes; 64extern off_t locked_queue_bytes;
65 65
66int 66int
67ftypeok(struct ufs1_dinode * dp) 67ftypeok(struct ufs1_dinode * dp)
68{ 68{
69 switch (dp->di_mode & IFMT) { 69 switch (dp->di_mode & IFMT) {
70 70
71 case IFDIR: 71 case IFDIR:
72 case IFREG: 72 case IFREG:
73 case IFBLK: 73 case IFBLK:
74 case IFCHR: 74 case IFCHR:
75 case IFLNK: 75 case IFLNK:
76 case IFSOCK: 76 case IFSOCK: