On Wed, Nov 17, 2010 at 01:52:41PM -0600, Adam Litke wrote: > Add an entry in fileTypeInfo for QED image files. > > Signed-off-by: Adam Litke <agl@xxxxxxxxxx> > Cc: Stefan Hajnoczi <stefan.hajnoczi@xxxxxxxxxx> > Cc: Anthony Liguori <aliguori@xxxxxxxxxxxxxxxxxx> > --- > src/util/storage_file.c | 9 ++++++++- > src/util/storage_file.h | 1 + > 2 files changed, 9 insertions(+), 1 deletions(-) > > diff --git a/src/util/storage_file.c b/src/util/storage_file.c > index 4098383..6e099ed 100644 > --- a/src/util/storage_file.c > +++ b/src/util/storage_file.c > @@ -43,7 +43,7 @@ VIR_ENUM_IMPL(virStorageFileFormat, > VIR_STORAGE_FILE_LAST, > "raw", "dir", "bochs", > "cloop", "cow", "dmg", "iso", > - "qcow", "qcow2", "vmdk", "vpc") > + "qcow", "qcow2", "qed", "vmdk", "vpc") > > enum lv_endian { > LV_LITTLE_ENDIAN = 1, /* 1234 */ > @@ -104,6 +104,8 @@ static int vmdk4GetBackingStore(char **, int *, > #define QCOW2_HDR_EXTENSION_END 0 > #define QCOW2_HDR_EXTENSION_BACKING_FORMAT 0xE2792ACA > > +#define QED_HDR_IMAGE_SIZE 40 > + > /* VMDK needs at least this to find backing store, > * other formats need less */ > #define STORAGE_MAX_HEAD (20*512) > @@ -151,6 +153,11 @@ static struct FileTypeInfo const fileTypeInfo[] = { > LV_BIG_ENDIAN, 4, 2, > QCOWX_HDR_IMAGE_SIZE, 8, 1, QCOW2_HDR_CRYPT, qcow2GetBackingStore, > }, > + [VIR_STORAGE_FILE_QED] = { > + "QED\0", NULL, > + LV_LITTLE_ENDIAN, -1, -1, > + QED_HDR_IMAGE_SIZE, 8, 1, -1, NULL, > + }, > [VIR_STORAGE_FILE_VMDK] = { > "KDMV", NULL, > LV_LITTLE_ENDIAN, 4, 1, > diff --git a/src/util/storage_file.h b/src/util/storage_file.h > index a3703f5..c4d4650 100644 > --- a/src/util/storage_file.h > +++ b/src/util/storage_file.h > @@ -38,6 +38,7 @@ enum virStorageFileFormat { > VIR_STORAGE_FILE_ISO, > VIR_STORAGE_FILE_QCOW, > VIR_STORAGE_FILE_QCOW2, > + VIR_STORAGE_FILE_QED, > VIR_STORAGE_FILE_VMDK, > VIR_STORAGE_FILE_VPC, > VIR_STORAGE_FILE_LAST, ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list