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
This commit is contained in:
parent
ff38047b0c
commit
e83370448f
@ -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 +
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user