Michael Tokarev <m...@tls.msk.ru> writes:

> Markus Armbruster wrote:
>> Michael Tokarev <m...@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 <m...@tls.msk.ru>
> )

Looks better now.  Recommend to repost it as "[PATCH v2]", to ensure it
gets noticed and merged.


Reply via email to