Whamcloud - gitweb
e2fsck: use com_err error codes instead of EBADMSG and EUCLEAN
authorTheodore Ts'o <tytso@mit.edu>
Sat, 21 May 2016 17:43:09 +0000 (13:43 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 21 May 2016 17:44:41 +0000 (13:44 -0400)
Some operating systems may not define EBADMSG and EUCLEAN, so for
better portability use our own private error code numbers.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/jfs_user.h
lib/ext2fs/ext2_err.et.in

index f46bb1e..16185a5 100644 (file)
@@ -182,10 +182,10 @@ extern e2fsck_t e2fsck_global_ctx;  /* Try your very best not to use this! */
 #endif /* DEBUGFS */
 
 #ifndef EFSBADCRC
-#define EFSBADCRC      EBADMSG         /* Bad CRC detected */
+#define EFSBADCRC      EXT2_ET_BAD_CRC
 #endif
 #ifndef EFSCORRUPTED
-#define EFSCORRUPTED   EUCLEAN         /* Filesystem is corrupted */
+#define EFSCORRUPTED   EXT2_ET_FILESYSTEM_CORRUPTED
 #endif
 
 /* recovery.c */
index 894789e..464c01f 100644 (file)
@@ -530,4 +530,10 @@ ec EXT2_ET_UNDO_FILE_CORRUPT,
 ec     EXT2_ET_UNDO_FILE_WRONG,
        "Wrong undo file for this filesystem"
 
+ec     EXT2_ET_FILESYSTEM_CORRUPTED,
+       "File system is corrupted"
+
+ec     EXT2_ET_BAD_CRC,
+       "Bad CRC detected in file system"
+
        end