forked from mirrors/nixpkgs
1a3a6835c2
* Kernel headers for Linux 2.6.28. svn path=/nixpkgs/trunk/; revision=13755
51 lines
1.5 KiB
Diff
51 lines
1.5 KiB
Diff
diff -rc kvm-82-orig/qemu/net.c kvm-82/qemu/net.c
|
|
*** kvm-82-orig/qemu/net.c 2008-12-24 15:24:58.000000000 +0100
|
|
--- kvm-82/qemu/net.c 2009-01-13 12:59:15.000000000 +0100
|
|
***************
|
|
*** 560,570 ****
|
|
slirp_init();
|
|
}
|
|
|
|
! /* XXX: better tmp dir construction */
|
|
! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d", getpid());
|
|
! if (mkdir(smb_dir, 0700) < 0) {
|
|
! fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir);
|
|
! exit(1);
|
|
}
|
|
snprintf(smb_conf, sizeof(smb_conf), "%s/%s", smb_dir, "smb.conf");
|
|
|
|
--- 560,572 ----
|
|
slirp_init();
|
|
}
|
|
|
|
! while (1) {
|
|
! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d.%d", getpid(), random());
|
|
! if (mkdir(smb_dir, 0700) == 0) break;
|
|
! if (errno != EEXIST) {
|
|
! fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir);
|
|
! exit(1);
|
|
! }
|
|
}
|
|
snprintf(smb_conf, sizeof(smb_conf), "%s/%s", smb_dir, "smb.conf");
|
|
|
|
diff -rc kvm-82-orig/qemu/net.h kvm-82/qemu/net.h
|
|
*** kvm-82-orig/qemu/net.h 2008-12-24 15:24:58.000000000 +0100
|
|
--- kvm-82/qemu/net.h 2009-01-13 12:58:28.000000000 +0100
|
|
***************
|
|
*** 99,105 ****
|
|
#ifdef __sun__
|
|
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
|
|
#else
|
|
! #define SMBD_COMMAND "/usr/sbin/smbd"
|
|
#endif
|
|
|
|
#endif
|
|
--- 99,105 ----
|
|
#ifdef __sun__
|
|
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
|
|
#else
|
|
! #define SMBD_COMMAND "smbd"
|
|
#endif
|
|
|
|
#endif
|