From: Ulrich Hecht <uli@suse.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] warnings in net.c
Date: Wed, 17 Jun 2009 17:47:40 +0200 [thread overview]
Message-ID: <1245253660-12616-1-git-send-email-uli@suse.de> (raw)
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 reply other threads:[~2009-06-17 15:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 15:47 Ulrich Hecht [this message]
2009-06-17 16:06 ` [Qemu-devel] [PATCH] warnings in net.c Filip Navara
2009-06-17 16:37 ` [Qemu-devel] " Jan Kiszka
2009-06-18 10:01 ` Ulrich Hecht
2009-06-18 9:56 ` [Qemu-devel] " Ulrich Hecht
2009-06-18 18:31 ` [Qemu-devel] " Jan Kiszka
2009-06-17 16:23 ` [Qemu-devel] " Blue Swirl
-- strict thread matches above, loose matches on Subject: below --
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 ` [Qemu-devel] [PATCH] warnings in net.c Ulrich Hecht
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=1245253660-12616-1-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).