From: Richard W.M. Jones Date: Sat, 30 Apr 2011 09:55:27 +0000 (-0400) Subject: Add a trace message to guestfs_close. X-Git-Tag: 1.11.4~15 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=91b35746b438240c0b64a22afae630ecbce5e02d;p=libguestfs.git Add a trace message to guestfs_close. Only the "first half" (ie. the call) is traced, because by the time the function returns the handle has gone and there's no way to generate events. You should see: libguestfs: trace: close --- diff --git a/src/guestfs.c b/src/guestfs.c index 1575d75..b02bdb9 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. */