| @@ -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 |
69 | static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/23/94"; | | 69 | static 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 | |
98 | static int argtoi(int, const char *, const char *, int); | | 98 | static int argtoi(int, const char *, const char *, int); |
99 | static int checkfilesys(const char *, char *, long, int); | | 99 | static int checkfilesys(const char *, char *, long, int); |
100 | static void usage(void) __dead; | | 100 | static void usage(void) __dead; |
101 | | | 101 | |
102 | int | | 102 | int |
103 | main(int argc, char *argv[]) | | 103 | main(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; |