qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Corey Bryant <coreyb@linux.vnet.ibm.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: rmarwah@linux.vnet.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v5 4/4] Add support for net bridge
Date: Thu, 15 Dec 2011 23:00:24 -0500	[thread overview]
Message-ID: <4EEAC258.6090002@linux.vnet.ibm.com> (raw)
In-Reply-To: <4EEA11BF.1020405@us.ibm.com>



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
>

I was wondering how I missed this.  I typically configure with 
--enable-debug, which appears to suppress warnings.

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

-- 
Regards,
Corey

  parent reply	other threads:[~2011-12-16  4:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14  3:45 [Qemu-devel] [PATCH v5 0/4] -net bridge: rootless bridge support for qemu Corey Bryant
2011-11-14  3:45 ` [Qemu-devel] [PATCH v5 1/4] Add basic version of bridge helper Corey Bryant
2011-11-14  3:45 ` [Qemu-devel] [PATCH v5 2/4] Add access control support to qemu " Corey Bryant
2011-11-14  3:45 ` [Qemu-devel] [PATCH v5 3/4] Add cap reduction support to enable use as SUID Corey Bryant
2011-11-14  3:45 ` [Qemu-devel] [PATCH v5 4/4] Add support for net bridge Corey Bryant
2011-12-15 15:26   ` Anthony Liguori
2011-12-15 18:15     ` Corey Bryant
2011-12-16  4:00     ` Corey Bryant [this message]
2011-12-07 19:43 ` [Qemu-devel] [PATCH v5 0/4] -net bridge: rootless bridge support for qemu Corey Bryant

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=4EEAC258.6090002@linux.vnet.ibm.com \
    --to=coreyb@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rmarwah@linux.vnet.ibm.com \
    /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).