summaryrefslogtreecommitdiffstats
path: root/sysutils/e2fsprogs
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2004-03-11 21:51:30 +0000
committerglewis <glewis@FreeBSD.org>2004-03-11 21:51:30 +0000
commit9adfeef103334428cbcffcaf6ada7d0fc8e6fb8c (patch)
tree5cc3f5301fe3512059fc79cf8a730c098c8a3605 /sysutils/e2fsprogs
parent7505682dc63dfb5235056c14125f96102d8e6e6a (diff)
downloadFreeBSD-ports-9adfeef103334428cbcffcaf6ada7d0fc8e6fb8c.zip
FreeBSD-ports-9adfeef103334428cbcffcaf6ada7d0fc8e6fb8c.tar.gz
. Update 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 PR: 64075 Submitted by: Matthias Andree <matthias.andree@gmx.de> (maintainer)
Diffstat (limited to 'sysutils/e2fsprogs')
-rw-r--r--sysutils/e2fsprogs/Makefile4
-rw-r--r--sysutils/e2fsprogs/files/fsck_ext2fs.c24
2 files changed, 23 insertions, 5 deletions
diff --git a/sysutils/e2fsprogs/Makefile b/sysutils/e2fsprogs/Makefile
index 3f95793..772d33d 100644
--- a/sysutils/e2fsprogs/Makefile
+++ b/sysutils/e2fsprogs/Makefile
@@ -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@gmx.de
diff --git a/sysutils/e2fsprogs/files/fsck_ext2fs.c b/sysutils/e2fsprogs/files/fsck_ext2fs.c
index 6cbc7da..a84cc51 100644
--- a/sysutils/e2fsprogs/files/fsck_ext2fs.c
+++ b/sysutils/e2fsprogs/files/fsck_ext2fs.c
@@ -6,7 +6,7 @@
*
* $FreeBSD$
*
- * 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 @@ static int die(const char *tag)
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 @@ int main(int argc, char **argv)
case 'b':
block = atol(optarg);
break;
+ case 'v':
+ verbose++;
+ break;
case 'B':
case 'F':
default:
@@ -67,6 +70,11 @@ int main(int argc, char **argv)
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,11 +94,21 @@ int main(int argc, char **argv)
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) {
case -1:
OpenPOWER on IntegriCloud