fsck: Fix parsing of -r

Fix regression introduced by commit 658c089: -r cannot be used as a last
option:

fsck -r /dev/sda1
fsck: invalid argument -r: '/dev/sda1'

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
This commit is contained in:
Stanislav Brabec 2015-04-29 18:49:47 +02:00 committed by Karel Zak
parent 628a4efa27
commit d60d5b74d2
1 changed files with 1 additions and 1 deletions

View File

@ -1525,7 +1525,7 @@ static void parse_argv(int argc, char *argv[])
if (arg[j+1]) { /* -r<fd> */
report_stats_fd = strtou32_or_err(arg+j+1, _("invalid argument -r"));
goto next_arg;
} else if (i+1 < argc && *argv[i+1] != '-') { /* -r <fd> */
} else if (i+1 < argc && *argv[i+1] >= '0' && *argv[i+1] <= '9') { /* -r <fd> */
report_stats_fd = strtou32_or_err(argv[i+1], _("invalid argument -r"));
++i;
goto next_arg;