From: Stelian Pop Date: Thu, 19 Jul 2001 09:49:35 +0000 (+0000) Subject: Pretty printing when excluding inodes. X-Git-Tag: release_0_4b23~3 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=54ec08c6ea42e9189423def508c5119f33466db2;p=dump.git Pretty printing when excluding inodes. --- diff --git a/dump/dump.h b/dump/dump.h index 825a7fc..1f4ab9e 100644 --- a/dump/dump.h +++ b/dump/dump.h @@ -5,7 +5,7 @@ * Stelian Pop , 1999-2000 * Stelian Pop - AlcĂ´ve , 2000 * - * $Id: dump.h,v 1.27 2001/07/19 09:03:44 stelian Exp $ + * $Id: dump.h,v 1.28 2001/07/19 09:49:35 stelian Exp $ */ /*- @@ -188,7 +188,7 @@ int rmtioctl __P((int cmd, int count)); void interrupt __P((int signo)); /* in case operator bangs on console */ int exclude_ino __P((dump_ino_t ino)); -void do_exclude_ino __P((dump_ino_t ino)); +void do_exclude_ino __P((dump_ino_t ino, const char *)); /* * Exit status codes diff --git a/dump/main.c b/dump/main.c index 2ee429a..d7462c8 100644 --- a/dump/main.c +++ b/dump/main.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.53 2001/07/19 09:03:44 stelian Exp $"; + "$Id: main.c,v 1.54 2001/07/19 09:49:35 stelian Exp $"; #endif /* not lint */ #include @@ -1064,7 +1064,7 @@ exclude_ino(dump_ino_t ino) * This tests adds an inode to the exclusion list if it isn't already there */ void -do_exclude_ino(dump_ino_t ino) +do_exclude_ino(dump_ino_t ino, const char *reason) { if (!exclude_ino(ino)) { if (iexclude_num == IEXCLUDE_MAXNUM) { @@ -1072,7 +1072,11 @@ do_exclude_ino(dump_ino_t ino) msg("The ENTIRE dump is aborted.\n"); exit(X_STARTUP); } - msg("Added inode %u to exclude list\n", ino); + if (reason) + msg("Added inode %u to exclude list (%s)\n", + ino, reason); + else + msg("Added inode %u to exclude list\n", ino); iexclude_list[iexclude_num++] = ino; } } @@ -1088,7 +1092,7 @@ do_exclude_ino_str(char * ino) { msg("The ENTIRE dump is aborted.\n"); exit(X_STARTUP); } - do_exclude_ino(inod); + do_exclude_ino(inod, NULL); } /* diff --git a/dump/traverse.c b/dump/traverse.c index 2a160fa..a8ca3a4 100644 --- a/dump/traverse.c +++ b/dump/traverse.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: traverse.c,v 1.36 2001/07/19 09:03:44 stelian Exp $"; + "$Id: traverse.c,v 1.37 2001/07/19 09:49:35 stelian Exp $"; #endif /* not lint */ #include @@ -159,12 +159,9 @@ int dump_fs_open(const char *disk, ext2_filsys *fs) else { if (es->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL && - journal_ino) { - msg("Exclude journal inode %u\n", - journal_ino); - do_exclude_ino(journal_ino); - } - do_exclude_ino(EXT2_RESIZE_INO); + journal_ino) + do_exclude_ino(journal_ino, "journal inode"); + do_exclude_ino(EXT2_RESIZE_INO, "resize inode"); } } return retval;