mirror of git://git.suckless.org/sbase
prefer swap device option
This commit is contained in:
parent
9938320eea
commit
c41c38649c
5
swapon.c
5
swapon.c
|
@ -10,7 +10,7 @@
|
||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
eprintf("usage: %s [-d] [-a] device\n", argv0);
|
eprintf("usage: %s [-dp] [-a] device\n", argv0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -28,6 +28,9 @@ main(int argc, char *argv[])
|
||||||
case 'd':
|
case 'd':
|
||||||
flags |= SWAP_FLAG_DISCARD;
|
flags |= SWAP_FLAG_DISCARD;
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
flags |= SWAP_FLAG_PREFER;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
} ARGEND;
|
} ARGEND;
|
||||||
|
|
Loading…
Reference in New Issue