]> git.proxmox.com Git - qemu.git/blobdiff - block/qcow.c
block: Use error code EMEDIUMTYPE for wrong format in some block drivers
[qemu.git] / block / qcow.c
index 4276610afd9341fdbeabb18113da1eb3d04af084..a7135eea4790243bb85151d4fa59fa63282b0e88 100644 (file)
@@ -112,7 +112,7 @@ static int qcow_open(BlockDriverState *bs, int flags)
     be64_to_cpus(&header.l1_table_offset);
 
     if (header.magic != QCOW_MAGIC) {
-        ret = -EINVAL;
+        ret = -EMEDIUMTYPE;
         goto fail;
     }
     if (header.version != QCOW_VERSION) {