コード例 #1
0
ファイル: swap.c プロジェクト: libguestfs/libguestfs
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);
}
コード例 #2
0
ファイル: swap.c プロジェクト: libguestfs/libguestfs
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);
}
コード例 #3
0
ファイル: swap.c プロジェクト: libguestfs/libguestfs
int
do_swapoff_uuid (const char *uuid)
{
  return swaponoff ("swapoff", "-U", uuid);
}
コード例 #4
0
ファイル: swap.c プロジェクト: libguestfs/libguestfs
int
do_swapoff_device (const char *device)
{
  return swaponoff ("swapoff", NULL, device);
}
コード例 #5
0
ファイル: swap.c プロジェクト: AlphaStaxLLC/libguestfs
int
do_swapoff_uuid (const char *uuid)
{
  return swaponoff (str_swapoff, "-U", uuid);
}
コード例 #6
0
ファイル: swap.c プロジェクト: AlphaStaxLLC/libguestfs
int
do_swapon_device (const char *device)
{
  return swaponoff (str_swapon, NULL, device);
}