mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
virsh: Inline VIRSH_COMMON_OPT_FILE_FULL macro
The macro is used in one place only and the command definition will be altered. Inline it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
7a696e9c3d
commit
d2e29eb74c
@ -1635,8 +1635,11 @@ static const vshCmdInfo info_hypervisor_cpu_baseline = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const vshCmdOptDef opts_hypervisor_cpu_baseline[] = {
|
static const vshCmdOptDef opts_hypervisor_cpu_baseline[] = {
|
||||||
VIRSH_COMMON_OPT_FILE_FULL(N_("file containing XML CPU descriptions"),
|
{.name = "file",
|
||||||
false),
|
.type = VSH_OT_STRING,
|
||||||
|
.completer = virshCompletePathLocalExisting,
|
||||||
|
.help = N_("file containing XML CPU descriptions"),
|
||||||
|
},
|
||||||
{.name = "virttype",
|
{.name = "virttype",
|
||||||
.type = VSH_OT_STRING,
|
.type = VSH_OT_STRING,
|
||||||
.completer = virshDomainVirtTypeCompleter,
|
.completer = virshDomainVirtTypeCompleter,
|
||||||
|
@ -98,13 +98,10 @@
|
|||||||
|
|
||||||
/* Use this only for files which are existing and used locally by virsh */
|
/* Use this only for files which are existing and used locally by virsh */
|
||||||
#define VIRSH_COMMON_OPT_FILE(_helpstr) \
|
#define VIRSH_COMMON_OPT_FILE(_helpstr) \
|
||||||
VIRSH_COMMON_OPT_FILE_FULL(_helpstr, true)
|
|
||||||
|
|
||||||
#define VIRSH_COMMON_OPT_FILE_FULL(_helpstr, required_) \
|
|
||||||
{.name = "file", \
|
{.name = "file", \
|
||||||
.type = VSH_OT_STRING, \
|
.type = VSH_OT_STRING, \
|
||||||
.required = required_, \
|
.required = true, \
|
||||||
.positional = required_, \
|
.positional = true, \
|
||||||
.completer = virshCompletePathLocalExisting, \
|
.completer = virshCompletePathLocalExisting, \
|
||||||
.help = _helpstr \
|
.help = _helpstr \
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user