[PATCH 02/28] virsh: cmdDomdisplayReload: Require option name for --type

Peter Krempa posted 28 patches 1 year, 11 months ago
[PATCH 02/28] virsh: cmdDomdisplayReload: Require option name for --type
Posted by Peter Krempa 1 year, 11 months ago
As this command was introduced in this release add the flag requiring to
pass optionname.

This is needed to actually disallow positional parsing of the value
despite documenting that the flag name is required.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 tools/virsh-domain.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 35809a866b..cd37828660 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -13290,6 +13290,7 @@ static const vshCmdOptDef opts_domdisplay_reload[] = {
     VIRSH_COMMON_OPT_DOMAIN_FULL(0),
     {.name = "type",
      .type = VSH_OT_INT,
+     .flags = VSH_OFLAG_REQ_OPT,
      .help = N_("graphics display type")
     },
     {.name = NULL}
-- 
2.44.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH 02/28] virsh: cmdDomdisplayReload: Require option name for --type
Posted by Ján Tomko 1 year, 10 months ago
On a Friday in 2024, Peter Krempa wrote:
>As this command was introduced in this release add the flag requiring to
>pass optionname.
>
>This is needed to actually disallow positional parsing of the value
>despite documenting that the flag name is required.
>

The flag name is documented as optional in the man page.

>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> tools/virsh-domain.c | 1 +
> 1 file changed, 1 insertion(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH 02/28] virsh: cmdDomdisplayReload: Require option name for --type
Posted by Peter Krempa 1 year, 10 months ago
On Wed, Mar 20, 2024 at 18:03:16 +0100, Ján Tomko wrote:
> On a Friday in 2024, Peter Krempa wrote:
> > As this command was introduced in this release add the flag requiring to
> > pass optionname.
> > 
> > This is needed to actually disallow positional parsing of the value
> > despite documenting that the flag name is required.
> > 
> 
> The flag name is documented as optional in the man page.
> 
> > Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> > ---
> > tools/virsh-domain.c | 1 +
> > 1 file changed, 1 insertion(+)
> > 
> 
> Reviewed-by: Ján Tomko <jtomko@redhat.com>

I've fixed the manpage and pushed this one as it's modifying definition
for an unreleased command. The rest will wait for the release.
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org