diff options
author | Jürg Billeter <j@bitron.ch> | 2006-01-03 18:06:23 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2006-01-03 12:21:53 -0800 |
commit | 040dac1752a5c3728fc4abbb2217ecd9c011aae3 (patch) | |
tree | c15141dd543dca18d2e39c97fa4c62f729e1dc5c | |
parent | 49ab561194c19b980850c8f46973b317ea6e4857 (diff) | |
download | klibc-040dac1752a5c3728fc4abbb2217ecd9c011aae3.tar.gz |
Fix fstype crashklibc-1.1.15
fstype is currently broken in klibc (1.1.14 and git). It segfaults on
startup when not invoked with an argument.
Attached patch fixes that.
PS: The previously reported problems with klibc 1.1.8 don't occur
anymore, thanks.
Regards,
Jürg
--
Jürg Billeter <j@bitron.ch>
-rw-r--r-- | utils/fstype.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/fstype.c b/utils/fstype.c index e9cdf285838f8..549e1e010c386 100644 --- a/utils/fstype.c +++ b/utils/fstype.c @@ -225,12 +225,12 @@ int main(int argc, char *argv[]) progname = argv[0]; - if (argc >= 2) { + if (argc > 2) { fprintf(stderr, "Usage: %s [file]\n", progname); return 1; } - if (argc >= 1 && strcmp(argv[1], "-")) { + if (argc > 1 && strcmp(argv[1], "-")) { fd = open(argv[1], O_RDONLY); if ( fd < 0 ) { perror(argv[1]); |