2010-02-01 15:12:49 +00:00
|
|
|
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
|
2010-02-01 18:11:53 +00:00
|
|
|
*** 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
|
2010-02-01 15:12:49 +00:00
|
|
|
***************
|
2010-02-01 18:11:53 +00:00
|
|
|
*** 476,486 ****
|
|
|
|
struct in_addr vserver_addr)
|
|
|
|
{
|
|
|
|
static int instance;
|
|
|
|
! char smb_conf[128];
|
|
|
|
! char smb_cmdline[128];
|
2010-02-01 15:12:49 +00:00
|
|
|
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);
|
2010-02-01 18:11:53 +00:00
|
|
|
--- 476,489 ----
|
|
|
|
struct in_addr vserver_addr)
|
|
|
|
{
|
|
|
|
static int instance;
|
|
|
|
! char smb_conf[1024];
|
|
|
|
! char smb_cmdline[1024];
|
2010-02-01 15:12:49 +00:00
|
|
|
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);
|