2008-03-11 16:50:53 +00:00
|
|
|
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
|
2008-08-26 12:28:13 +01:00
|
|
|
--- 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
|
2008-08-26 12:16:41 +01:00
|
|
|
***************
|
|
|
|
*** 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");
|
|
|
|
|
2008-03-11 16:50:53 +00:00
|
|
|
Only in kvm-57/qemu: vl.c~
|