From fd459e4b6f9555a0e8554b55f419639e8c931262 Mon Sep 17 00:00:00 2001 From: Joris Giovannangeli Date: Sun, 26 Jan 2014 19:14:12 +0100 Subject: [PATCH] swapon(8): Fix wrong constant parameter for function call Reported-by: swildner --- sbin/swapon/swapon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c index f86c4d895d..1ff942dabb 100644 --- a/sbin/swapon/swapon.c +++ b/sbin/swapon/swapon.c @@ -160,7 +160,7 @@ main(int argc, char **argv) usage(); } for (; *argv; ++argv) { - if (swap_on_off(getdevpath(*argv, 0), 0, eflag, 1)) { + if (swap_on_off(getdevpath(*argv, 0), 0, eflag, iflag)) { ret = 1; } else if (orig_prog == SWAPCTL) { printf("%s: %sing %s as swap device\n", @@ -256,6 +256,7 @@ swap_on_off(char *name, int doingall, int trim, int ask) printf("You might loose data. [Y/N]"); int c = fgetc(stdin); + printf("\n"); if (c != 'y' && c != 'Y') return(1); -- 2.41.0