diff options
Diffstat (limited to 'src/guestfs.c')
-rw-r--r-- | src/guestfs.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/guestfs.c b/src/guestfs.c index 571205f2..98d99b84 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -170,6 +170,7 @@ struct guestfs_h int cmdline_size; int verbose; + int trace; int autosync; char *path; /* Path to kernel, initrd. */ @@ -238,6 +239,9 @@ guestfs_create (void) str = getenv ("LIBGUESTFS_DEBUG"); g->verbose = str != NULL && strcmp (str, "1") == 0; + str = getenv ("LIBGUESTFS_TRACE"); + g->trace = str != NULL && strcmp (str, "1") == 0; + str = getenv ("LIBGUESTFS_PATH"); g->path = str != NULL ? strdup (str) : strdup (GUESTFS_DEFAULT_PATH); if (!g->path) goto error; @@ -734,6 +738,19 @@ guestfs__version (guestfs_h *g) return r; } +int +guestfs__set_trace (guestfs_h *g, int t) +{ + g->trace = !!t; + return 0; +} + +int +guestfs__get_trace (guestfs_h *g) +{ + return g->trace; +} + /* Add a string to the current command line. */ static void incr_cmdline_size (guestfs_h *g) |