diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-12-14 08:44:41 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-03-29 16:45:01 +0100 |
commit | c6f09fac0666260587f95bdfee3c20c9166dae94 (patch) | |
tree | 25b1b6493697034120508518dcfcbc6d34417156 /src/guestfs-internal.h | |
parent | 49fdba0ae98b5b6995ccaf0f0ba4f542bfff7ce3 (diff) | |
download | libguestfs-c6f09fac0666260587f95bdfee3c20c9166dae94.tar.gz libguestfs-c6f09fac0666260587f95bdfee3c20c9166dae94.tar.xz libguestfs-c6f09fac0666260587f95bdfee3c20c9166dae94.zip |
New APIs: mount-local, mount-local-run, umount-local (FUSE support in the API).
Add FUSE support directly to the API. Instead of needing to use the
external 'guestmount' command, you can mount the libguestfs filesystem
space on a local mountpoint using an API call from any language.
Note that although mount-local-run is marked as Cancellable, the
current implementation does not support it, but it would be relatively
simple to add it.
Diffstat (limited to 'src/guestfs-internal.h')
-rw-r--r-- | src/guestfs-internal.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 1943f1a9..0492c9ea 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -24,6 +24,8 @@ #include <pcre.h> +#include "hash.h" + #ifndef O_CLOEXEC #define O_CLOEXEC 0 #endif @@ -248,6 +250,16 @@ struct guestfs_h * matter for this case because we only care if it is != 0. */ int user_cancel; + +#if HAVE_FUSE + /* These fields are used by guestfs_mount_local. */ + const char *localmountpoint; + struct fuse *fuse; /* FUSE handle. */ + int ml_dir_cache_timeout; /* Directory cache timeout. */ + Hash_table *lsc_ht, *xac_ht, *rlc_ht; /* Directory cache. */ + int ml_read_only; /* If mounted read-only. */ + int ml_debug_calls; /* Extra debug info on each FUSE call. */ +#endif }; /* Per-filesystem data stored for inspect_os. */ @@ -389,6 +401,9 @@ extern void guestfs___trace (guestfs_h *g, const char *fs, ...) extern const char *guestfs___persistent_tmpdir (void); extern void guestfs___remove_tmpdir (const char *dir); extern void guestfs___print_timestamped_message (guestfs_h *g, const char *fs, ...); +#if HAVE_FUSE +extern void guestfs___free_fuse (guestfs_h *g); +#endif extern void guestfs___free_inspect_info (guestfs_h *g); extern void guestfs___free_drives (struct drive **drives); extern int guestfs___set_busy (guestfs_h *g); |