Skip to content

Commit

Permalink
qemu-option: do not suggest using the delay option
Browse files Browse the repository at this point in the history
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".

This is quite ugly, but a proper deprecation of "delay"
cannot be done if QEMU starts suggesting it.  Since it's the
only case I opted for this very much ad-hoc patch.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed Mar 6, 2021
1 parent f3126d6 commit fe63642
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/system/deprecated.rst
Expand Up @@ -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)
'''''''''''''''''''''''''''''

Expand Down
6 changes: 5 additions & 1 deletion util/qemu-option.c
Expand Up @@ -785,7 +785,11 @@ 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", prefix[0] ? "on" : "off");
} else {
error_printf("Please use %s=%s instead\n", *name, *value);
}
}
}
} else {
Expand Down

0 comments on commit fe63642

Please sign in to comment.