qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: renzo@cs.unibo.it (Renzo Davoli)
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Another bugfix: tun-fd option does not work
Date: Sat, 3 Apr 2004 14:47:37 +0200	[thread overview]
Message-ID: <20040403124737.GA26411@cs.unibo.it> (raw)

[-- Attachment #1: Type: text/plain, Size: 260 bytes --]

There is a small bug in the current cvs: file vl.c.

Moving the ne2k interface descriptors initialization from before the getopt
loop to just after it, the fd field get rewritten and the -tun-fd option
ceases to work.

the patch is here attached.

ciao
	renzo

[-- Attachment #2: vl.c.diff --]
[-- Type: text/plain, Size: 648 bytes --]

--- vl.c.orig	2004-04-03 14:37:10.000000000 +0200
+++ vl.c	2004-04-03 14:38:43.000000000 +0200
@@ -1728,6 +1728,9 @@
     macaddr[4] = 0x34;
     macaddr[5] = 0x56;
     
+    for(i = 0; i < MAX_NICS; i++) 
+        nd_table[i].fd = -1;
+    
     for(;;) {
         c = getopt_long_only(argc, argv, "hm:d:n:sp:L:", long_options, &long_index);
         if (c == -1)
@@ -1934,7 +1937,6 @@
     /* init host network redirectors */
     for(i = 0; i < MAX_NICS; i++) {
         NetDriverState *nd = &nd_table[i];
-        nd->fd = -1;
         /* init virtual mac address */
         nd->macaddr[0] = macaddr[0];
         nd->macaddr[1] = macaddr[1];

             reply	other threads:[~2004-04-03 12:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-03 12:47 Renzo Davoli [this message]
2004-04-04  9:39 ` [Qemu-devel] Another bugfix: tun-fd option does not work Fabrice Bellard

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=20040403124737.GA26411@cs.unibo.it \
    --to=renzo@cs.unibo.it \
    --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).