From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B9kbM-0000su-SL for qemu-devel@nongnu.org; Sat, 03 Apr 2004 07:50:20 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B9kZZ-0007Rc-6h for qemu-devel@nongnu.org; Sat, 03 Apr 2004 07:49:01 -0500 Received: from [130.136.10.114] (helo=pob.cs.unibo.it) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B9kYm-000750-49 for qemu-devel@nongnu.org; Sat, 03 Apr 2004 07:47:40 -0500 Date: Sat, 3 Apr 2004 14:47:37 +0200 Message-ID: <20040403124737.GA26411@cs.unibo.it> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5mCyUwZo2JvN/JJP" Content-Disposition: inline From: renzo@cs.unibo.it (Renzo Davoli) Subject: [Qemu-devel] Another bugfix: tun-fd option does not work Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="vl.c.diff" --- 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]; --5mCyUwZo2JvN/JJP--