mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh: Create macro for common "live" 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 running domain". 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:
@@ -291,10 +291,7 @@ static const vshCmdOptDef opts_dommemstat[] = {
|
||||
.help = N_("period in seconds to set collection")
|
||||
},
|
||||
VIRSH_COMMON_OPT_CONFIG(N_("affect next boot")),
|
||||
{.name = "live",
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("affect running domain")
|
||||
},
|
||||
VIRSH_COMMON_OPT_LIVE(N_("affect running domain")),
|
||||
{.name = "current",
|
||||
.type = VSH_OT_BOOL,
|
||||
.help = N_("affect current domain")
|
||||
|
||||
Reference in New Issue
Block a user