]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qemu-io.c
target/arm: Fix aa64 ldp register writeback
[mirror_qemu.git] / qemu-io.c
index 23a229f880b15ec44bf26771d04a9d325e03dab5..ed0e2dceaa7f641e5ad513fa97615e2a332d0838 100644 (file)
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -595,13 +595,17 @@ int main(int argc, char **argv)
                 exit(1);
             }
             opts = qemu_opts_to_qdict(qopts, NULL);
-            openfile(NULL, flags, writethrough, opts);
+            if (openfile(NULL, flags, writethrough, opts)) {
+                exit(1);
+            }
         } else {
             if (format) {
                 opts = qdict_new();
-                qdict_put(opts, "driver", qstring_from_str(format));
+                qdict_put_str(opts, "driver", format);
+            }
+            if (openfile(argv[optind], flags, writethrough, opts)) {
+                exit(1);
             }
-            openfile(argv[optind], flags, writethrough, opts);
         }
     }
     command_loop();