Skip to contentSkip to conversation

Fix regression for "-drive file="

PATCH In review Markus Armbruster 2 participants 3 messages May 11, 2010 – Jun 8, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix regression for "-drive file="

Empty file used to create an empty drive (no media). Since commit 9dfd7c7a, it's an error: "qemu: could not open disk image : No such file or directory". Older versions of libvirt can choke on this.

---
If this goes in, I'll prepare a patch for stable as well.

 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
vl.c +1 -1
index 85bcc84..78ec1b2 100644
@@ -1097,7 +1097,7 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque,
     case IF_COUNT:
         abort();
     }
-    if (!file) {
+    if (!file || !*file) {
         *fatal_error = 0;
         return NULL;
     }
Signature · 1 line
1.6.6.1
#1 lore raw

Did this fall through the cracks?

Quoted 24 lines · Markus Armbruster

Empty file used to create an empty drive (no media). Since commit 9dfd7c7a, it's an error: "qemu: could not open disk image : No such file or directory". Older versions of libvirt can choke on this.

---
If this goes in, I'll prepare a patch for stable as well.

 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
vl.c +1 -1
index 85bcc84..78ec1b2 100644
@@ -1097,7 +1097,7 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque,
     case IF_COUNT:
         abort();
     }
-    if (!file) {
+    if (!file || !*file) {
         *fatal_error = 0;
         return NULL;
     }
#2 lore raw

Am 08.06.2010 09:38, schrieb Markus Armbruster:

Quoted 1 line

Did this fall through the cracks?

Looks like it. Rebased and applied to the block branch.

Kevin

Quoted 27 lines
Quoted 24 lines · Markus Armbruster

Empty file used to create an empty drive (no media). Since commit 9dfd7c7a, it's an error: "qemu: could not open disk image : No such file or directory". Older versions of libvirt can choke on this.

---
If this goes in, I'll prepare a patch for stable as well.

 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
vl.c +1 -1
index 85bcc84..78ec1b2 100644
@@ -1097,7 +1097,7 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque,
     case IF_COUNT:
         abort();
     }
-    if (!file) {
+    if (!file || !*file) {
         *fatal_error = 0;
         return NULL;
     }