diff options
Diffstat (limited to 'meta/packages/qemu/qemu-0.9.0+cvs20070613/02_snapshot_use_tmpdir.patch')
-rw-r--r-- | meta/packages/qemu/qemu-0.9.0+cvs20070613/02_snapshot_use_tmpdir.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/packages/qemu/qemu-0.9.0+cvs20070613/02_snapshot_use_tmpdir.patch b/meta/packages/qemu/qemu-0.9.0+cvs20070613/02_snapshot_use_tmpdir.patch new file mode 100644 index 000000000..bd955b6db --- /dev/null +++ b/meta/packages/qemu/qemu-0.9.0+cvs20070613/02_snapshot_use_tmpdir.patch @@ -0,0 +1,23 @@ +#DPATCHLEVEL=0 +--- +# block.c | 6 +++++- +# 1 file changed, 5 insertions(+), 1 deletion(-) +# +Index: block.c +=================================================================== +--- block.c.orig 2007-06-13 11:51:52.000000000 +0100 ++++ block.c 2007-06-13 11:51:53.000000000 +0100 +@@ -188,8 +188,12 @@ void get_tmp_filename(char *filename, in + void get_tmp_filename(char *filename, int size) + { + int fd; ++ char *tmpdir; + /* XXX: race condition possible */ +- pstrcpy(filename, size, "/tmp/vl.XXXXXX"); ++ tmpdir = getenv("TMPDIR"); ++ if (!tmpdir) ++ tmpdir = "/tmp"; ++ snprintf(filename, size, "%s/vl.XXXXXX", tmpdir); + fd = mkstemp(filename); + close(fd); + } |