int r;
if (!flag)
- r = command (NULL, &err, "/sbin/mkswap", device, NULL);
+ r = command (NULL, &err, "/sbin/mkswap", "-f", device, NULL);
else
- r = command (NULL, &err, "/sbin/mkswap", flag, value, device, NULL);
+ r = command (NULL, &err, "/sbin/mkswap", "-f", flag, value, device, NULL);
if (r == -1) {
reply_with_error ("mkswap: %s", err);
int
do_mkswap (char *device)
{
- IS_DEVICE (device, -1);
-
return mkswap (device, NULL, NULL);
}
int
do_mkswap_L (char *label, char *device)
{
- IS_DEVICE (device, -1);
-
return mkswap (device, "-L", label);
}
int
do_mkswap_U (char *uuid, char *device)
{
- IS_DEVICE (device, -1);
-
return mkswap (device, "-U", uuid);
}
int r;
NEED_ROOT (-1);
- ABS_PATH (path, -1);
+ ABS_PATH (path, return -1);
buf = sysroot_path (path);
if (!buf) {
int
do_swapon_device (char *device)
{
- IS_DEVICE (device, -1);
-
return swaponoff ("/sbin/swapon", NULL, device);
}
int
do_swapoff_device (char *device)
{
- IS_DEVICE (device, -1);
-
return swaponoff ("/sbin/swapoff", NULL, device);
}
int r;
NEED_ROOT (-1);
- ABS_PATH (path, -1);
+ ABS_PATH (path, return -1);
buf = sysroot_path (path);
if (!buf) {
int r;
NEED_ROOT (-1);
- ABS_PATH (path, -1);
+ ABS_PATH (path, return -1);
buf = sysroot_path (path);
if (!buf) {