From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbFqP-0002CB-Mf for qemu-devel@nongnu.org; Thu, 15 Dec 2011 13:15:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbFqO-0008D2-OT for qemu-devel@nongnu.org; Thu, 15 Dec 2011 13:15:49 -0500 Received: from e2.ny.us.ibm.com ([32.97.182.142]:41138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbFqO-0008Cr-K7 for qemu-devel@nongnu.org; Thu, 15 Dec 2011 13:15:48 -0500 Received: from /spool/local by e2.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 15 Dec 2011 13:15:47 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBFIF6gD286842 for ; Thu, 15 Dec 2011 13:15:06 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBFIF5RT000843 for ; Thu, 15 Dec 2011 16:15:06 -0200 Message-ID: <4EEA3928.1040205@linux.vnet.ibm.com> Date: Thu, 15 Dec 2011 13:15:04 -0500 From: Corey Bryant MIME-Version: 1.0 References: <1321242349-4140-1-git-send-email-coreyb@linux.vnet.ibm.com> <1321242349-4140-5-git-send-email-coreyb@linux.vnet.ibm.com> <4EEA11BF.1020405@us.ibm.com> In-Reply-To: <4EEA11BF.1020405@us.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v5 4/4] Add support for net bridge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: rmarwah@linux.vnet.ibm.com, qemu-devel@nongnu.org On 12/15/2011 10:26 AM, Anthony Liguori wrote: > On 11/13/2011 09:45 PM, Corey Bryant wrote: >> The most common use of -net tap is to connect a tap device to a >> bridge. This >> requires the use of a script and running qemu as root in order to >> allocate a >> tap device to pass to the script. > > This patch breaks the build: > > anthony@titi:~/build/qemu$ make > CC net/tap.o > cc1: warnings being treated as errors > /home/anthony/git/qemu/net/tap.c: In function ‘net_init_tap’: > /home/anthony/git/qemu/net/tap.c:560:15: error: ‘s’ may be used > uninitialized in this function > make: *** [net/tap.o] Error 1 > >> >> - s = net_tap_fd_init(vlan, "tap", name, fd, vnet_hdr); >> - if (!s) { >> - close(fd); >> - return -1; >> + s = net_tap_fd_init(vlan, "tap", name, fd, vnet_hdr); >> + if (!s) { >> + close(fd); >> + return -1; >> + } >> } > > And indeed, you've changed the function from unconditionally > initializing s to conditionally initializing it. Specifically, you've > broken -net tap,fd=X which would break tools like libvirt. > > Regards, > > Anthony Liguori > > That's a problem. I'll get another version out that fixes this. -- Regards, Corey