[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] qed: Minor updates to QED support patches



This patch makes two corrections to the newly-added QED support patch series:

 - Correct the QED header field offsets
 - Remove XML parsing for VIR_STORAGE_FILE_AUTO_SAFE

Signed-off-by: Adam Litke <agl us ibm com>
---
 src/util/storage_file.c |    6 +++---
 src/util/storage_file.h |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/util/storage_file.c b/src/util/storage_file.c
index aa117e7..2612eb6 100644
--- a/src/util/storage_file.c
+++ b/src/util/storage_file.c
@@ -42,7 +42,7 @@
 
 VIR_ENUM_IMPL(virStorageFileFormat,
               VIR_STORAGE_FILE_LAST,
-              "raw", "probe", "dir", "bochs",
+              "raw", "dir", "bochs",
               "cloop", "cow", "dmg", "iso",
               "qcow", "qcow2", "qed", "vmdk", "vpc")
 
@@ -108,8 +108,8 @@ qedGetBackingStore(char **, int *, const unsigned char *, size_t);
 #define QCOW2_HDR_EXTENSION_BACKING_FORMAT 0xE2792ACA
 
 #define QED_HDR_FEATURES_OFFSET (4+4+4+4)
-#define QED_HDR_IMAGE_SIZE (QED_HDR_FEATURES_OFFSET+8+8+8)
-#define QED_HDR_BACKING_FILE_OFFSET (QED_HDR_IMAGE_SIZE+8+8)
+#define QED_HDR_IMAGE_SIZE (QED_HDR_FEATURES_OFFSET+8+8+8+8)
+#define QED_HDR_BACKING_FILE_OFFSET (QED_HDR_IMAGE_SIZE+8)
 #define QED_HDR_BACKING_FILE_SIZE (QED_HDR_BACKING_FILE_OFFSET+4)
 #define QED_F_BACKING_FILE 0x01
 #define QED_F_BACKING_FORMAT_NO_PROBE 0x04
diff --git a/src/util/storage_file.h b/src/util/storage_file.h
index 1b91830..04c1bb2 100644
--- a/src/util/storage_file.h
+++ b/src/util/storage_file.h
@@ -28,9 +28,9 @@
 # include <stdbool.h>
 
 enum virStorageFileFormat {
+    VIR_STORAGE_FILE_AUTO_SAFE = -2,
     VIR_STORAGE_FILE_AUTO = -1,
     VIR_STORAGE_FILE_RAW = 0,
-    VIR_STORAGE_FILE_AUTO_SAFE,
     VIR_STORAGE_FILE_DIR,
     VIR_STORAGE_FILE_BOCHS,
     VIR_STORAGE_FILE_CLOOP,
-- 
1.7.3.2.164.g6f10c


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]