1 |
commit: 621421fbf693bd16dbcdd414d158f693118a56b1 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 3 12:40:02 2022 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 3 12:40:02 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=621421fb |
7 |
|
8 |
sys-fs/e2fsprogs: remove unused files |
9 |
|
10 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
11 |
|
12 |
sys-fs/e2fsprogs/files/fsck_ext2fs.8 | 96 ----------------------- |
13 |
sys-fs/e2fsprogs/files/fsck_ext2fs.c | 147 ----------------------------------- |
14 |
2 files changed, 243 deletions(-) |
15 |
|
16 |
diff --git a/sys-fs/e2fsprogs/files/fsck_ext2fs.8 b/sys-fs/e2fsprogs/files/fsck_ext2fs.8 |
17 |
deleted file mode 100644 |
18 |
index aa31cf1db172..000000000000 |
19 |
--- a/sys-fs/e2fsprogs/files/fsck_ext2fs.8 |
20 |
+++ /dev/null |
21 |
@@ -1,96 +0,0 @@ |
22 |
-.TH fsck_ext2fs 8 2006-07-02 "Matthias Andree" "FreeBSD Ports" |
23 |
-.\" |
24 |
-.\" fsck_ext2fs.8 - manual page for fsck_ext2fs wrapper |
25 |
-.\" |
26 |
-.\" (C) Copyright 2006 by Matthias Andree <matthias.andree@×××.de> |
27 |
-.\" |
28 |
-.\" License: This file may be redistributed in accordance with the terms |
29 |
-.\" of the GNU General Public License v2. |
30 |
-.\" |
31 |
-.\" Upstream $Id: fsck_ext2fs.8,v 1.3 2006/07/02 11:45:21 emma Exp $ |
32 |
-.\" $FreeBSD: ports/sysutils/e2fsprogs/files/fsck_ext2fs.8,v 1.1 2006/07/04 15:47:51 leeym Exp $ |
33 |
-.\" |
34 |
-.SH NAME |
35 |
-.B fsck_ext2fs |
36 |
-\- compatibility wrapper for e2fsck |
37 |
-.SH SYNOPSIS |
38 |
-.P |
39 |
-.B fsck_ext2fs |
40 |
-[\fB\-Fpfnyv\fR] [\fB\-b\fR \fIblock\fR] |
41 |
-.SH DESCRIPTION |
42 |
-.P |
43 |
-\fBfsck_ext2fs\fR maps the traditional FreeBSD \fBfsck_ffs\fR options to |
44 |
-options with the same functionality for \fBe2fsck,\fR runs \fBe2fsck\fR |
45 |
-and then maps its exit status to values that FreeBSD understands. |
46 |
-\fBe2fsck\fR is a utility to check and repair ext2 and ext3 file |
47 |
-systems. |
48 |
- |
49 |
-.SH OPTIONS |
50 |
-.IP \fB\-F\fR |
51 |
-(check foreground mode required) Immediately exits with status 1 to tell |
52 |
-\fBfsck\fR that ext2fs cannot be checked in the background. \fBfsck\fR |
53 |
-usually runs \fBfsck_*\fR programs twice, first with \fB\-F\fR to find |
54 |
-out if they can do background checking, then either immediately without |
55 |
-\fB\-F\fR for foreground checking or deferred in the background with |
56 |
-\fB\-B\fR. |
57 |
-.IP \fB\-p\fR |
58 |
-(preen mode) This option suppresses adding the \fB\-f\fR option (unless |
59 |
-\fB\-f\fR is also given) and adds the \fB\-p\fR option to the |
60 |
-\fBe2fsck\fR command line. This causes \fBe2fsck\fR to automatically fix |
61 |
-any filesystem problems that can safely be fixed without operator |
62 |
-intervention. Without this option given, \fBe2fsck\fR will be run with |
63 |
-the \fB\-f\fR option to force a check, since interactive scan and repair |
64 |
-mode is the default on FreeBSD, but not on Linux where \fBe2fsck\fR |
65 |
-comes from. |
66 |
-.IP \fB\-f\fR |
67 |
-(force check) This option forces the check of a clean file system while |
68 |
-preening and is passed to \fBe2fsck\fR verbatim. |
69 |
-.IP \fB\-n\fR |
70 |
-("no" mode) This option causes the file system to be opened in read-only |
71 |
-mode and assume "no" as answer to all questions. This is the only way to |
72 |
-safely run \fBfsck\fR on a mounted ext2 or ext3 file system. This option |
73 |
-is passed to \fBe2fsck\fR verbatim. |
74 |
-.IP \fB\-y\fR |
75 |
-("yes" mode) This option is passed verbatim to \fBe2fsck\fR and causes |
76 |
-it to assume "yes" as answer to all questions. This allows the |
77 |
-non-interactive use of e2fsck but is rather aggressive. Use with care. |
78 |
-.IP \fB\-v\fR |
79 |
-(verbose output) This option is passed verbatim to \fBe2fsck\fR and |
80 |
-causes it to verbosely report its progress. |
81 |
-.IP "\fB\-b\fR \fIblock\fR" |
82 |
-(use alternate super block) This option is passed verbatim to |
83 |
-\fBe2fsck\fR and selects an alternate super block, for use when the |
84 |
-primary super block has been damaged. Please see the \fBe2fsck\fR(8) |
85 |
-manual page for details. |
86 |
- |
87 |
-.SH EXIT STATUS |
88 |
-If errors remain after \fBe2fsck\fR, an invalid option or too many |
89 |
-options have been specified, \fBe2fsck\fR was killed with a signal or |
90 |
-the \fIfork\fB system call failed, \fBfsck_ext2fs\fR exits with status |
91 |
-EXIT_FAILURE (usually 1). If \fBe2fsck\fR cannot be started, exits with |
92 |
-status 127. If the file system is clean after \fBe2fsck\fR operation, |
93 |
-exits with status EXIT_SUCCESS (0). |
94 |
- |
95 |
-.SH NOTES |
96 |
-.P |
97 |
-This utility is merely meant as an adaptor so that \fBe2fsck\fR can be |
98 |
-run during the boot process, it does not support all options that |
99 |
-\fBe2fsck\fR offers. If you need one of its advanced options, please run |
100 |
-\fBe2fsck\fR directly. |
101 |
- |
102 |
-.SH FILES |
103 |
-.TP |
104 |
-.I /sbin/e2fsck |
105 |
-is the location of the \fBe2fsck\fR program to run. |
106 |
- |
107 |
-.SH AUTHOR |
108 |
-.P |
109 |
-Matthias Andree <matthias.andree@×××.de> wrote the program and this |
110 |
-manual page. |
111 |
-.SH CONFORMING TO |
112 |
-The FreeBSD 6.1 command line interface for \fBfsck_ufs\fR(8). |
113 |
-.SH SEE ALSO |
114 |
-.BR fsck (8), |
115 |
-.BR e2fsck (8) |
116 |
-and |
117 |
-.BR fsck_ufs (8). |
118 |
|
119 |
diff --git a/sys-fs/e2fsprogs/files/fsck_ext2fs.c b/sys-fs/e2fsprogs/files/fsck_ext2fs.c |
120 |
deleted file mode 100644 |
121 |
index f5e3e5e9a8c9..000000000000 |
122 |
--- a/sys-fs/e2fsprogs/files/fsck_ext2fs.c |
123 |
+++ /dev/null |
124 |
@@ -1,147 +0,0 @@ |
125 |
-/* |
126 |
- * fsck_ext2fs - wrapper for e2fsck on FreeBSD |
127 |
- * Copyright (C) 2004,2006 Matthias Andree <matthias.andree@×××.de> |
128 |
- * redistributable in accordance with the |
129 |
- * GNU General Public License v2 |
130 |
- * |
131 |
- * $FreeBSD: ports/sysutils/e2fsprogs/files/fsck_ext2fs.c,v 1.5 2006/07/04 15:47:51 leeym Exp $ |
132 |
- * |
133 |
- * Upstream: $Id: fsck_ext2fs.c,v 1.6 2006/07/02 11:37:49 emma Exp $ |
134 |
- * |
135 |
- * format: gindent -kr |
136 |
- */ |
137 |
- |
138 |
-#include <sys/types.h> |
139 |
-#include <unistd.h> |
140 |
-#include <stdlib.h> |
141 |
-#include <stdio.h> |
142 |
-#include <string.h> |
143 |
-#include <sys/wait.h> |
144 |
-#include <sys/time.h> |
145 |
-#include <sys/resource.h> |
146 |
-#include <errno.h> |
147 |
- |
148 |
-__attribute__ ((noreturn)) |
149 |
-static int die(const char *tag) |
150 |
-{ |
151 |
- perror(tag); |
152 |
- exit(EXIT_FAILURE); |
153 |
-} |
154 |
- |
155 |
-int main(int argc, char **argv) |
156 |
-{ |
157 |
- int ch, i = 1, force = 0, status, verbose = 0, t; |
158 |
- long block = 0; |
159 |
- enum { normal, preen, yes, no } mode = normal; |
160 |
- char *cmd[256]; |
161 |
- pid_t pid; |
162 |
- |
163 |
- cmd[0] = "/sbin/e2fsck"; |
164 |
- while ((ch = getopt(argc, argv, "BFpfnyb:v")) != -1) { |
165 |
- switch (ch) { |
166 |
- case 'p': |
167 |
- mode = preen; |
168 |
- break; |
169 |
- case 'f': |
170 |
- force = 1; |
171 |
- break; |
172 |
- case 'n': |
173 |
- mode = no; |
174 |
- break; |
175 |
- case 'y': |
176 |
- mode = yes; |
177 |
- break; |
178 |
- case 'b': |
179 |
- block = atol(optarg); |
180 |
- break; |
181 |
- case 'v': |
182 |
- verbose++; |
183 |
- break; |
184 |
- case 'F': |
185 |
- /* e2fsck does not support background checking, |
186 |
- * hence exit with nonzero status to force |
187 |
- * the foreground check. */ |
188 |
- exit(1); |
189 |
- case 'B': |
190 |
- default: |
191 |
- fprintf(stderr, "%s: unknown option -%c\n", |
192 |
- argv[0], optopt); |
193 |
- exit(EXIT_FAILURE); |
194 |
- } |
195 |
- } |
196 |
- |
197 |
- if (force) |
198 |
- cmd[i++] = "-f"; |
199 |
- |
200 |
- switch (mode) { |
201 |
- case normal: |
202 |
- /* FreeBSD needs -f to force a check only in context |
203 |
- * with -p -- so map normal to force to match |
204 |
- * expectations */ |
205 |
- if (!force) |
206 |
- cmd[i++] = "-f"; |
207 |
- break; |
208 |
- case yes: |
209 |
- cmd[i++] = "-y"; |
210 |
- break; |
211 |
- case no: |
212 |
- cmd[i++] = "-n"; |
213 |
- break; |
214 |
- case preen: |
215 |
- cmd[i++] = "-p"; |
216 |
- break; |
217 |
- } |
218 |
- |
219 |
- if (block) { |
220 |
- static char b[30]; |
221 |
- |
222 |
- sprintf(b, "-b %ld", block); |
223 |
- cmd[i++] = b; |
224 |
- } |
225 |
- |
226 |
- /* silently limit verbose to 15 so we don't overflow the cmd array */ |
227 |
- if (verbose > 15) |
228 |
- verbose = 15; |
229 |
- |
230 |
- for (t = verbose; t > 1; t--) |
231 |
- cmd[i++] = "-v"; |
232 |
- |
233 |
- while (optind < argc) { |
234 |
- cmd[i++] = argv[optind++]; |
235 |
- /* sanity check so we don't overflow the cmd buffer */ |
236 |
- if (i+1 == sizeof(cmd)/sizeof(cmd[0])) { |
237 |
- errno = E2BIG; |
238 |
- die(argv[0]); |
239 |
- } |
240 |
- } |
241 |
- |
242 |
- cmd[i++] = 0; |
243 |
- |
244 |
- if (verbose) { |
245 |
- for (i=0; cmd[i]; i++) |
246 |
- fputs(cmd[i], stderr), |
247 |
- fputc(' ', stderr); |
248 |
- fputc('\n', stderr); |
249 |
- } |
250 |
- |
251 |
- pid = fork(); |
252 |
- switch (pid) { |
253 |
- case -1: |
254 |
- /* error */ |
255 |
- die("fork"); |
256 |
- break; |
257 |
- case 0: |
258 |
- /* child */ |
259 |
- (void) execv(cmd[0], cmd); |
260 |
- perror("execve"); |
261 |
- _exit(127); |
262 |
- default: |
263 |
- /* parent */ |
264 |
- if (pid != waitpid(pid, &status, 0)) |
265 |
- die("waitpid"); |
266 |
- if (WIFSIGNALED(status) |
267 |
- || (WIFEXITED(status) && WEXITSTATUS(status) >= 4)) |
268 |
- exit(EXIT_FAILURE); |
269 |
- } |
270 |
- exit(EXIT_SUCCESS); |
271 |
-} |