#include "qemu-option.h"
#include "qemu-config.h"
#include "qemu-queue.h"
-#include "qemu-objects.h"
-#include "monitor.h"
+#include "qapi/qmp/types.h"
+#include "monitor/monitor.h"
#include "sysemu.h"
#include "hw/watchdog.h"
QemuOpts *opts;
/* -watchdog ? lists available devices and exits cleanly. */
- if (strcmp(p, "?") == 0) {
+ if (is_help_option(p)) {
QLIST_FOREACH(model, &watchdog_list, entry) {
fprintf(stderr, "\t%s\t%s\n",
model->wdt_name, model->wdt_description);
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, NULL);
+ opts = qemu_opts_create_nofail(qemu_find_opts("device"));
qemu_opt_set(opts, "driver", p);
return 0;
}