]> git.proxmox.com Git - qemu.git/commitdiff
consolidate definition for tap script and smb support
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 18 Dec 2008 22:43:48 +0000 (22:43 +0000)
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 18 Dec 2008 22:43:48 +0000 (22:43 +0000)
Since the introduction of net.c in r5581 there had been 2 places where
the location of the TAP helper scripts and SMB daemon are defined.

The following patch move those definitions to net.h so they are accessible
for net.c and vl.c but defined only once

(Carlo Marcelo Arenas Belon)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6093 c046a42c-6fe2-441c-8c8c-71466251a162

net.c
net.h
vl.c

diff --git a/net.c b/net.c
index c7960350066b302913bfca251aed5626c9b4332f..c49abef5223dae79e205626ea2b295e770e7e9fa 100644 (file)
--- a/net.c
+++ b/net.c
 #define memalign(align, size) malloc(size)
 #endif
 
-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
-#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
-#ifdef __sun__
-#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
-#else
-#define SMBD_COMMAND "/usr/sbin/smbd"
-#endif
-
 static VLANState *first_vlan;
 
 /***********************************************************/
diff --git a/net.h b/net.h
index 63ba7ed29b757bdf82e36b1e12b97a1563c0ed75..31c7a308cd4c8c7c26994fab326a8f21af8ebb1c 100644 (file)
--- a/net.h
+++ b/net.h
@@ -85,4 +85,12 @@ void net_cleanup(void);
 int slirp_is_inited(void);
 void net_client_check(void);
 
+#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
+#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
+#ifdef __sun__
+#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
+#else
+#define SMBD_COMMAND "/usr/sbin/smbd"
+#endif
+
 #endif
diff --git a/vl.c b/vl.c
index 66dd975f8453d8f240e0cd41b5a3ed005cab6130..cd39c60f857355577920b7adaf678751137e061a 100644 (file)
--- a/vl.c
+++ b/vl.c
 
 #include "exec-all.h"
 
-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
-#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
-#ifdef __sun__
-#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
-#else
-#define SMBD_COMMAND "/usr/sbin/smbd"
-#endif
-
 //#define DEBUG_UNUSED_IOPORT
 //#define DEBUG_IOPORT
 //#define DEBUG_NET