mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
make-fs: respect libguestfs' temporary dir
Do not hardcode /tmp.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user