summaryrefslogtreecommitdiffstats
path: root/src/guestfs-internal.h
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-10-15 11:14:59 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-10-15 15:04:43 +0100
commit9466060201600db47016133d80af22eb38091a49 (patch)
treed3784e6936c9c6a5e62190eaeb67e91d3a78506b /src/guestfs-internal.h
parent389cb608df19b80323214eefad464a7ebfb7f235 (diff)
downloadlibguestfs-9466060201600db47016133d80af22eb38091a49.tar.gz
libguestfs-9466060201600db47016133d80af22eb38091a49.tar.xz
libguestfs-9466060201600db47016133d80af22eb38091a49.zip
New APIs: guestfs_create_flags, guestfs_parse_environment,
guestfs_parse_environment_list. Add a new function for creating a handle: guestfs_h *guestfs_create_flags (unsigned flags [, ...]); This variant lets you supply flags and extra arguments, although extra arguments are not used at the moment. Of particular interest is the ability to separate the creation of the handle from the parsing of environment variables like LIBGUESTFS_DEBUG. guestfs_create does both together, which prevents us from propagating errors from parsing environment variables back to the caller (guestfs_create has always printed any errors on stderr and then just ignored them). If you are interested in these errors, you can now write: g = guestfs_create_flags (GUESTFS_CREATE_NO_ENVIRONMENT); if (!g) exit (EXIT_FAILURE); r = guestfs_parse_environment (g); if (!r) exit (EXIT_FAILURE); Also you can *omit* the call to guestfs_parse_environment, which creates a handle unaffected by the environment (which was not possible before). This commit also includes new (backwards compatible) changes to the OCaml, Perl, Python, Ruby and Java constructors that let you use the flags.
Diffstat (limited to 'src/guestfs-internal.h')
-rw-r--r--src/guestfs-internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index 80906133..90954f18 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -193,6 +193,7 @@ struct guestfs_h
bool enable_network; /* Enable the network. */
bool selinux; /* selinux enabled? */
bool pgroup; /* Create process group for children? */
+ bool close_on_exit; /* Is this handle on the atexit list? */
int smp; /* If > 1, -smp flag passed to qemu. */
int memsize; /* Size of RAM (megabytes). */