49 lines
1.4 KiB
Diff
49 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~
|