* where to find encryption mode,
* -1 if encryption is not used */
int (*getBackingStore)(char **res, int *format,
- const unsigned char *buf, size_t buf_size);
+ const char *buf, size_t buf_size);
int (*getFeatures)(virBitmapPtr *features, int format,
- unsigned char *buf, ssize_t len);
+ char *buf, ssize_t len);
};
static int cowGetBackingStore(char **, int *,
- const unsigned char *, size_t);
+ const char *, size_t);
static int qcow1GetBackingStore(char **, int *,
- const unsigned char *, size_t);
+ const char *, size_t);
static int qcow2GetBackingStore(char **, int *,
- const unsigned char *, size_t);
+ const char *, size_t);
static int qcow2GetFeatures(virBitmapPtr *features, int format,
- unsigned char *buf, ssize_t len);
+ char *buf, ssize_t len);
static int vmdk4GetBackingStore(char **, int *,
- const unsigned char *, size_t);
+ const char *, size_t);
static int
-qedGetBackingStore(char **, int *, const unsigned char *, size_t);
+qedGetBackingStore(char **, int *, const char *, size_t);
#define QCOWX_HDR_VERSION (4)
#define QCOWX_HDR_BACKING_FILE_OFFSET (QCOWX_HDR_VERSION+4)
static int
cowGetBackingStore(char **res,
int *format,
- const unsigned char *buf,
+ const char *buf,
size_t buf_size)
{
#define COW_FILENAME_MAXLEN 1024
static int
qcow2GetBackingStoreFormat(int *format,
- const unsigned char *buf,
+ const char *buf,
size_t buf_size,
size_t extension_start,
size_t extension_end)
static int
qcowXGetBackingStore(char **res,
int *format,
- const unsigned char *buf,
+ const char *buf,
size_t buf_size,
bool isQCow2)
{
static int
qcow1GetBackingStore(char **res,
int *format,
- const unsigned char *buf,
+ const char *buf,
size_t buf_size)
{
int ret;
static int
qcow2GetBackingStore(char **res,
int *format,
- const unsigned char *buf,
+ const char *buf,
size_t buf_size)
{
return qcowXGetBackingStore(res, format, buf, buf_size, true);
static int
vmdk4GetBackingStore(char **res,
int *format,
- const unsigned char *buf,
+ const char *buf,
size_t buf_size)
{
static const char prefix[] = "parentFileNameHint=\"";
static int
qedGetBackingStore(char **res,
int *format,
- const unsigned char *buf,
+ const char *buf,
size_t buf_size)
{
unsigned long long flags;
static bool
virStorageFileMatchesMagic(int format,
- unsigned char *buf,
+ char *buf,
size_t buflen)
{
int mlen;
static bool
virStorageFileMatchesVersion(int format,
- unsigned char *buf,
+ char *buf,
size_t buflen)
{
int version;
static int
virStorageFileProbeFormatFromBuf(const char *path,
- unsigned char *buf,
+ char *buf,
size_t buflen)
{
int format = VIR_STORAGE_FILE_RAW;
static int
qcow2GetFeatures(virBitmapPtr *features,
int format,
- unsigned char *buf,
+ char *buf,
ssize_t len)
{
int version = -1;
int format)
{
virStorageFileMetadata *meta = NULL;
- unsigned char *buf = NULL;
+ char *buf = NULL;
ssize_t len = STORAGE_MAX_HEAD;
virStorageFileMetadata *ret = NULL;
struct stat sb;
int
virStorageFileProbeFormatFromFD(const char *path, int fd)
{
- unsigned char *head;
+ char *head = NULL;
ssize_t len = STORAGE_MAX_HEAD;
int ret = -1;
struct stat sb;