|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH v5 4/4] Add support for net bridge |
Date: | Thu, 15 Dec 2011 09:26:55 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13 |
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: address@hidden:~/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
[Prev in Thread] | Current Thread | [Next in Thread] |