X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=perl%2Flib%2FSys%2FGuestfs.pm;h=083a0172cc341b1ef0484340208e4b50008a8d44;hp=69ffe8b3b34a7b2036beb423965ee28cb1010fc5;hb=0884d8bbae6d76a603ec1385ada2938f88981c5c;hpb=b2ed0f4c55c2bd3d07341ba2207f0cb238eb4e18 diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm index 69ffe8b..083a017 100644 --- a/perl/lib/Sys/Guestfs.pm +++ b/perl/lib/Sys/Guestfs.pm @@ -549,6 +549,18 @@ Setting C to 3 should drop everything. This automatically calls L before the operation, so that the maximum guest memory is freed. +=item $sizekb = $h->du ($path); + +This command runs the C command to estimate file space +usage for C. + +C can be a file or a directory. If C is a directory +then the estimate includes the contents of the directory and all +subdirectories (recursively). + +The result is the estimated size in I +(ie. units of 1024 bytes). + =item $h->e2fsck_f ($device); This runs C, ie. runs the ext2/ext3 @@ -668,6 +680,18 @@ C. This returns the ext2/3/4 filesystem UUID of the filesystem on C. +=item $memsize = $h->get_memsize (); + +This gets the memory size in megabytes allocated to the +qemu subprocess. + +If C<$h-Eset_memsize> was not called +on this handle, and if C was not set, +then this returns the compiled-in default value for memsize. + +For more information on the architecture of libguestfs, +see L. + =item $path = $h->get_path (); Return the current search path. @@ -743,6 +767,18 @@ Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. To transfer large files you should use FTP. +=item @filenames = $h->initrd_list ($path); + +This command lists out files contained in an initrd. + +The files are listed without any initial C character. The +files are listed in the order they appear (not necessarily +alphabetical). Directory names are listed as separate items. + +Old Linux kernels (2.4 and earlier) used a compressed ext2 +filesystem as initrd. We I support the newer initramfs +format (compressed cpio files). + =item $busy = $h->is_busy (); This returns true iff this handle is busy processing a command @@ -913,12 +949,52 @@ directory and its contents after use. See also: L +=item $h->mkfifo ($mode, $path); + +This call creates a FIFO (named pipe) called C with +mode C. It is just a convenient wrapper around +C<$h-Emknod>. + =item $h->mkfs ($fstype, $device); This creates a filesystem on C (usually a partition or LVM logical volume). The filesystem type is C, for example C. +=item $h->mknod ($mode, $devmajor, $devminor, $path); + +This call creates block or character special devices, or +named pipes (FIFOs). + +The C parameter should be the mode, using the standard +constants. C and C are the +device major and minor numbers, only used when creating block +and character special devices. + +=item $h->mknod_b ($mode, $devmajor, $devminor, $path); + +This call creates a block device node called C with +mode C and device major/minor C and C. +It is just a convenient wrapper around C<$h-Emknod>. + +=item $h->mknod_c ($mode, $devmajor, $devminor, $path); + +This call creates a char device node called C with +mode C and device major/minor C and C. +It is just a convenient wrapper around C<$h-Emknod>. + +=item $h->mkswap ($device); + +Create a swap partition on C. + +=item $h->mkswap_L ($label, $device); + +Create a swap partition on C with label C