From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: w.bumiller@proxmox.com, berrange@redhat.com,
qemu-devel@nongnu.org, marcandre.lureau@gmail.com,
kraxel@redhat.com, pbonzini@redhat.com,
marcandre.lureau@redhat.com, Fabian Ebner <f.ebner@proxmox.com>,
eblake@redhat.com, t.lamprecht@proxmox.com
Subject: Re: [PATCH v8 1/3] monitor/hmp: add support for flag argument with value
Date: Thu, 24 Feb 2022 11:30:17 +0000 [thread overview]
Message-ID: <YhdsSR7oWklovhd1@work-vm> (raw)
In-Reply-To: <87zgmgvauv.fsf@pond.sub.org>
* Markus Armbruster (armbru@redhat.com) wrote:
> Fabian Ebner <f.ebner@proxmox.com> writes:
>
> > Am 09.02.22 um 15:12 schrieb Markus Armbruster:
> >> Fabian Ebner <f.ebner@proxmox.com> writes:
> >
> > ----8<----
> >
> >>> diff --git a/monitor/monitor-internal.h b/monitor/monitor-internal.h
> >>> index 3da3f86c6a..a4cb307c8a 100644
> >>> --- a/monitor/monitor-internal.h
> >>> +++ b/monitor/monitor-internal.h
> >>> @@ -63,7 +63,8 @@
> >>> * '.' other form of optional type (for 'i' and 'l')
> >>> * 'b' boolean
> >>> * user mode accepts "on" or "off"
> >>> - * '-' optional parameter (eg. '-f')
> >>> + * '-' optional parameter (eg. '-f'); if followed by a 'V', it
> >>> + * specifies an optional string param (e.g. '-fV' allows '-f foo')
> >>> *
> >>> */
> >>
> >> For what it's worth, getopt() uses ':' after the option character for
> >> "takes an argument".
> >>
> >
> > Doing that leads to e.g.
> > .args_type = "protocol:s,password:s,display:-d:,connected:s?",
> > so there's two different kinds of colons now.
>
> Point.
Yeh, : is probably a bad idea.
> > It's not a problem
> > functionality-wise AFAICT, but it might not be ideal. Should I still go
> > for it?
> >
> > Also, wouldn't future non-string flag parameters need their own letter
> > too? What about re-using 's' here instead?
>
> Another good point.
>
> Dave, what do you think?
Yeh, I'd be happy reusing 's' here.
Dave
> >> Happy to make that tweak in my tree. But see my review of PATCH 3
> >> first.
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2022-02-24 11:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-04 10:12 [PATCH v8 0/3] VNC-related HMP/QMP fixes Fabian Ebner
2022-02-04 10:12 ` [PATCH v8 1/3] monitor/hmp: add support for flag argument with value Fabian Ebner
2022-02-09 14:12 ` Markus Armbruster
2022-02-24 9:17 ` Fabian Ebner
2022-02-24 10:04 ` Markus Armbruster
2022-02-24 11:30 ` Dr. David Alan Gilbert [this message]
2022-02-04 10:12 ` [PATCH v8 2/3] qapi/monitor: refactor set/expire_password with enums Fabian Ebner
2022-02-09 13:43 ` Markus Armbruster
2022-02-04 10:12 ` [PATCH v8 3/3] qapi/monitor: allow VNC display id in set/expire_password Fabian Ebner
2022-02-09 14:07 ` Markus Armbruster
2022-02-17 7:42 ` Fabian Ebner
2022-02-17 8:04 ` Markus Armbruster
2022-02-23 13:45 ` Dr. David Alan Gilbert
2022-03-02 11:39 ` [PATCH v8 0/3] VNC-related HMP/QMP fixes Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YhdsSR7oWklovhd1@work-vm \
--to=dgilbert@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=f.ebner@proxmox.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=t.lamprecht@proxmox.com \
--cc=w.bumiller@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).