X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=guestfs-actions.pod;h=551b3e32f3b37def172568ec645d8eb280c15be3;hp=310db2e48dced3c94a22f264353f20e9532ea54c;hb=5365ebd501850ea10d9a5b28fc6480ea34dbe16d;hpb=b4d2a01828e5de85e5eee3631f7fe3925a0312ca diff --git a/guestfs-actions.pod b/guestfs-actions.pod index 310db2e..551b3e3 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -283,6 +283,47 @@ yourself (Augeas support makes this relatively easy). This function returns 0 on success or -1 on error. +=head2 guestfs_command + + char *guestfs_command (guestfs_h *handle, + char * const* const arguments); + +This calls runs a command from the guest filesystem. The +filesystem must be mounted, and must contain a compatible +operating system (ie. something Linux, with the same +or compatible processor architecture). + +The single parameter is an argv-style list of arguments. +The first element is the name of the program to run. +Subsequent elements are parameters. The list must be +non-empty (ie. must contain a program name). + +The C<$PATH> environment variable will contain at least +C and C. If you require a program from +another location, you should provide the full path in the +first parameter. + +Shared libraries and data files required by the program +must be available on filesystems which are mounted in the +correct places. It is the caller's responsibility to ensure +all filesystems that are needed are mounted at the right +locations. + +This function returns a string or NULL on error. +I. + +=head2 guestfs_command_lines + + char **guestfs_command_lines (guestfs_h *handle, + char * const* const arguments); + +This is the same as C, but splits the +result into a list of lines. + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + =head2 guestfs_config int guestfs_config (guestfs_h *handle, @@ -312,6 +353,22 @@ See also C, C, C. This function returns a C truth value on success or -1 on error. +=head2 guestfs_file + + char *guestfs_file (guestfs_h *handle, + const char *path); + +This call uses the standard L command to determine +the type or contents of the file. This also works on devices, +for example to find out whether a partition contains a filesystem. + +The exact command which runs is C. Note in +particular that the filename is not prepended to the output +(the C<-b> option). + +This function returns a string or NULL on error. +I. + =head2 guestfs_get_autosync int guestfs_get_autosync (guestfs_h *handle);