diff options
author | Theodore Ts'o <tytso@mit.edu> | 1997-09-16 02:13:52 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 1997-09-16 02:13:52 +0000 |
commit | 00e5433eb5e9f70f485968b809fdcf297d7fe7b9 (patch) | |
tree | 92041cff7a9965385245ac42d3d87a45bdcc3b57 /misc | |
parent | a8859cad8790514cf2c41507aaea1ff3b751b954 (diff) | |
download | e2fsprogs-00e5433eb5e9f70f485968b809fdcf297d7fe7b9.tar.gz |
Many files:
Declare main() to return an int, as required. Make sure main() always
ends with an exit(0). (Some programs weren't doing this, and thus
were returning a random exit value.)
Diffstat (limited to 'misc')
-rw-r--r-- | misc/ChangeLog | 12 | ||||
-rw-r--r-- | misc/badblocks.c | 3 | ||||
-rw-r--r-- | misc/chattr.c | 3 | ||||
-rw-r--r-- | misc/dumpe2fs.c | 2 | ||||
-rw-r--r-- | misc/lsattr.c | 3 | ||||
-rw-r--r-- | misc/mklost+found.c | 2 | ||||
-rw-r--r-- | misc/tune2fs.c | 2 |
7 files changed, 21 insertions, 6 deletions
diff --git a/misc/ChangeLog b/misc/ChangeLog index e98d7565..18a0e7cc 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,15 @@ +Mon Sep 15 22:07:12 1997 Theodore Ts'o <tytso@rsts-11.mit.edu> + + * tune2fs.c (main): + * mklost+found.c (main): + * lsattr.c (main): + * dumpe2fs.c (main): + * chattr.c (main): + * badblocks.c (main): Declare main to return an int, as required. + Make sure main always ends with an exit(0). (Some + programs weren't doing this, and thus were returning a + random exit value.) + Mon Jul 14 15:27:29 1997 Theodore Y. Ts'o <tytso@mit.edu> * e2label.c: New file contributed by Andries Brouwer which diff --git a/misc/badblocks.c b/misc/badblocks.c index aba1d183..26e7ab4b 100644 --- a/misc/badblocks.c +++ b/misc/badblocks.c @@ -260,7 +260,7 @@ static void test_rw (int dev, unsigned long blocks_count, } } -void main (int argc, char ** argv) +int main (int argc, char ** argv) { char c; char * tmp; @@ -346,4 +346,5 @@ void main (int argc, char ** argv) close (dev); if (out != stdout) fclose (out); + exit(0); } diff --git a/misc/chattr.c b/misc/chattr.c index 60379a47..8ea4d035 100644 --- a/misc/chattr.c +++ b/misc/chattr.c @@ -302,7 +302,7 @@ static int chattr_dir_proc (const char * dir_name, struct dirent * de, void * pr return 0; } -void main (int argc, char ** argv) +int main (int argc, char ** argv) { int i, j; int end_arg = 0; @@ -334,4 +334,5 @@ void main (int argc, char ** argv) } for (j = i; j < argc; j++) change_attributes (argv[j]); + exit(0); } diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c index b71900e7..37520cce 100644 --- a/misc/dumpe2fs.c +++ b/misc/dumpe2fs.c @@ -172,7 +172,7 @@ static int i386_byteorder(void) return (*cp == 1); } -void main (int argc, char ** argv) +int main (int argc, char ** argv) { errcode_t retval; ext2_filsys fs; diff --git a/misc/lsattr.c b/misc/lsattr.c index 60d60f0d..17687219 100644 --- a/misc/lsattr.c +++ b/misc/lsattr.c @@ -119,7 +119,7 @@ static int lsattr_dir_proc (const char * dir_name, struct dirent * de, void * pr return 0; } -void main (int argc, char ** argv) +int main (int argc, char ** argv) { char c; int i; @@ -156,4 +156,5 @@ void main (int argc, char ** argv) else for (i = optind; i < argc; i++) lsattr_args (argv[i]); + exit(0); } diff --git a/misc/mklost+found.c b/misc/mklost+found.c index 2a960c45..772e21ee 100644 --- a/misc/mklost+found.c +++ b/misc/mklost+found.c @@ -27,7 +27,7 @@ #define LPF "lost+found" -void main (int argc, char ** argv) +int main (int argc, char ** argv) { char name [EXT2_NAME_LEN]; char path [sizeof (LPF) + 1 + 256]; diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 2cd43a63..97340d9b 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -101,7 +101,7 @@ static volatile void usage (void) exit (1); } -void main (int argc, char ** argv) +int main (int argc, char ** argv) { char c; char * tmp; |