Change download_to_tmp so it can work with multi-root operating systems.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 27 Jun 2011 15:10:25 +0000 (16:10 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 28 Jun 2011 16:03:08 +0000 (17:03 +0100)
commit5f26270c343bf543a7bf20cf3e6f182f6282f8ea
treedcd7f60f50f3d6c0800744093fc6b532c68c9f1b
parentadb5db58d850ce6d15380177a63c68276f863c98
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
src/inspect.c
src/inspect_apps.c
src/inspect_fs_windows.c