[PATCH 4/4] util: qcow2GetExtensions: Remove support for 'data file' extension

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

 



The implementation was never finished in libvirt. Remove it.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/util/virstoragefile.c | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 32ca481cc0..6dc9d1f016 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -199,7 +199,6 @@ qedGetBackingStore(char **, int *, const char *, size_t);

 #define QCOW2_HDR_EXTENSION_END 0
 #define QCOW2_HDR_EXTENSION_BACKING_FORMAT 0xE2792ACA
-#define QCOW2_HDR_EXTENSION_DATA_FILE 0x44415441

 #define QCOW2v3_HDR_FEATURES_INCOMPATIBLE (QCOW2_HDR_TOTAL_SIZE)
 #define QCOW2v3_HDR_FEATURES_COMPATIBLE (QCOW2v3_HDR_FEATURES_INCOMPATIBLE+8)
@@ -426,8 +425,7 @@ cowGetBackingStore(char **res,
 static int
 qcow2GetExtensions(const char *buf,
                    size_t buf_size,
-                   int *backingFormat,
-                   char **externalDataStoreRaw)
+                   int *backingFormat)
 {
     size_t offset;
     size_t extension_start;
@@ -517,19 +515,6 @@ qcow2GetExtensions(const char *buf,
             break;
         }

-        case QCOW2_HDR_EXTENSION_DATA_FILE: {
-            if (!externalDataStoreRaw)
-                break;
-
-            if (VIR_ALLOC_N(*externalDataStoreRaw, len + 1) < 0)
-                return -1;
-            memcpy(*externalDataStoreRaw, buf + offset, len);
-            (*externalDataStoreRaw)[len] = '\0';
-            VIR_DEBUG("parsed externalDataStoreRaw='%s'",
-                      *externalDataStoreRaw);
-            break;
-        }
-
         case QCOW2_HDR_EXTENSION_END:
             return 0;
         }
@@ -579,7 +564,7 @@ qcowXGetBackingStore(char **res,
     memcpy(*res, buf + offset, size);
     (*res)[size] = '\0';

-    if (qcow2GetExtensions(buf, buf_size, format, NULL) < 0)
+    if (qcow2GetExtensions(buf, buf_size, format) < 0)
         return BACKING_STORE_INVALID;

     return BACKING_STORE_OK;
-- 
2.26.0





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux