mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Better error messages for FUSE and other things not supported.
The bare message "FUSE not supported" wasn't actionable.
This commit is contained in:
@@ -109,7 +109,7 @@ do_compressX_out (const char *file, const char *filter, int is_device)
|
||||
#define CHECK_SUPPORTED(prog) \
|
||||
if (!prog_exists (prog)) \
|
||||
/* note: substring "not supported" must appear in this error */ \
|
||||
NOT_SUPPORTED (-1, "compression type %s is not supported", prog);
|
||||
NOT_SUPPORTED (-1, "compression type %s is not supported, because external program '%s' is not available in the appliance", prog, prog);
|
||||
|
||||
static int
|
||||
get_filter (const char *ctype, int level, char *ret, size_t n)
|
||||
|
||||
11
src/fuse.c
11
src/fuse.c
@@ -1476,24 +1476,29 @@ dir_cache_invalidate (guestfs_h *g, const char *path)
|
||||
|
||||
#else /* !HAVE_FUSE */
|
||||
|
||||
#define FUSE_NOT_SUPPORTED() \
|
||||
NOT_SUPPORTED (g, -1, _("FUSE is not supported in this build of " \
|
||||
"libguestfs because libfuse was not found " \
|
||||
"when libguestfs was compiled"))
|
||||
|
||||
int
|
||||
guestfs__mount_local (guestfs_h *g, const char *localmountpoint,
|
||||
const struct guestfs_mount_local_argv *optargs)
|
||||
{
|
||||
NOT_SUPPORTED (g, -1, _("FUSE not supported"));
|
||||
FUSE_NOT_SUPPORTED ();
|
||||
}
|
||||
|
||||
int
|
||||
guestfs__mount_local_run (guestfs_h *g)
|
||||
{
|
||||
NOT_SUPPORTED (g, -1, _("FUSE not supported"));
|
||||
FUSE_NOT_SUPPORTED ();
|
||||
}
|
||||
|
||||
int
|
||||
guestfs__umount_local (guestfs_h *g,
|
||||
const struct guestfs_umount_local_argv *optargs)
|
||||
{
|
||||
NOT_SUPPORTED (g, -1, _("FUSE not supported"));
|
||||
FUSE_NOT_SUPPORTED ();
|
||||
}
|
||||
|
||||
#endif /* !HAVE_FUSE */
|
||||
|
||||
@@ -572,7 +572,7 @@ int
|
||||
guestfs___osinfo_map (guestfs_h *g, const struct guestfs_isoinfo *isoinfo,
|
||||
const struct osinfo **osinfo_ret)
|
||||
{
|
||||
debug (g, "osinfo: libxml2 not available");
|
||||
debug (g, "osinfo: libxml2 not available at compile time");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user