ports/64075: [MAINTAINER] sysutils/e2fsprogs: update fsck_ext2fs wrapper
Matthias Andree
matthias.andree at gmx.de
Thu Mar 11 00:50:23 UTC 2004
>Number: 64075
>Category: ports
>Synopsis: [MAINTAINER] sysutils/e2fsprogs: update fsck_ext2fs wrapper
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Wed Mar 10 16:50:23 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Matthias Andree
>Release: FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD sigma.emma.line.org 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Wed Mar 10 22:29:45 CET 2004
>Description:
- updates the fsck_ext2fs wrapper so that it passes -f down the e2fsck
if it's run without option, so that fsck_ext2fs behaviour matches
fsck_ufs behaviour with respect to "check without -f option".
- add -v for verbose mode, note that fsck doesn't appear to propagate
-v options down, this will only be effective when fsck_ext2fs is run
directly.
- switch SOURCEFORGE MASTER_SITES to _EXTENDED variant
Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:
--- e2fsprogs-1.35_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/e2fsprogs/Makefile /usr/home/emma/e2fsprogs/Makefile
--- /usr/ports/sysutils/e2fsprogs/Makefile Wed Mar 10 22:13:25 2004
+++ /usr/home/emma/e2fsprogs/Makefile Thu Mar 11 01:32:05 2004
@@ -7,9 +7,9 @@
PORTNAME= e2fsprogs
PORTVERSION= 1.35
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= matthias.andree at gmx.de
diff -ruN --exclude=CVS /usr/ports/sysutils/e2fsprogs/files/fsck_ext2fs.c /usr/home/emma/e2fsprogs/files/fsck_ext2fs.c
--- /usr/ports/sysutils/e2fsprogs/files/fsck_ext2fs.c Wed Mar 10 22:13:25 2004
+++ /usr/home/emma/e2fsprogs/files/fsck_ext2fs.c Thu Mar 11 01:30:43 2004
@@ -4,9 +4,9 @@
* redistributable in accordance with the
* GNU General Public License v2
*
* $FreeBSD: ports/sysutils/e2fsprogs/files/fsck_ext2fs.c,v 1.2 2004/02/24 21:55:22 krion Exp $
*
- * Upstream: $Id: fsck_ext2fs.c,v 1.2 2004/02/24 20:57:02 emma Exp $
+ * Upstream: $Id: fsck_ext2fs.c,v 1.3 2004/03/09 01:10:22 emma Exp $
*
* format: gindent -kr
*/
@@ -29,14 +29,14 @@
int main(int argc, char **argv)
{
- int ch, i = 1, force = 0, status;
+ int ch, i = 1, force = 0, status, verbose = 0, t;
long block = 0;
enum { normal, preen, yes, no } mode = normal;
char *cmd[256];
pid_t pid;
cmd[0] = "/sbin/e2fsck";
- while ((ch = getopt(argc, argv, "BFpfnyb:")) != -1) {
+ while ((ch = getopt(argc, argv, "BFpfnyb:v")) != -1) {
switch (ch) {
case 'p':
mode = preen;
@@ -53,6 +53,9 @@
case 'b':
block = atol(optarg);
break;
+ case 'v':
+ verbose++;
+ break;
case 'B':
case 'F':
default:
@@ -67,6 +70,11 @@
switch (mode) {
case normal:
+ /* FreeBSD needs -f to force a check only in context
+ * with -p -- so map normal to force to match
+ * expectations */
+ if (!force)
+ cmd[i++] = "-f";
break;
case yes:
cmd[i++] = "-y";
@@ -86,10 +94,20 @@
cmd[i++] = b;
}
+ for (t = verbose; t > 1; t--)
+ cmd[i++] = "-v";
+
while (optind < argc)
cmd[i++] = argv[optind++];
cmd[i++] = 0;
+
+ if (verbose) {
+ for (i=0; cmd[i]; i++)
+ fputs(cmd[i], stderr),
+ fputc(' ', stderr);
+ fputc('\n', stderr);
+ }
pid = fork();
switch (pid) {
--- e2fsprogs-1.35_2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list