mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
virsh-network: Avoid 'vir' prefix for locally declared VIR_ENUM* helpers
Stuff used in virsh should use 'virsh'. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9e7f32790a
commit
0c038aeffc
@ -943,13 +943,13 @@ static const vshCmdOptDef opts_network_update[] = {
|
|||||||
{.name = NULL}
|
{.name = NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
VIR_ENUM_DECL(virNetworkUpdateCommand);
|
VIR_ENUM_DECL(virshNetworkUpdateCommand);
|
||||||
VIR_ENUM_IMPL(virNetworkUpdateCommand,
|
VIR_ENUM_IMPL(virshNetworkUpdateCommand,
|
||||||
VIR_NETWORK_UPDATE_COMMAND_LAST,
|
VIR_NETWORK_UPDATE_COMMAND_LAST,
|
||||||
"none", "modify", "delete", "add-last", "add-first");
|
"none", "modify", "delete", "add-last", "add-first");
|
||||||
|
|
||||||
VIR_ENUM_DECL(virNetworkSection);
|
VIR_ENUM_DECL(virshNetworkSection);
|
||||||
VIR_ENUM_IMPL(virNetworkSection,
|
VIR_ENUM_IMPL(virshNetworkSection,
|
||||||
VIR_NETWORK_SECTION_LAST,
|
VIR_NETWORK_SECTION_LAST,
|
||||||
"none", "bridge", "domain", "ip", "ip-dhcp-host",
|
"none", "bridge", "domain", "ip", "ip-dhcp-host",
|
||||||
"ip-dhcp-range", "forward", "forward-interface",
|
"ip-dhcp-range", "forward", "forward-interface",
|
||||||
@ -983,7 +983,7 @@ cmdNetworkUpdate(vshControl *ctl, const vshCmd *cmd)
|
|||||||
/* "add" is a synonym for "add-last" */
|
/* "add" is a synonym for "add-last" */
|
||||||
command = VIR_NETWORK_UPDATE_COMMAND_ADD_LAST;
|
command = VIR_NETWORK_UPDATE_COMMAND_ADD_LAST;
|
||||||
} else {
|
} else {
|
||||||
command = virNetworkUpdateCommandTypeFromString(commandStr);
|
command = virshNetworkUpdateCommandTypeFromString(commandStr);
|
||||||
if (command <= 0 || command >= VIR_NETWORK_UPDATE_COMMAND_LAST) {
|
if (command <= 0 || command >= VIR_NETWORK_UPDATE_COMMAND_LAST) {
|
||||||
vshError(ctl, _("unrecognized command name '%s'"), commandStr);
|
vshError(ctl, _("unrecognized command name '%s'"), commandStr);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -993,7 +993,7 @@ cmdNetworkUpdate(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (vshCommandOptStringReq(ctl, cmd, "section", §ionStr) < 0)
|
if (vshCommandOptStringReq(ctl, cmd, "section", §ionStr) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
section = virNetworkSectionTypeFromString(sectionStr);
|
section = virshNetworkSectionTypeFromString(sectionStr);
|
||||||
if (section <= 0 || section >= VIR_NETWORK_SECTION_LAST) {
|
if (section <= 0 || section >= VIR_NETWORK_SECTION_LAST) {
|
||||||
vshError(ctl, _("unrecognized section name '%s'"), sectionStr);
|
vshError(ctl, _("unrecognized section name '%s'"), sectionStr);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user