]> git.proxmox.com Git - qemu.git/blobdiff - hw/watchdog.c
monitor: move include files to include/monitor/
[qemu.git] / hw / watchdog.c
index a42124d5205b163aa100c84288bf484c6e4951be..623b299f71e5dbb083ca22faae51e81c110ce027 100644 (file)
@@ -23,8 +23,8 @@
 #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"
 
@@ -55,7 +55,7 @@ int select_watchdog(const char *p)
     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);
@@ -66,7 +66,7 @@ int select_watchdog(const char *p)
     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;
         }