From 519149fb458b0fa69c10fecd83fae42e838cf01d Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 25 Oct 1997 03:49:49 +0000 Subject: [PATCH] Many files: fsck.c: chattr.c: Remove #include of getopt.h, since it's not needed. tune2fs.c (main): lsattr.c (main): badblocks.c (main): dumpe2fs.c (main): mke2fs.c (PRS): Make the variable which getopt returns into be an int, so that it won't lose on platforms where char is unsigned. ChangeLog, unix.c: Make the variable which getopt returns into be an int, so that it won't lose on platforms where char is unsigned. --- e2fsck/ChangeLog | 4 ++++ e2fsck/unix.c | 2 +- misc/ChangeLog | 13 +++++++++++++ misc/badblocks.c | 2 +- misc/chattr.c | 3 --- misc/dumpe2fs.c | 2 +- misc/fsck.c | 3 --- misc/lsattr.c | 2 +- misc/mke2fs.c | 2 +- misc/tune2fs.c | 2 +- 10 files changed, 23 insertions(+), 12 deletions(-) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 847007a..260e981 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,5 +1,9 @@ Fri Oct 24 00:12:39 1997 Theodore Ts'o + * unix.c (PRS): Make the variable which getopt returns into be + an int, so that it won't lose on platforms where char is + unsigned. + * pass1b.c (clone_file): Fix bug in error reporting in the case where cs.errcode is non-zero. diff --git a/e2fsck/unix.c b/e2fsck/unix.c index 1125670..9868e36 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -236,7 +236,7 @@ static void check_if_skip(e2fsck_t ctx) static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx) { int flush = 0; - char c; + int c; #ifdef MTRACE extern void *mallwatch; #endif diff --git a/misc/ChangeLog b/misc/ChangeLog index 05f8102..859ebc6 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,16 @@ +Fri Oct 24 23:37:52 1997 Theodore Ts'o + + * fsck.c: + * chattr.c: Remove #include of getopt.h, since it's not needed. + + * tune2fs.c (main): + * lsattr.c (main): + * badblocks.c (main): + * dumpe2fs.c (main): + * mke2fs.c (PRS): Make the variable which getopt returns into be + an int, so that it won't lose on platforms where char is + unsigned. + Fri Oct 3 13:38:45 1997 Theodore Ts'o * mke2fs.c (parse_raid_opts): Make parse_raid_opts return a void, diff --git a/misc/badblocks.c b/misc/badblocks.c index ee81ee3..81dc891 100644 --- a/misc/badblocks.c +++ b/misc/badblocks.c @@ -262,7 +262,7 @@ static void test_rw (int dev, unsigned long blocks_count, int main (int argc, char ** argv) { - char c; + int c; char * tmp; char * device_name; char * output_file = NULL; diff --git a/misc/chattr.c b/misc/chattr.c index 8ea4d03..7f40f88 100644 --- a/misc/chattr.c +++ b/misc/chattr.c @@ -19,9 +19,6 @@ #include #include #include -#ifdef HAVE_GETOPT_H -#include -#endif #include #include #include diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c index 37520cc..e8c6b8d 100644 --- a/misc/dumpe2fs.c +++ b/misc/dumpe2fs.c @@ -178,7 +178,7 @@ int main (int argc, char ** argv) ext2_filsys fs; int print_badblocks = 0; int big_endian; - char c; + int c; initialize_ext2_error_table(); fprintf (stderr, "dumpe2fs %s, %s for EXT2 FS %s, %s\n", diff --git a/misc/fsck.c b/misc/fsck.c index 93e8737..ec0c486 100644 --- a/misc/fsck.c +++ b/misc/fsck.c @@ -49,9 +49,6 @@ #include #endif #include -#ifdef HAVE_GETOPT_H -#include -#endif #include "../version.h" #include "fsck.h" diff --git a/misc/lsattr.c b/misc/lsattr.c index 1768721..839df0f 100644 --- a/misc/lsattr.c +++ b/misc/lsattr.c @@ -121,7 +121,7 @@ static int lsattr_dir_proc (const char * dir_name, struct dirent * de, void * pr int main (int argc, char ** argv) { - char c; + int c; int i; fprintf (stderr, "lsattr %s, %s for EXT2 FS %s, %s\n", diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 0b5e070..81a0262 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -593,7 +593,7 @@ static void parse_raid_opts(const char *opts) static void PRS(int argc, char *argv[]) { - char c; + int c; int size; char * tmp; blk_t max = 8192; diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 97340d9..4ecaa61 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -103,7 +103,7 @@ static volatile void usage (void) int main (int argc, char ** argv) { - char c; + int c; char * tmp; errcode_t retval; ext2_filsys fs; -- 1.8.3.1