From 5f26270c343bf543a7bf20cf3e6f182f6282f8ea Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 27 Jun 2011 16:10:25 +0100 Subject: Change download_to_tmp so it can work with multi-root operating systems. The previous guestfs___download_to_tmp function did not handle multiboot correctly. In particular it used the same cache name for downloaded files from different roots, which could have caused things like applications in each root to be confused. This changes the function so that the cache filename is prefixed with the root / fs number, eg. $tmpdir/0-Name instead of $tmpdir/Name. This change also requires the function to return the new name, so all places in the code which called this function had to be updated. This updates and fixes commit 3c1f762abed92f7a358f3bc93e3396d0606b18ad. --- src/guestfs-internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/guestfs-internal.h') diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 9193b97d..0650eb29 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -353,7 +353,7 @@ extern void guestfs___call_callbacks_message (guestfs_h *g, uint64_t event, cons extern void guestfs___call_callbacks_array (guestfs_h *g, uint64_t event, const uint64_t *array, size_t array_len); #if defined(HAVE_PCRE) && defined(HAVE_HIVEX) extern int guestfs___check_for_filesystem_on (guestfs_h *g, const char *device, int is_block, int is_partnum); -extern int guestfs___download_to_tmp (guestfs_h *g, const char *filename, const char *basename, int64_t max_size); +extern char *guestfs___download_to_tmp (guestfs_h *g, struct inspect_fs *fs, const char *filename, const char *basename, int64_t max_size); extern char *guestfs___case_sensitive_path_silently (guestfs_h *g, const char *); extern struct inspect_fs *guestfs___search_for_root (guestfs_h *g, const char *root); extern int guestfs___parse_unsigned_int (guestfs_h *g, const char *str); -- cgit