summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-04-16 13:30:07 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-04-16 13:30:07 +0100
commit63cb25236b1d9b81f3732eddb5040e475a1e952a (patch)
tree9033aa01a13cb784a1f16bb9828ba15805cae7c1
parent6c2b8340c355d0db7b3282833c84e5ea58bfb643 (diff)
downloadlibguestfs-63cb25236b1d9b81f3732eddb5040e475a1e952a.tar.gz
libguestfs-63cb25236b1d9b81f3732eddb5040e475a1e952a.tar.xz
libguestfs-63cb25236b1d9b81f3732eddb5040e475a1e952a.zip
fuse: Improve reporting in mount-local when verbose is enabled.
-rw-r--r--src/fuse.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/fuse.c b/src/fuse.c
index 29232627..2bd6787f 100644
--- a/src/fuse.c
+++ b/src/fuse.c
@@ -610,9 +610,6 @@ mount_local_read (const char *path, char *buf, size_t size, off_t offset,
char *r;
size_t rsize;
- debug (g,
- "mount_local_read: %s: size %zu offset %ju\n", path, size, offset);
-
/* The guestfs protocol limits size to somewhere over 2MB. We just
* reduce the requested size here accordingly and push the problem
* up to every user. http://www.jwz.org/doc/worse-is-better.html
@@ -962,6 +959,8 @@ guestfs__mount_local (guestfs_h *g, const char *localmountpoint,
goto arg_error;
}
+ debug (g, "%s: fuse_mount %s", __func__, localmountpoint);
+
/* Create the FUSE mountpoint. */
ch = fuse_mount (localmountpoint, &args);
if (ch == NULL) {
@@ -976,6 +975,8 @@ guestfs__mount_local (guestfs_h *g, const char *localmountpoint,
if (fd >= 0)
set_cloexec_flag (fd, 1);
+ debug (g, "%s: fuse_new", __func__);
+
/* Create the FUSE handle. */
g->fuse = fuse_new (ch, &args,
&mount_local_operations, sizeof mount_local_operations,
@@ -990,6 +991,8 @@ guestfs__mount_local (guestfs_h *g, const char *localmountpoint,
fuse_opt_free_args (&args);
+ debug (g, "%s: leaving fuse_mount_local", __func__);
+
/* Set g->localmountpoint in the handle. */
gl_lock_lock (mount_local_lock);
g->localmountpoint = localmountpoint;
@@ -1012,11 +1015,15 @@ guestfs__mount_local_run (guestfs_h *g)
return -1;
}
+ debug (g, "%s: entering fuse_loop", __func__);
+
/* Enter the main loop. */
r = fuse_loop (g->fuse);
if (r != 0)
perrorf (g, _("fuse_loop: %s"), g->localmountpoint);
+ debug (g, "%s: leaving fuse_loop", __func__);
+
guestfs___free_fuse (g);
gl_lock_lock (mount_local_lock);
g->localmountpoint = NULL;