From a88385add653c4fc2592639d72b638f693798091 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 14 Nov 2017 09:39:11 +0000 Subject: [PATCH] fuse: Don't use errno if libfuse fuse_mount fails. libfuse prints errors on stderr and there seems to be no way to change that. It doesn't make any attempt to preserve errno either, so printing an error based on errno is wrong. Thanks: Assaf Gordon. --- lib/fuse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/fuse.c b/lib/fuse.c index de8c4d8f2..fdf7e6179 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -1015,7 +1015,8 @@ guestfs_impl_mount_local (guestfs_h *g, const char *localmountpoint, /* Create the FUSE mountpoint. */ ch = fuse_mount (localmountpoint, &args); if (ch == NULL) { - perrorf (g, _("fuse_mount: %s"), localmountpoint); + error (g, _("fuse_mount failed: %s, see error messages above"), + localmountpoint); fuse_opt_free_args (&args); guestfs_int_free_fuse (g); return -1;