mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
tools: remove use of the term 'slave' in code dealing with bridges
Network interfaces are simply attached to a bridge device. Reviewed-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
aab0470f0d
commit
3f2dd4fb84
@ -922,17 +922,17 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the type of the inner/slave interface to the original
|
/* set the type of the attached interface to the original
|
||||||
* if_type, and the name to the original if_name.
|
* if_type, and the name to the original if_name.
|
||||||
*/
|
*/
|
||||||
if (!xmlSetProp(if_node, BAD_CAST "type", BAD_CAST if_type)) {
|
if (!xmlSetProp(if_node, BAD_CAST "type", BAD_CAST if_type)) {
|
||||||
vshError(ctl, _("Failed to set new slave interface type to '%s' in xml document"),
|
vshError(ctl, _("Failed to set new attached interface type to '%s' in xml document"),
|
||||||
if_type);
|
if_type);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!xmlSetProp(if_node, BAD_CAST "name", BAD_CAST if_name)) {
|
if (!xmlSetProp(if_node, BAD_CAST "name", BAD_CAST if_name)) {
|
||||||
vshError(ctl, _("Failed to set new slave interface name to '%s' in xml document"),
|
vshError(ctl, _("Failed to set new attached interface name to '%s' in xml document"),
|
||||||
if_name);
|
if_name);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -1010,7 +1010,7 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd)
|
|||||||
*/
|
*/
|
||||||
static const vshCmdInfo info_interface_unbridge[] = {
|
static const vshCmdInfo info_interface_unbridge[] = {
|
||||||
{.name = "help",
|
{.name = "help",
|
||||||
.data = N_("undefine a bridge device after detaching its slave device")
|
.data = N_("undefine a bridge device after detaching its device(s)")
|
||||||
},
|
},
|
||||||
{.name = "desc",
|
{.name = "desc",
|
||||||
.data = N_("unbridge a network device")
|
.data = N_("unbridge a network device")
|
||||||
@ -1026,7 +1026,7 @@ static const vshCmdOptDef opts_interface_unbridge[] = {
|
|||||||
},
|
},
|
||||||
{.name = "no-start",
|
{.name = "no-start",
|
||||||
.type = VSH_OT_BOOL,
|
.type = VSH_OT_BOOL,
|
||||||
.help = N_("don't start the un-slaved interface immediately (not recommended)")
|
.help = N_("don't start the detached interface immediately (not recommended)")
|
||||||
},
|
},
|
||||||
{.name = NULL}
|
{.name = NULL}
|
||||||
};
|
};
|
||||||
@ -1103,8 +1103,8 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *cmd)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change the type and name of the outer/master interface to
|
/* Change the type and name of the bridge interface to
|
||||||
* the type/name of the attached slave interface.
|
* the type/name of the attached interface.
|
||||||
*/
|
*/
|
||||||
if (!(if_name = virXMLPropString(if_node, "name"))) {
|
if (!(if_name = virXMLPropString(if_node, "name"))) {
|
||||||
vshError(ctl, _("Device attached to bridge %s has no name"), br_name);
|
vshError(ctl, _("Device attached to bridge %s has no name"), br_name);
|
||||||
@ -1154,7 +1154,7 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *cmd)
|
|||||||
xmlDocDumpMemory(xml_doc, &if_xml, &if_xml_size);
|
xmlDocDumpMemory(xml_doc, &if_xml, &if_xml_size);
|
||||||
|
|
||||||
if (!if_xml || if_xml_size <= 0) {
|
if (!if_xml || if_xml_size <= 0) {
|
||||||
vshError(ctl, _("Failed to format new xml document for un-enslaved interface %s"),
|
vshError(ctl, _("Failed to format new xml document for detached interface %s"),
|
||||||
if_name);
|
if_name);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user