vl: deprecate -watchdog

-watchdog is the same as -device except that it is case insensitive (and it
allows only watchdog devices of course).  Now that "-device help" can list
as such the available watchdog devices, we can deprecate it.

Note that even though -watchdog tries to be case insensitive, it fails
at that: "-watchdog i6300xyz" fails with "Unknown -watchdog device",
but "-watchdog i6300ESB" also fails (when the generated -device option
is processed) with an error "'i6300ESB' is not a valid device model name".
For this reason, the documentation update does not mention the case
insensitivity of -watchdog.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2021-10-27 14:48:03 +02:00
parent b10cb62752
commit d12b64eaeb
2 changed files with 6 additions and 0 deletions

View File

@ -160,6 +160,11 @@ Use ``-display sdl`` instead.
Use ``-display curses`` instead. Use ``-display curses`` instead.
``-watchdog`` (since 6.2)
'''''''''''''''''''''''''
Use ``-device`` instead.
``-smp`` ("parameter=0" SMP configurations) (since 6.2) ``-smp`` ("parameter=0" SMP configurations) (since 6.2)
''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''

View File

@ -3256,6 +3256,7 @@ void qemu_init(int argc, char **argv, char **envp)
error_report("only one watchdog option may be given"); error_report("only one watchdog option may be given");
exit(1); exit(1);
} }
warn_report("-watchdog is deprecated; use -device instead.");
watchdog = optarg; watchdog = optarg;
break; break;
case QEMU_OPTION_action: case QEMU_OPTION_action: