summaryrefslogtreecommitdiffstats
path: root/perl
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-06-30 11:17:06 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-06-30 13:10:44 +0100
commitf68b3ac861ae607a333211c775dded82ae2b2c4a (patch)
tree03dfee58ccfd723bcbc9dc6c6d7270629ae4489d /perl
parent3d15f7e652340777514ff30c3cfc560a90b612ec (diff)
downloadlibguestfs-f68b3ac861ae607a333211c775dded82ae2b2c4a.tar.gz
libguestfs-f68b3ac861ae607a333211c775dded82ae2b2c4a.tar.xz
libguestfs-f68b3ac861ae607a333211c775dded82ae2b2c4a.zip
Generated code for 'set_memsize'/'get_memsize' calls.
Diffstat (limited to 'perl')
-rw-r--r--perl/Guestfs.xs24
-rw-r--r--perl/lib/Sys/Guestfs.pm25
2 files changed, 49 insertions, 0 deletions
diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs
index e1da744b..9c8b4595 100644
--- a/perl/Guestfs.xs
+++ b/perl/Guestfs.xs
@@ -962,6 +962,30 @@ PREINIT:
croak ("end_busy: %s", guestfs_last_error (g));
void
+set_memsize (g, memsize)
+ guestfs_h *g;
+ int memsize;
+PREINIT:
+ int r;
+ PPCODE:
+ r = guestfs_set_memsize (g, memsize);
+ if (r == -1)
+ croak ("set_memsize: %s", guestfs_last_error (g));
+
+SV *
+get_memsize (g)
+ guestfs_h *g;
+PREINIT:
+ int memsize;
+ CODE:
+ memsize = guestfs_get_memsize (g);
+ if (memsize == -1)
+ croak ("get_memsize: %s", guestfs_last_error (g));
+ RETVAL = newSViv (memsize);
+ OUTPUT:
+ RETVAL
+
+void
mount (g, device, mountpoint)
guestfs_h *g;
char *device;
diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm
index de16bd0f..5f8cef41 100644
--- a/perl/lib/Sys/Guestfs.pm
+++ b/perl/lib/Sys/Guestfs.pm
@@ -680,6 +680,18 @@ C<device>.
This returns the ext2/3/4 filesystem UUID of the filesystem on
C<device>.
+=item $memsize = $h->get_memsize ();
+
+This gets the memory size in megabytes allocated to the
+qemu subprocess.
+
+If C<$h-E<gt>set_memsize> was not called
+on this handle, and if C<LIBGUESTFS_MEMSIZE> was not set,
+then this returns the compiled-in default value for memsize.
+
+For more information on the architecture of libguestfs,
+see L<guestfs(3)>.
+
=item $path = $h->get_path ();
Return the current search path.
@@ -1181,6 +1193,19 @@ L<tune2fs(8)> manpage.
You can use either C<$h-E<gt>tune2fs_l> or C<$h-E<gt>get_e2uuid>
to return the existing UUID of a filesystem.
+=item $h->set_memsize ($memsize);
+
+This sets the memory size in megabytes allocated to the
+qemu subprocess. This only has any effect if called before
+C<$h-E<gt>launch>.
+
+You can also change this by setting the environment
+variable C<LIBGUESTFS_MEMSIZE> before the handle is
+created.
+
+For more information on the architecture of libguestfs,
+see L<guestfs(3)>.
+
=item $h->set_path ($path);
Set the path that libguestfs searches for kernel and initrd.img.