Subject: re: port-i386/36952: swapctl(8) doesn't
To: None <gnats-bugs@NetBSD.org>
From: matthew green <mrg@eterna.com.au>
List: netbsd-bugs
Date: 09/19/2007 11:48:46
Apparently, swapctl err's out on first failure. Anwyay, you can use
swapctl -a /dev/sd1b for now.
I propose this patch:
--- swapctl.c 27 Aug 2006 21:07:39 -0000 1.32
+++ swapctl.c 9 Sep 2007 10:18:46 -0000
@@ -469,7 +469,8 @@ add_swap(char *path, int priority)
if (swapctl(SWAP_ON, path, priority) < 0) {
oops:
- err(1, "%s", path);
+ warn("%s", path);
+ return 0;
}
return (1);
}
this patch seems fine to me.