X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=src%2Fguestfs.c;h=1fa3c0aec3c6d29e9bc88a96c6b035b1ab6e2240;hp=1575d75786e183e74574645e6d5a0573154d2b61;hb=c79ba93f7e53f6a62b5793ba35f1c3b13527eef6;hpb=10167cea98f93a74abe63f0a54d3a662997e7489 diff --git a/src/guestfs.c b/src/guestfs.c index 1575d75..1fa3c0a 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -175,6 +175,13 @@ guestfs_close (guestfs_h *g) return; } + if (g->trace) { + const char trace_msg[] = "close"; + + guestfs___call_callbacks_message (g, GUESTFS_EVENT_TRACE, + trace_msg, strlen (trace_msg)); + } + debug (g, "closing guestfs handle %p (state %d)", g, g->state); /* Try to sync if autosync flag is set. */ @@ -571,6 +578,12 @@ guestfs_get_error_handler (guestfs_h *g, void **data_rtn) return g->error_cb; } +void +guestfs_user_cancel (guestfs_h *g) +{ + g->user_cancel = 1; +} + int guestfs__set_verbose (guestfs_h *g, int v) { @@ -794,6 +807,19 @@ guestfs__get_attach_method (guestfs_h *g) return ret; } +int +guestfs__set_pgroup (guestfs_h *g, int v) +{ + g->pgroup = !!v; + return 0; +} + +int +guestfs__get_pgroup (guestfs_h *g) +{ + return g->pgroup; +} + /* Note the private data area is allocated lazily, since the vast * majority of callers will never use it. This means g->pda is * likely to be NULL.