diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2010-06-02 14:33:01 -0300 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-06-22 15:15:30 -0500 |
commit | 91ca60e01277da2184d9c3f992c440cb5aa264c4 (patch) | |
tree | e86d8211635f69f90b6bbbeec9856cbbb6807cc1 /hw/sh_pci.h | |
parent | 49b586a922c1818cbd9f576600f72bff182bc257 (diff) | |
download | hqemu-91ca60e01277da2184d9c3f992c440cb5aa264c4.zip hqemu-91ca60e01277da2184d9c3f992c440cb5aa264c4.tar.gz |
give some useful error messages when tap open
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
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/sh_pci.h')
0 files changed, 0 insertions, 0 deletions