~jderose/ubuntu/raring/qemu/vde-again

« back to all changes in this revision

Viewing changes to debian/patches/02_snapshot_use_tmpdir.patch

  • Committer: Bazaar Package Importer
  • Author(s): Aurelien Jarno, Aurelien Jarno
  • Date: 2009-03-22 10:13:17 UTC
  • mfrom: (1.2.1 upstream) (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090322101317-iigjtnu5qil35dtb
Tags: 0.10.1-1
[ Aurelien Jarno ]
* New upstream stable release:
  - patches/80_stable-branch.patch: remove.
* debian/control: 
  - Remove depends on proll.
  - Move depends on device-tree-compiler to build-depends.
  - Bump Standards-Version to 3.8.1 (no changes).
* patches/82_qemu-img_decimal.patch: new patch from upstream to make
  qemu-img accept sizes with decimal values (closes: bug#501400).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: block.c
2
 
===================================================================
3
 
--- block.c.orig        2008-01-06 20:38:42.000000000 +0100
4
 
+++ block.c     2008-04-14 11:27:17.000000000 +0200
5
 
@@ -191,8 +191,12 @@
6
 
 void get_tmp_filename(char *filename, int size)
7
 
 {
8
 
     int fd;
9
 
+    char *tmpdir;
10
 
     /* XXX: race condition possible */
11
 
-    pstrcpy(filename, size, "/tmp/vl.XXXXXX");
12
 
+    tmpdir = getenv("TMPDIR");
13
 
+    if (!tmpdir)
14
 
+        tmpdir = "/tmp";
15
 
+    snprintf(filename, size, "%s/vl.XXXXXX", tmpdir);
16
 
     fd = mkstemp(filename);
17
 
     close(fd);
18
 
 }