diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-04-30 05:55:27 -0400 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-04-30 05:55:27 -0400 |
commit | 91b35746b438240c0b64a22afae630ecbce5e02d (patch) | |
tree | b3d8ef710c0695177c7099a095ba9a38e1bd37d1 /src | |
parent | 10167cea98f93a74abe63f0a54d3a662997e7489 (diff) | |
download | libguestfs-91b35746b438240c0b64a22afae630ecbce5e02d.tar.gz libguestfs-91b35746b438240c0b64a22afae630ecbce5e02d.tar.xz libguestfs-91b35746b438240c0b64a22afae630ecbce5e02d.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/guestfs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/guestfs.c b/src/guestfs.c index 1575d757..b02bdb9d 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. */ |