aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Lass <bevan@bi-co.net>2015-03-04 00:42:17 +0100
committerJP Abgrall <jpa@google.com>2015-03-23 10:10:27 -0700
commita16ec08f3e715c0b4f7cf9c0377e6f18173d410d (patch)
treecd3cbfac59b4ee260f7b90fd4362fe1b5d3ceaeb
parent3e2c7b7ed31829c836958b87656b286d9ddfa10c (diff)
downloadf2fs-tools-a16ec08f3e715c0b4f7cf9c0377e6f18173d410d.tar.gz
f2fstat: fix option parsing
On systems using unsigned char as default (char)EOF != EOF. Use int to store returned value of getopt to make it work on all platforms. Signed-off-by: Michael Lass <bevan@bi-co.net> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--tools/f2fstat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/f2fstat.c b/tools/f2fstat.c
index 8643797..7f485b0 100644
--- a/tools/f2fstat.c
+++ b/tools/f2fstat.c
@@ -191,7 +191,7 @@ void usage(void)
void parse_option(int argc, char *argv[], struct options *opt)
{
- char option;
+ int option;
const char *option_string = "d:i:p:h";
while ((option = getopt(argc, argv, option_string)) != EOF) {