From: Markus Armbruster <armbru@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] give some useful error messages when tap open fails
Date: Fri, 23 Apr 2010 15:44:27 +0200 [thread overview]
Message-ID: <m3k4ryxozo.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <4BD18DA2.7040106@msgid.tls.msk.ru> (Michael Tokarev's message of "Fri, 23 Apr 2010 16:08:02 +0400")
Michael Tokarev <mjt@tls.msk.ru> writes:
> Markus Armbruster wrote:
>> Michael Tokarev <mjt@tls.msk.ru> writes:
>>
>>> In net/tap-linux.c, when manipulation of /dev/net/tun fails, it prints
>>> (with fprintf) something like this:
>>>
>>> warning: could not open /dev/net/tun: no virtual network emulation
>>>
>>> this has 2 issues:
>>> 1) it is not a warning really, it's a fatal error (kvm exits after that),
>>> 2) there's no indication as of what's actually wrong: printing errno there
>>> is helpful.
>>>
>>> The patch below removes the "warning" prefix, uses %m (since it's linux,
>>> %m is available as format modifier), and changes fprintf() to qemu_error().
>>> Now it prints something like this instead:
>>>
>>> could not configure /dev/net/tun: Device or resource busy
>>>
>>> (there are 2 messages like that in the same function)
>>>
>>> This fixes Debian bug #578154, see
>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578154
>>>
> []
>> This might apply to the stable branch (I haven't tried), but I don't
>> think it works on master. There, it should look like this (untested):
>>
>> + error_report("could not open /dev/net/tun: %m");
>
> Yes, the routine name changed in git compared with 0.12. Here goes
> the version for current master, which is also a bit more elegant
> (I hope anyway). Thanks!
>
> (Still with my Signed-Off-By, if needed:
> Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
> )
Looks better now. Recommend to repost it as "[PATCH v2]", to ensure it
gets noticed and merged.
next prev parent reply other threads:[~2010-04-23 13:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 9:28 [Qemu-devel] [PATCH] give some useful error messages when tap open fails Michael Tokarev
2010-04-22 9:52 ` Markus Armbruster
2010-04-23 12:08 ` Michael Tokarev
2010-04-23 13:44 ` Markus Armbruster [this message]
2010-04-23 12:46 ` Kevin Wolf
2010-04-23 12:52 ` Michael Tokarev
2010-04-23 13:28 ` Kevin Wolf
2010-04-26 18:41 ` Anthony Liguori
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=m3k4ryxozo.fsf@blackfin.pond.sub.org \
--to=armbru@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.