mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh: Create macro for common "config" option
Rather than continually cut-n-paste the strings into each command, create a common macro to be used generically. The macro will take a single argument _helpstr which for many options in virsh-domain.c is simply "affect next boot". So, create a second macro within that file in order to define the more common use as a revector to the common macro with the common _helpstr. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
@@ -290,10 +290,7 @@ static const vshCmdOptDef opts_dommemstat[] = {
|
||||
.flags = VSH_OFLAG_REQ_OPT,
|
||||
.help = N_("period in seconds to set collection")
|
||||
},
|
||||
{.name = "config",
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("affect next boot")
|
||||
},
|
||||
VIRSH_COMMON_OPT_CONFIG(N_("affect next boot")),
|
||||
{.name = "live",
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("affect running domain")
|
||||
@@ -681,10 +678,7 @@ static const vshCmdOptDef opts_domif_getlink[] = {
|
||||
.type = VSH_OT_ALIAS,
|
||||
.help = "config"
|
||||
},
|
||||
{.name = "config",
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("Get persistent interface state")
|
||||
},
|
||||
VIRSH_COMMON_OPT_CONFIG(N_("Get persistent interface state")),
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user