qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Another bugfix: tun-fd option does not work
@ 2004-04-03 12:47 Renzo Davoli
  2004-04-04  9:39 ` Fabrice Bellard
  0 siblings, 1 reply; 2+ messages in thread
From: Renzo Davoli @ 2004-04-03 12:47 UTC (permalink / raw)
  To: qemu-devel

[-- 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];

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-04  9:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-03 12:47 [Qemu-devel] Another bugfix: tun-fd option does not work Renzo Davoli
2004-04-04  9:39 ` Fabrice Bellard

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).