mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
give a more useful diagnostic for tap-add failure w/ENOTSUP
* src/qemu_conf.c (qemudNetworkIfaceConnect): Suggestion from Daniel P. Berrange.
This commit is contained in:
parent
a211db1b8f
commit
fb2eca4cfd
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jul 9 07:23:31 CEST 2008 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
|
give a more useful diagnostic for tap-add failure w/ENOTSUP
|
||||||
|
* src/qemu_conf.c (qemudNetworkIfaceConnect):
|
||||||
|
Suggestion from Daniel P. Berrange.
|
||||||
|
|
||||||
Tue Jul 8 18:47:56 BST 2008 Daniel P. Berrange <berrange@redhat.com>
|
Tue Jul 8 18:47:56 BST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* src/xs_internal.c: Fix typo in domain state constant (Toth
|
* src/xs_internal.c: Fix typo in domain state constant (Toth
|
||||||
|
@ -2304,9 +2304,17 @@ qemudNetworkIfaceConnect(virConnectPtr conn,
|
|||||||
|
|
||||||
if ((err = brAddTap(driver->brctl, brname,
|
if ((err = brAddTap(driver->brctl, brname,
|
||||||
ifname, BR_IFNAME_MAXLEN, &tapfd))) {
|
ifname, BR_IFNAME_MAXLEN, &tapfd))) {
|
||||||
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
|
if (errno == ENOTSUP) {
|
||||||
_("Failed to add tap interface '%s' to bridge '%s' : %s"),
|
/* In this particular case, give a better diagnostic. */
|
||||||
ifname, brname, strerror(err));
|
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("Failed to add tap interface to bridge. "
|
||||||
|
"%s is not a bridge device"), brname);
|
||||||
|
} else {
|
||||||
|
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("Failed to add tap interface '%s' "
|
||||||
|
"to bridge '%s' : %s"),
|
||||||
|
ifname, brname, strerror(err));
|
||||||
|
}
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user