diff -r -u hurd-20010718.orig/ext2fs/ext2fs.c hurd-20010718/ext2fs/ext2fs.c --- hurd-20010718.orig/ext2fs/ext2fs.c Mon Jan 8 16:27:01 2001 +++ hurd-20010718/ext2fs/ext2fs.c Fri Aug 3 23:45:26 2001 @@ -71,6 +71,7 @@ }, {"sblock", 'S', "BLOCKNO", 0, "Use alternate superblock location (1kb blocks)"}, + {"hurd-warnings", 'H', 0, 0, "Enable HURD-specific warnings"}, {0} }; @@ -99,6 +100,9 @@ return EINVAL; } break; + case 'H': + _hurd_warnings = ENABLED; + break; case ARGP_KEY_INIT: state->child_inputs[0] = state->input; @@ -166,6 +170,9 @@ { error_t err; mach_port_t bootstrap; + + /* Initialize hurd specific features. */ + _hurd_warnings = DISABLED; /* Initialize the diskfs library, parse arguments, and open the store. This starts the first diskfs thread for us. */ diff -r -u hurd-20010718.orig/ext2fs/ext2fs.h hurd-20010718/ext2fs/ext2fs.h --- hurd-20010718.orig/ext2fs/ext2fs.h Sun Oct 3 05:23:26 1999 +++ hurd-20010718/ext2fs/ext2fs.h Fri Aug 3 23:44:54 2001 @@ -443,3 +443,10 @@ extern void ext2_warning (const char *, ...) __attribute__ ((format (printf, 1, 2))); + +/* ---------------------------------------------------------------- */ +/* hurd specific features */ + +#define DISABLED 0 +#define ENABLED 1 +int _hurd_warnings; diff -r -u hurd-20010718.orig/ext2fs/ialloc.c hurd-20010718/ext2fs/ialloc.c --- hurd-20010718.orig/ext2fs/ialloc.c Sun Mar 12 12:01:40 2000 +++ hurd-20010718/ext2fs/ialloc.c Sat Aug 4 01:26:18 2001 @@ -291,7 +291,7 @@ if (st->st_blocks) { - if (sblock->s_creator_os == EXT2_OS_HURD) + if (sblock->s_creator_os == EXT2_OS_HURD && _hurd_warnings == ENABLED) ext2_warning ("Free inode %d had %ld blocks", inum, st->st_blocks); st->st_blocks = 0; np->dn_set_ctime = 1; @@ -306,7 +306,7 @@ st->st_mode &= ~S_IPTRANS; if (np->allocsize) { - if (sblock->s_creator_os == EXT2_OS_HURD) + if (sblock->s_creator_os == EXT2_OS_HURD && _hurd_warnings == ENABLED) ext2_warning ("Free inode %d had a size of %ld", inum, st->st_size); st->st_size = 0; np->allocsize = 0;