New APIs: set-program, get-program.

These set or get the program name in the handle.  Most programs
will never need to call this, since we set this, if possible,
using the glibc 'program_invocation_short_name(3)' feature.
This commit is contained in:
Richard W.M. Jones
2013-04-11 12:19:00 +01:00
parent 1a06ac25f5
commit f2b90b374f
5 changed files with 65 additions and 1 deletions

View File

@@ -256,6 +256,7 @@ main (int argc, char *argv[])
printf ("guestfs_get_network: %d\n", guestfs_get_network (g));
printf ("guestfs_get_path: %s\n", guestfs_get_path (g) ? : "(null)");
printf ("guestfs_get_pgroup: %d\n", guestfs_get_pgroup (g));
printf ("guestfs_get_program: %s\n", guestfs_get_program (g));
printf ("guestfs_get_qemu: %s\n", guestfs_get_qemu (g));
printf ("guestfs_get_recovery_proc: %d\n", guestfs_get_recovery_proc (g));
printf ("guestfs_get_selinux: %d\n", guestfs_get_selinux (g));