swapon: check numeric user inputs
Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
9f6bd5bdf5
commit
9db6a74905
|
@ -730,7 +730,8 @@ int main(int argc, char *argv[])
|
|||
usage(stdout);
|
||||
break;
|
||||
case 'p': /* priority */
|
||||
priority = atoi(optarg);
|
||||
priority = strtos16_or_err(optarg,
|
||||
_("failed to parse priority"));
|
||||
break;
|
||||
case 'L':
|
||||
add_label(optarg);
|
||||
|
|
Loading…
Reference in New Issue