aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Silvers <chs@FreeBSD.org>2020-09-01 18:50:26 +0000
committerChuck Silvers <chs@FreeBSD.org>2020-09-01 18:50:26 +0000
commite83370448fd9023625774e74db472c2bf4485816 (patch)
treeb846a2c225484a98d796ed4153e994aca1224d9d
parentff38047b0c077d354535a4920d1f84bed45d87f0 (diff)
downloadsrc-e83370448fd9023625774e74db472c2bf4485816.tar.gz
src-e83370448fd9023625774e74db472c2bf4485816.zip
Move all of the error prints in readsb() from stderr to stdout.
The only output from fsck that should go to stderr is the usage message. if setup() fails then exit with EEXIT rather than 0. Reviewed by: mckusick Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=365056
-rw-r--r--sbin/fsck_ffs/main.c2
-rw-r--r--sbin/fsck_ffs/setup.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c
index f5d53a14e0ff..6a67bbe3feb1 100644
--- a/sbin/fsck_ffs/main.c
+++ b/sbin/fsck_ffs/main.c
@@ -408,7 +408,7 @@ checkfilesys(char *filesys)
case 0:
if (preen)
pfatal("CAN'T CHECK FILE SYSTEM.");
- return (0);
+ return (EEXIT);
case -1:
clean:
pwarn("clean, %ld free ", (long)(sblock.fs_cstotal.cs_nffree +
diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c
index eb04204127f5..7e169f6d4ceb 100644
--- a/sbin/fsck_ffs/setup.c
+++ b/sbin/fsck_ffs/setup.c
@@ -339,15 +339,15 @@ readsb(int listerr)
return (0);
case ENOENT:
if (bflag)
- fprintf(stderr, "%jd is not a file system "
+ printf("%jd is not a file system "
"superblock\n", super / dev_bsize);
else
- fprintf(stderr, "Cannot find file system "
+ printf("Cannot find file system "
"superblock\n");
return (0);
case EIO:
default:
- fprintf(stderr, "I/O error reading %jd\n",
+ printf("I/O error reading %jd\n",
super / dev_bsize);
return (0);
}