aboutsummaryrefslogtreecommitdiff
path: root/toys/other/swapon.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-11-02 20:07:02 -0500
committerRob Landley <rob@landley.net>2018-11-02 20:07:02 -0500
commit6a73e13d75d31da2c3f1145d8487725f0073a4b8 (patch)
tree17b5bb8b6b5e94b1c93818954cf322a39941a4be /toys/other/swapon.c
parent49e1d8733ebcaf130623c68a2393a3c43702a524 (diff)
downloadtoybox-6a73e13d75d31da2c3f1145d8487725f0073a4b8.tar.gz
Convert more option vars to the new (single letter) coding style.
Diffstat (limited to 'toys/other/swapon.c')
-rw-r--r--toys/other/swapon.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/toys/other/swapon.c b/toys/other/swapon.c
index 0d65040a..2eb5b93c 100644
--- a/toys/other/swapon.c
+++ b/toys/other/swapon.c
@@ -13,13 +13,14 @@ config SWAPON
Enable swapping on a given device/file.
-d Discard freed SSD pages
+ -p Priority (highest priority areas allocated first)
*/
#define FOR_swapon
#include "toys.h"
GLOBALS(
- long priority;
+ long p;
)
void swapon_main(void)
@@ -28,7 +29,7 @@ void swapon_main(void)
int flags = (toys.optflags&FLAG_d)*0x70000;
if (toys.optflags)
- flags |= SWAP_FLAG_PREFER | (TT.priority << SWAP_FLAG_PRIO_SHIFT);
+ flags |= SWAP_FLAG_PREFER | (TT.p << SWAP_FLAG_PRIO_SHIFT);
if (swapon(*toys.optargs, flags))
perror_exit("Couldn't swapon '%s'", *toys.optargs);