提交 606fb397 编写于 作者: P Peter Krempa

util: qcow2GetExtensions: Remove support for 'data file' extension

The implementation was never finished in libvirt. Remove it.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 38757cb1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册