Author: chs Date: Tue Sep 1 18:50:26 2020 New Revision: 365056 URL: https://svnweb.freebsd.org/changeset/base/365056
Log: 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 Modified: head/sbin/fsck_ffs/main.c head/sbin/fsck_ffs/setup.c Modified: head/sbin/fsck_ffs/main.c ============================================================================== --- head/sbin/fsck_ffs/main.c Tue Sep 1 16:20:42 2020 (r365055) +++ head/sbin/fsck_ffs/main.c Tue Sep 1 18:50:26 2020 (r365056) @@ -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 + Modified: head/sbin/fsck_ffs/setup.c ============================================================================== --- head/sbin/fsck_ffs/setup.c Tue Sep 1 16:20:42 2020 (r365055) +++ head/sbin/fsck_ffs/setup.c Tue Sep 1 18:50:26 2020 (r365056) @@ -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); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"