mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
watchdog: remove -watchdog option
This was deprecated in 6.2 and is ready to go. It removes quite a bit of code that handled the registration of watchdog models. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
7089977a24
commit
5433af7697
12 changed files with 7 additions and 143 deletions
|
@ -32,49 +32,6 @@
|
|||
#include "qemu/help_option.h"
|
||||
|
||||
static WatchdogAction watchdog_action = WATCHDOG_ACTION_RESET;
|
||||
static QLIST_HEAD(, WatchdogTimerModel) watchdog_list;
|
||||
|
||||
void watchdog_add_model(WatchdogTimerModel *model)
|
||||
{
|
||||
QLIST_INSERT_HEAD(&watchdog_list, model, entry);
|
||||
}
|
||||
|
||||
/* Returns:
|
||||
* 0 = continue
|
||||
* 1 = exit program with error
|
||||
* 2 = exit program without error
|
||||
*/
|
||||
int select_watchdog(const char *p)
|
||||
{
|
||||
WatchdogTimerModel *model;
|
||||
QemuOpts *opts;
|
||||
|
||||
/* -watchdog ? lists available devices and exits cleanly. */
|
||||
if (is_help_option(p)) {
|
||||
QLIST_FOREACH(model, &watchdog_list, entry) {
|
||||
fprintf(stderr, "\t%s\t%s\n",
|
||||
model->wdt_name, model->wdt_description);
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
|
||||
QLIST_FOREACH(model, &watchdog_list, entry) {
|
||||
if (strcasecmp(model->wdt_name, p) == 0) {
|
||||
/* add the device */
|
||||
opts = qemu_opts_create(qemu_find_opts("device"), NULL, 0,
|
||||
&error_abort);
|
||||
qemu_opt_set(opts, "driver", p, &error_abort);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stderr, "Unknown -watchdog device. Supported devices are:\n");
|
||||
QLIST_FOREACH(model, &watchdog_list, entry) {
|
||||
fprintf(stderr, "\t%s\t%s\n",
|
||||
model->wdt_name, model->wdt_description);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
WatchdogAction get_watchdog_action(void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue