From 91b35746b438240c0b64a22afae630ecbce5e02d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 30 Apr 2011 05:55:27 -0400 Subject: [PATCH] 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 --- src/guestfs.c | 7 +++++++ 1 file changed, 7 insertions(+) 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. */ -- 1.8.3.1