[Pkg-libvirt-commits] [libguestfs] 109/156: make-fs: respect libguestfs' temporary dir
Hilko Bengen
bengen at moszumanska.debian.org
Sat Aug 30 08:26:07 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch master
in repository libguestfs.
commit 593fc31baa8c2470939b1b2be6e216002dad6714
Author: Pino Toscano <ptoscano at redhat.com>
Date: Mon Jul 28 17:24:02 2014 +0200
make-fs: respect libguestfs' temporary dir
Do not hardcode /tmp.
(cherry picked from commit 2fe93bda9f8744553da19882043f11da5348dc35)
---
make-fs/make-fs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c
index 1bec3e2..9c11fef 100644
--- a/make-fs/make-fs.c
+++ b/make-fs/make-fs.c
@@ -381,8 +381,9 @@ estimate_input (const char *input, uint64_t *estimate_rtn, char **ifmt_rtn)
CLEANUP_FCLOSE FILE *fp = NULL;
char line[256];
size_t len;
+ CLEANUP_FREE char *tmpdir = guestfs_get_tmpdir (g);
- if (asprintf (&tmpfile, "/tmp/makefsXXXXXX") == -1) {
+ if (asprintf (&tmpfile, "%s/makefsXXXXXX", tmpdir) == -1) {
perror ("asprintf");
return -1;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list