diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-06-29 12:26:11 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-06-29 12:26:11 +0100 |
commit | b2ed0f4c55c2bd3d07341ba2207f0cb238eb4e18 (patch) | |
tree | 1a8afad7895f932501ff806a5dd3bfc9f2ed5f26 /perl | |
parent | 405cf2a5772611ea05cca9fefa843154a9bc64a3 (diff) | |
download | libguestfs-b2ed0f4c55c2bd3d07341ba2207f0cb238eb4e18.tar.gz libguestfs-b2ed0f4c55c2bd3d07341ba2207f0cb238eb4e18.tar.xz libguestfs-b2ed0f4c55c2bd3d07341ba2207f0cb238eb4e18.zip |
Generated code for df / df-h.
Diffstat (limited to 'perl')
-rw-r--r-- | perl/Guestfs.xs | 28 | ||||
-rw-r--r-- | perl/lib/Sys/Guestfs.pm | 17 |
2 files changed, 45 insertions, 0 deletions
diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs index bcd7304f..6980bdac 100644 --- a/perl/Guestfs.xs +++ b/perl/Guestfs.xs @@ -2770,3 +2770,31 @@ PREINIT: } free (lines); +SV * +df (g) + guestfs_h *g; +PREINIT: + char *output; + CODE: + output = guestfs_df (g); + if (output == NULL) + croak ("df: %s", guestfs_last_error (g)); + RETVAL = newSVpv (output, 0); + free (output); + OUTPUT: + RETVAL + +SV * +df_h (g) + guestfs_h *g; +PREINIT: + char *output; + CODE: + output = guestfs_df_h (g); + if (output == NULL) + croak ("df_h: %s", guestfs_last_error (g)); + RETVAL = newSVpv (output, 0); + free (output); + OUTPUT: + RETVAL + diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm index 3d15738a..69ffe8b3 100644 --- a/perl/lib/Sys/Guestfs.pm +++ b/perl/lib/Sys/Guestfs.pm @@ -500,6 +500,23 @@ There is no comprehensive help for this command. You have to look at the file C<daemon/debug.c> in the libguestfs source to find out what you can do. +=item $output = $h->df (); + +This command runs the C<df> command to report disk space used. + +This command is mostly useful for interactive sessions. It +is I<not> intended that you try to parse the output string. +Use C<statvfs> from programs. + +=item $output = $h->df_h (); + +This command runs the C<df -h> command to report disk space used +in human-readable format. + +This command is mostly useful for interactive sessions. It +is I<not> intended that you try to parse the output string. +Use C<statvfs> from programs. + =item $kmsgs = $h->dmesg (); This returns the kernel messages (C<dmesg> output) from |