From: Ulrich Hecht <uli@suse.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] warnings in net.c
Date: Fri, 3 Jul 2009 17:09:27 +0200 [thread overview]
Message-ID: <1246633770-13404-3-git-send-email-uli@suse.de> (raw)
In-Reply-To: <1246633770-13404-2-git-send-email-uli@suse.de>
removes unused slirp code and initializes ret in net_client_init()
Signed-off-by: Ulrich Hecht <uli@suse.de>
---
net.c | 51 +--------------------------------------------------
1 files changed, 1 insertions(+), 50 deletions(-)
diff --git a/net.c b/net.c
index af9de73..91976b9 100644
--- a/net.c
+++ b/net.c
@@ -691,55 +691,6 @@ int slirp_is_inited(void)
return slirp_inited;
}
-static ssize_t slirp_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
-{
-#ifdef DEBUG_SLIRP
- printf("slirp input:\n");
- hex_dump(stdout, buf, size);
-#endif
- slirp_input(buf, size);
- return size;
-}
-
-static int slirp_in_use;
-
-static void net_slirp_cleanup(VLANClientState *vc)
-{
- slirp_in_use = 0;
-}
-
-static int net_slirp_init(VLANState *vlan, const char *model, const char *name,
- int restricted, const char *ip)
-{
- if (slirp_in_use) {
- /* slirp only supports a single instance so far */
- return -1;
- }
- if (!slirp_inited) {
- slirp_inited = 1;
- slirp_init(restricted, ip);
-
- while (slirp_redirs) {
- struct slirp_config_str *config = slirp_redirs;
-
- slirp_redirection(NULL, config->str);
- slirp_redirs = config->next;
- qemu_free(config);
- }
-#ifndef _WIN32
- if (slirp_smb_export) {
- slirp_smb(slirp_smb_export);
- }
-#endif
- }
-
- slirp_vc = qemu_new_vlan_client(vlan, model, name, NULL, slirp_receive,
- NULL, net_slirp_cleanup, NULL);
- slirp_vc->info_str[0] = '\0';
- slirp_in_use = 1;
- return 0;
-}
-
static void net_slirp_redir_print(void *opaque, int is_udp,
struct in_addr *laddr, u_int lport,
struct in_addr *faddr, u_int fport)
@@ -2088,7 +2039,7 @@ int net_client_init(Monitor *mon, const char *device, const char *p)
"vlan", "name", "fd", NULL
};
char buf[1024];
- int vlan_id, ret;
+ int vlan_id, ret = 0;
VLANState *vlan;
char *name = NULL;
--
1.6.2.1
next prev parent reply other threads:[~2009-07-03 15:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-03 15:09 [Qemu-devel] [PATCH 0/4] linux-user syscall bugs Ulrich Hecht
2009-07-03 15:09 ` [Qemu-devel] [PATCH 1/4] pipe argument should not be signed Ulrich Hecht
2009-07-03 15:09 ` Ulrich Hecht [this message]
2009-07-03 15:09 ` [Qemu-devel] [PATCH 2/4] 64-bit clean socketcall syscall Ulrich Hecht
2009-07-03 15:09 ` [Qemu-devel] [PATCH 3/4] wrap path for access syscall Ulrich Hecht
2009-07-03 15:09 ` [Qemu-devel] [PATCH 4/4] getrlimit conversion mix-up Ulrich Hecht
2009-07-08 19:18 ` [Qemu-devel] " Riku Voipio
2009-07-03 15:10 ` [Qemu-devel] Re: [PATCH] warnings in net.c Ulrich Hecht
-- strict thread matches above, loose matches on Subject: below --
2009-06-17 15:47 [Qemu-devel] " Ulrich Hecht
2009-06-17 16:06 ` Filip Navara
2009-06-18 9:56 ` Ulrich Hecht
2009-06-17 16:23 ` Blue Swirl
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=1246633770-13404-3-git-send-email-uli@suse.de \
--to=uli@suse.de \
--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.