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:
Sami Kerola 2012-10-02 21:15:16 +01:00 committed by Karel Zak
parent 9f6bd5bdf5
commit 9db6a74905
1 changed files with 2 additions and 1 deletions

View File

@ -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);