nixpkgs-suyu/pkgs/os-specific/linux/kvm/smbd-path.patch
Eelco Dolstra 251c7207cf * Revert to KVM 76 in the VM build functions. The latest qemu-kvm has
weird performance and data corruption regressions in the build farm.

svn path=/nixpkgs/trunk/; revision=17364
2009-09-23 14:24:37 +00:00

48 lines
1.4 KiB
Diff

diff -rc kvm-57-orig/qemu/vl.c kvm-57/qemu/vl.c
*** kvm-57-orig/qemu/vl.c 2007-12-18 16:57:46.000000000 +0100
--- kvm-57/qemu/vl.c 2008-08-26 13:17:57.000000000 +0200
***************
*** 141,147 ****
#ifdef __sun__
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
#else
! #define SMBD_COMMAND "/usr/sbin/smbd"
#endif
//#define DEBUG_UNUSED_IOPORT
--- 141,147 ----
#ifdef __sun__
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
#else
! #define SMBD_COMMAND "smbd"
#endif
//#define DEBUG_UNUSED_IOPORT
***************
*** 3828,3838 ****
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");
--- 3828,3840 ----
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");
Only in kvm-57/qemu: vl.c~