Displaying 2 results from an estimated 2 matches for "53b859d".
Did you mean:
53b859d4b
2016 Dec 11
3
[PATCH 0/2] generic function for temporary path generation
Cosmetic change as suggested in this previous patch:
https://www.redhat.com/archives/libguestfs/2016-November/msg00111.html
Matteo Cafasso (2):
lib: generic function for temporary path generation
lib: use guestfs_int_make_temp_path to generate temporary files
src/drives.c | 5 ++---
src/file.c | 22 +++++++++-------------
src/guestfs-internal.h | 1 +
src/journal.c
2016 Dec 11
0
[PATCH 2/2] lib: use guestfs_int_make_temp_path to generate temporary files
...ve_dev_null (guestfs_h *g,
*/
data->readonly = false;
- tmpfile = safe_asprintf (g, "%s/devnull%d", g->tmpdir, ++g->unique);
-
if (guestfs_disk_create (g, tmpfile, "raw", 4096, -1) == -1)
return NULL;
diff --git a/src/file.c b/src/file.c
index d57c4e1..53b859d 100644
--- a/src/file.c
+++ b/src/file.c
@@ -86,11 +86,10 @@ guestfs_impl_read_file (guestfs_h *g, const char *path, size_t *size_r)
char *ret = NULL;
struct stat statbuf;
- if (guestfs_int_lazy_make_tmpdir (g) == -1)
+ tmpfile = guestfs_int_make_temp_path (g, "cat");
+ if (tmpf...