diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-09-24 18:54:37 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-09-24 19:25:06 +0100 |
commit | c9c0ac7d362fd19214c2c5e5bb7dcd9059950887 (patch) | |
tree | 6e5b1b2888baaf0bdb3b65d91d5f6f5bbef22f9c /src/appliance.c | |
parent | 840536ea5a0568296dfd3e483442c76b93c5a949 (diff) | |
download | libguestfs-c9c0ac7d362fd19214c2c5e5bb7dcd9059950887.tar.gz libguestfs-c9c0ac7d362fd19214c2c5e5bb7dcd9059950887.tar.xz libguestfs-c9c0ac7d362fd19214c2c5e5bb7dcd9059950887.zip |
Allow $TMPDIR to override most temporary directory uses.
Be more consistent in allowing the user to override use of the
temporary directory by specifying $TMPDIR. Also prefer P_tmpdir
macro (defined in <stdio.h>) if that is defined, rather than
hard-coding "/tmp" for the fallback location.
Diffstat (limited to 'src/appliance.c')
-rw-r--r-- | src/appliance.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/appliance.c b/src/appliance.c index 2c1d7c94..163d7700 100644 --- a/src/appliance.c +++ b/src/appliance.c @@ -235,7 +235,7 @@ check_for_cached_appliance (guestfs_h *g, const char *supermin_path, const char *checksum, char **kernel, char **initrd, char **appliance) { - const char *tmpdir = guestfs___tmpdir (); + const char *tmpdir = guestfs_tmpdir (); size_t len = strlen (tmpdir) + strlen (checksum) + 2; char cachedir[len]; @@ -329,7 +329,7 @@ build_supermin_appliance (guestfs_h *g, if (g->verbose) guestfs___print_timestamped_message (g, "begin building supermin appliance"); - const char *tmpdir = guestfs___tmpdir (); + const char *tmpdir = guestfs_tmpdir (); size_t cdlen = strlen (tmpdir) + strlen (checksum) + 2; char cachedir[cdlen]; snprintf (cachedir, cdlen, "%s/%s", tmpdir, checksum); |