From: Ronald <look@reply.to>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: SAMBA support in QEMU
Date: Mon, 06 Sep 2004 02:30:50 +0200 [thread overview]
Message-ID: <pan.2004.09.06.00.30.33.86129@reply.to> (raw)
In-Reply-To: 413BA018.60601@bellard.org
Le Mon, 06 Sep 2004 01:24:08 +0200, Fabrice Bellard a écrit :
> Hi,
>
> I just commited a simple solution to enable direct access to host files
> from Windows guests with user mode networking and with almost no set up.
> It is currently very experimental but it works, at least for Windows 98
> with the Samba server from Red Hat 9. Any suggestion is welcome.
>
Just a small fix to make it build for windows.
--- vl.c.old 2004-09-06 02:25:03.958702256 +0200
+++ vl.c 2004-09-06 02:22:41.086234244 +0200
@@ -29,6 +29,7 @@
#include <time.h>
#include <errno.h>
#include <sys/time.h>
+#include <dirent.h>
#ifndef _WIN32
#include <sys/times.h>
@@ -38,7 +39,6 @@
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
-#include <dirent.h>
#ifdef _BSD
#include <sys/stat.h>
#ifndef __APPLE__
@@ -1493,10 +1493,17 @@
/* XXX: better tmp dir construction */
snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d", getpid());
+ #ifdef _WIN32
+ if (mkdir(smb_dir) < 0) {
+ fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir);
+ exit(1);
+ }
+ #else
if (mkdir(smb_dir, 0700) < 0) {
fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir);
exit(1);
}
+ #endif
snprintf(smb_conf, sizeof(smb_conf), "%s/%s", smb_dir, "smb.conf");
f = fopen(smb_conf, "w");
next prev parent reply other threads:[~2004-09-06 0:36 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-05 23:24 [Qemu-devel] SAMBA support in QEMU Fabrice Bellard
2004-09-06 0:30 ` Ronald [this message]
2004-09-06 17:02 ` [Qemu-devel] " Ronald
2004-09-06 17:16 ` Ronald
2004-09-10 12:47 ` Ronald
2004-09-10 14:37 ` Johannes Schindelin
2004-09-10 16:22 ` [Qemu-devel] " Ronald
2004-09-06 18:05 ` [Qemu-devel] " John R. Hogerhuis
2004-09-06 19:06 ` Mikesch Nepomuk
2004-09-11 7:12 ` [Qemu-devel] " Mark.Jonckheere
2004-09-11 13:19 ` Andreas Bollhalder
2004-09-06 19:46 ` [Qemu-devel] " Laurent Amon
2004-12-07 14:45 ` Adrian Smarzewski
2004-12-07 16:50 ` Johannes Schindelin
2004-12-08 9:26 ` Adrian Smarzewski
2004-12-08 12:36 ` Adrian Smarzewski
2004-12-08 12:56 ` Jens Arm
2004-12-08 13:04 ` Jens Arm
2004-12-08 21:56 ` Fabrice Bellard
2004-12-08 15:04 ` Adrian Smarzewski
2004-12-08 18:21 ` Felipe Sanchez
2004-12-08 21:59 ` Fabrice Bellard
2004-12-09 9:11 ` carlo.andreoli
2004-12-09 18:44 ` David Still
2004-12-09 21:34 ` Adrian Smarzewski
2004-12-19 15:18 ` Bernhard Huafbauer
2004-12-19 23:40 ` Fabrice Bellard
2004-12-20 21:14 ` Bernhard Huafbauer
2004-12-20 23:14 ` Fabrice Bellard
2004-12-21 22:13 ` Bernhard Huafbauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pan.2004.09.06.00.30.33.86129@reply.to \
--to=look@reply.to \
--cc=daimon55@free.fr \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.