summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys-utils/swapon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c
index c9cabc140..0490cd0ad 100644
--- a/sys-utils/swapon.c
+++ b/sys-utils/swapon.c
@@ -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);