Exemplo n.º 1
0
int
do_swapoff_label (const char *label)
{
  if (strlen (label) > SWAP_LABEL_MAX) {
    reply_with_error ("%s: Linux swap labels are limited to %d bytes",
                      label, SWAP_LABEL_MAX);
    return -1;
  }

  return swaponoff ("swapoff", "-L", label);
}
Exemplo n.º 2
0
int
do_swapoff_file (const char *path)
{
  CLEANUP_FREE char *buf = NULL;

  buf = sysroot_path (path);
  if (!buf) {
    reply_with_perror ("malloc");
    return -1;
  }

  return swaponoff ("swapoff", NULL, buf);
}
Exemplo n.º 3
0
int
do_swapoff_uuid (const char *uuid)
{
  return swaponoff ("swapoff", "-U", uuid);
}
Exemplo n.º 4
0
int
do_swapoff_device (const char *device)
{
  return swaponoff ("swapoff", NULL, device);
}
Exemplo n.º 5
0
int
do_swapoff_uuid (const char *uuid)
{
  return swaponoff (str_swapoff, "-U", uuid);
}
Exemplo n.º 6
0
int
do_swapon_device (const char *device)
{
  return swaponoff (str_swapon, NULL, device);
}