[Glibc-bsd-commits] r5441 - in trunk/ufsutils/debian: . patches
rmh at alioth.debian.org
rmh at alioth.debian.org
Sat Feb 22 13:21:21 UTC 2014
Author: rmh
Date: 2014-02-22 13:21:21 +0000 (Sat, 22 Feb 2014)
New Revision: 5441
Added:
trunk/ufsutils/debian/patches/exit_codes.diff
Modified:
trunk/ufsutils/debian/changelog
trunk/ufsutils/debian/patches/series
Log:
Fix fsck.ufs exit codes. (Closes: #355134)
Modified: trunk/ufsutils/debian/changelog
===================================================================
--- trunk/ufsutils/debian/changelog 2014-02-22 13:02:49 UTC (rev 5440)
+++ trunk/ufsutils/debian/changelog 2014-02-22 13:21:21 UTC (rev 5441)
@@ -2,6 +2,7 @@
* 05_wipe_otherfs.patch: Handle DIOCGMEDIASIZE failure gracefully.
(Closes: #737580)
+ * Fix fsck.ufs exit codes. (Closes: #355134)
-- Robert Millan <rmh at debian.org> Sat, 22 Feb 2014 14:02:36 +0100
Added: trunk/ufsutils/debian/patches/exit_codes.diff
===================================================================
--- trunk/ufsutils/debian/patches/exit_codes.diff (rev 0)
+++ trunk/ufsutils/debian/patches/exit_codes.diff 2014-02-22 13:21:21 UTC (rev 5441)
@@ -0,0 +1,59 @@
+
+Try to stick to fsck(8) expectations:
+
+ 0 - No errors.
+ 1 - File system errors corrected.
+ 2 - Reboot is needed.
+ 4 - File system fatal errors left uncorrected.
+ 8 - Operational error.
+ 16 - Usage or syntax error.
+
+--- a/sbin/fsck_ffs/fsck.h
++++ b/sbin/fsck_ffs/fsck.h
+@@ -359,7 +359,7 @@
+ #define ALTERED 0x08
+ #define FOUND 0x10
+
+-#define EEXIT 8 /* Standard error exit. */
++#define EEXIT 4 /* Standard error exit. */
+
+ int flushentry(void);
+ /*
+--- a/sbin/fsck_ffs/main.c
++++ b/sbin/fsck_ffs/main.c
+@@ -253,7 +253,7 @@
+ sblock_init();
+ if (bkgrdcheck) {
+ if ((fsreadfd = open(filesys, O_RDONLY)) < 0 || readsb(0) == 0)
+- exit(3); /* Cannot read superblock */
++ exit(8); /* Cannot read superblock */
+ close(fsreadfd);
+ /* Earlier background failed or journaled */
+ if (sblock.fs_flags & (FS_NEEDSFSCK | FS_SUJ))
+@@ -273,7 +273,7 @@
+ * If file system is gjournaled, check it here.
+ */
+ if ((fsreadfd = open(filesys, O_RDONLY)) < 0 || readsb(0) == 0)
+- exit(3); /* Cannot read superblock */
++ exit(8); /* Cannot read superblock */
+ close(fsreadfd);
+ if ((sblock.fs_flags & FS_GJOURNAL) != 0) {
+ //printf("GJournaled file system detected on %s.\n",
+@@ -406,8 +406,8 @@
+ if (suj_check(filesys) == 0) {
+ printf("\n***** FILE SYSTEM MARKED CLEAN *****\n");
+ if (chkdoreload(mntp) == 0)
+- exit(0);
+- exit(4);
++ exit(1);
++ exit(1);
+ }
+ }
+ printf("** Skipping journal, falling through to full fsck\n\n");
+@@ -654,5 +654,5 @@
+ (void) fprintf(stderr,
+ "usage: %s [-BEFfnpry] [-b block] [-c level] [-m mode] filesystem ...\n",
+ getprogname());
+- exit(1);
++ exit(16);
+ }
Modified: trunk/ufsutils/debian/patches/series
===================================================================
--- trunk/ufsutils/debian/patches/series 2014-02-22 13:02:49 UTC (rev 5440)
+++ trunk/ufsutils/debian/patches/series 2014-02-22 13:21:21 UTC (rev 5441)
@@ -7,5 +7,6 @@
# Other patches that might or might not be mergeable
# Patches that are likely to be Debian-specific
+exit_codes.diff
04_avoid_diocgdelete.patch
makefiles.diff
More information about the Glibc-bsd-commits
mailing list