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.
This commit is contained in:
Richard W.M. Jones
2017-11-14 09:39:11 +00:00
parent 7e3689bfe0
commit a88385add6

View File

@@ -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;