From: Peter Krempa Date: Thu, 14 Mar 2024 21:14:31 +0000 (+0100) Subject: virsh: Inline VIRSH_COMMON_OPT_FILE_FULL macro X-Git-Tag: v10.3.0-rc1~135 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2e29eb74c01fcb971ec56be601a6d5a6a4ddd61;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Ján Tomko --- diff --git a/tools/virsh-host.c b/tools/virsh-host.c index ffb993de79..712db39d35 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c @@ -1635,8 +1635,11 @@ static const vshCmdInfo info_hypervisor_cpu_baseline = { }; static const vshCmdOptDef opts_hypervisor_cpu_baseline[] = { - VIRSH_COMMON_OPT_FILE_FULL(N_("file containing XML CPU descriptions"), - false), + {.name = "file", + .type = VSH_OT_STRING, + .completer = virshCompletePathLocalExisting, + .help = N_("file containing XML CPU descriptions"), + }, {.name = "virttype", .type = VSH_OT_STRING, .completer = virshDomainVirtTypeCompleter, diff --git a/tools/virsh.h b/tools/virsh.h index ff0cf80911..90ffc4bf18 100644 --- a/tools/virsh.h +++ b/tools/virsh.h @@ -98,13 +98,10 @@ /* Use this only for files which are existing and used locally by virsh */ #define VIRSH_COMMON_OPT_FILE(_helpstr) \ - VIRSH_COMMON_OPT_FILE_FULL(_helpstr, true) - -#define VIRSH_COMMON_OPT_FILE_FULL(_helpstr, required_) \ {.name = "file", \ .type = VSH_OT_STRING, \ - .required = required_, \ - .positional = required_, \ + .required = true, \ + .positional = true, \ .completer = virshCompletePathLocalExisting, \ .help = _helpstr \ }