summaryrefslogtreecommitdiffstats
path: root/perl
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-06-29 20:24:47 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-06-29 20:25:20 +0100
commitda8ddb2745c3d53c36e3ad7f09836a4c27a4d3e6 (patch)
tree5555f9addd140af8cf2b40c9526d1b1837abdd7f /perl
parent662617ae725c5e41c24128a037060419fbe4b026 (diff)
downloadlibguestfs-da8ddb2745c3d53c36e3ad7f09836a4c27a4d3e6.tar.gz
libguestfs-da8ddb2745c3d53c36e3ad7f09836a4c27a4d3e6.tar.xz
libguestfs-da8ddb2745c3d53c36e3ad7f09836a4c27a4d3e6.zip
Generated code for the 'mkswap*' commands.
Diffstat (limited to 'perl')
-rw-r--r--perl/Guestfs.xs35
-rw-r--r--perl/lib/Sys/Guestfs.pm12
2 files changed, 47 insertions, 0 deletions
diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs
index f19ea1a1..e1da744b 100644
--- a/perl/Guestfs.xs
+++ b/perl/Guestfs.xs
@@ -2843,3 +2843,38 @@ PREINIT:
if (r == -1)
croak ("mount_loop: %s", guestfs_last_error (g));
+void
+mkswap (g, device)
+ guestfs_h *g;
+ char *device;
+PREINIT:
+ int r;
+ PPCODE:
+ r = guestfs_mkswap (g, device);
+ if (r == -1)
+ croak ("mkswap: %s", guestfs_last_error (g));
+
+void
+mkswap_L (g, label, device)
+ guestfs_h *g;
+ char *label;
+ char *device;
+PREINIT:
+ int r;
+ PPCODE:
+ r = guestfs_mkswap_L (g, label, device);
+ if (r == -1)
+ croak ("mkswap_L: %s", guestfs_last_error (g));
+
+void
+mkswap_U (g, uuid, device)
+ guestfs_h *g;
+ char *uuid;
+ char *device;
+PREINIT:
+ int r;
+ PPCODE:
+ r = guestfs_mkswap_U (g, uuid, device);
+ if (r == -1)
+ croak ("mkswap_U: %s", guestfs_last_error (g));
+
diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm
index f0eb6a0f..de16bd0f 100644
--- a/perl/lib/Sys/Guestfs.pm
+++ b/perl/lib/Sys/Guestfs.pm
@@ -943,6 +943,18 @@ This creates a filesystem on C<device> (usually a partition
or LVM logical volume). The filesystem type is C<fstype>, for
example C<ext3>.
+=item $h->mkswap ($device);
+
+Create a swap partition on C<device>.
+
+=item $h->mkswap_L ($label, $device);
+
+Create a swap partition on C<device> with label C<label>.
+
+=item $h->mkswap_U ($uuid, $device);
+
+Create a swap partition on C<device> with UUID C<uuid>.
+
=item $h->mount ($device, $mountpoint);
Mount a guest disk at a position in the filesystem. Block devices