mirror of https://gitee.com/openkylin/libvirt.git
virInterfaceDefDevFormat: Add missing error handling
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
fdc5f5d7ac
commit
c5860d177b
|
@ -1089,13 +1089,16 @@ virInterfaceDefDevFormat(virBuffer *buf,
|
|||
virBufferAsprintf(buf, "<mac address='%s'/>\n", def->mac);
|
||||
break;
|
||||
case VIR_INTERFACE_TYPE_BRIDGE:
|
||||
virInterfaceBridgeDefFormat(buf, def);
|
||||
if (virInterfaceBridgeDefFormat(buf, def) < 0)
|
||||
return -1;
|
||||
break;
|
||||
case VIR_INTERFACE_TYPE_BOND:
|
||||
virInterfaceBondDefFormat(buf, def);
|
||||
if (virInterfaceBondDefFormat(buf, def) < 0)
|
||||
return -1;
|
||||
break;
|
||||
case VIR_INTERFACE_TYPE_VLAN:
|
||||
virInterfaceVlanDefFormat(buf, def);
|
||||
if (virInterfaceVlanDefFormat(buf, def) < 0)
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue