* [PATCH] qemu-option: do not suggest using the delay option
@ 2021-03-04 10:28 Paolo Bonzini
2021-03-04 10:54 ` Daniel P. Berrangé
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2021-03-04 10:28 UTC (permalink / raw)
To: qemu-devel; +Cc: berrange, armbru
The "delay" option was a hack that was introduced to allow writing "nodelay".
We are adding a "nodelay" option to be used as "nodelay=on", so recommend it
instead of "delay".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
This is quite ugly, so I am posting it as RFC in case others
have better idea. Nevertheless, a proper deprecation of "delay"
cannot be done if QEMU starts suggesting it, and since it's the
only case I opted for this very much ad-hoc patch.
---
docs/system/deprecated.rst | 6 ++++++
util/qemu-option.c | 7 ++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index fcf0ca4068..cfabe69846 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -134,6 +134,12 @@ Boolean options such as ``share=on``/``share=off`` could be written
in short form as ``share`` and ``noshare``. This is now deprecated
and will cause a warning.
+``delay`` option for socket character devices (since 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The replacement for the ``nodelay`` short-form boolean option is ``nodelay=on``
+rather than ``delay=off``.
+
``--enable-fips`` (since 6.0)
'''''''''''''''''''''''''''''
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 40564a12eb..3057942a5c 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -785,7 +785,12 @@ static const char *get_opt_name_value(const char *params,
}
if (!is_help && warn_on_flag) {
warn_report("short-form boolean option '%s%s' deprecated", prefix, *name);
- error_printf("Please use %s=%s instead\n", *name, *value);
+ if (g_str_equal(name, "delay")) {
+ error_printf("Please use nodelay=%s instead\n", *name,
+ prefix[0] ? "on" : "off");
+ } else {
+ error_printf("Please use %s=%s instead\n", *name, *value);
+ }
}
}
} else {
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] qemu-option: do not suggest using the delay option
2021-03-04 10:28 [PATCH] qemu-option: do not suggest using the delay option Paolo Bonzini
@ 2021-03-04 10:54 ` Daniel P. Berrangé
0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrangé @ 2021-03-04 10:54 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, armbru
On Thu, Mar 04, 2021 at 11:28:27AM +0100, Paolo Bonzini wrote:
> The "delay" option was a hack that was introduced to allow writing "nodelay".
> We are adding a "nodelay" option to be used as "nodelay=on", so recommend it
> instead of "delay".
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> This is quite ugly, so I am posting it as RFC in case others
> have better idea. Nevertheless, a proper deprecation of "delay"
> cannot be done if QEMU starts suggesting it, and since it's the
> only case I opted for this very much ad-hoc patch.
It is ugly, but this is a rare enough edge case that I think we can live
with it.
> ---
> docs/system/deprecated.rst | 6 ++++++
> util/qemu-option.c | 7 ++++++-
> 2 files changed, 12 insertions(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-04 10:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-04 10:28 [PATCH] qemu-option: do not suggest using the delay option Paolo Bonzini
2021-03-04 10:54 ` Daniel P. Berrangé
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).