Skip to contentSkip to conversation

consolidate definition for tap script and smb support

PATCH Superseded Carlo Marcelo Arenas Belon 1 participant 1 message Nov 23, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 consolidate definition for tap script and smb support

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

---

vl.c +0 -8
Index: vl.c
===================================================================
@@ -147,14 +147,6 @@
 
 #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
net.c +0 -8
Index: net.c
===================================================================
@@ -120,14 +120,6 @@
 #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;
 
 /***********************************************************/
net.h +8 -0
Index: net.h
===================================================================
@@ -78,4 +78,12 @@
 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