]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qemu-nbd.c
memory-device: break the loop if tmp exceed the hinted range
[mirror_qemu.git] / qemu-nbd.c
index 9032b6de2acef18a8e17f367175d8511ec0fd433..caacf0ed7379749fbde1d7327040327203b78885 100644 (file)
@@ -507,6 +507,13 @@ static QemuOptsList qemu_object_opts = {
     },
 };
 
+static bool qemu_nbd_object_print_help(const char *type, QemuOpts *opts)
+{
+    if (user_creatable_print_help(type, opts)) {
+        exit(0);
+    }
+    return true;
+}
 
 
 static QCryptoTLSCreds *nbd_get_tls_creds(const char *id, bool list,
@@ -902,7 +909,7 @@ int main(int argc, char **argv)
 
     qemu_opts_foreach(&qemu_object_opts,
                       user_creatable_add_opts_foreach,
-                      NULL, &error_fatal);
+                      qemu_nbd_object_print_help, &error_fatal);
 
     if (!trace_init_backends()) {
         exit(1);