b22880b12d
command line. svn path=/nixpkgs/trunk/; revision=19756
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
Honour $TMPDIR for the qemu-smb temporary directory.
|
|
|
|
diff -rc -x '*~' qemu-kvm-0.12.2-orig/net/slirp.c qemu-kvm-0.12.2/net/slirp.c
|
|
*** qemu-kvm-0.12.2-orig/net/slirp.c 2010-02-01 19:05:24.000000000 +0100
|
|
--- qemu-kvm-0.12.2/net/slirp.c 2010-02-01 19:05:54.000000000 +0100
|
|
***************
|
|
*** 476,486 ****
|
|
struct in_addr vserver_addr)
|
|
{
|
|
static int instance;
|
|
! char smb_conf[128];
|
|
! char smb_cmdline[128];
|
|
FILE *f;
|
|
|
|
! snprintf(s->smb_dir, sizeof(s->smb_dir), "/tmp/qemu-smb.%ld-%d",
|
|
(long)getpid(), instance++);
|
|
if (mkdir(s->smb_dir, 0700) < 0) {
|
|
qemu_error("could not create samba server dir '%s'\n", s->smb_dir);
|
|
--- 476,489 ----
|
|
struct in_addr vserver_addr)
|
|
{
|
|
static int instance;
|
|
! char smb_conf[1024];
|
|
! char smb_cmdline[1024];
|
|
FILE *f;
|
|
|
|
! char *tmpdir = getenv("TMPDIR");
|
|
!
|
|
! snprintf(s->smb_dir, sizeof(s->smb_dir), "%s/qemu-smb.%ld-%d",
|
|
! tmpdir ? tmpdir : "/tmp",
|
|
(long)getpid(), instance++);
|
|
if (mkdir(s->smb_dir, 0700) < 0) {
|
|
qemu_error("could not create samba server dir '%s'\n", s->smb_dir);
|