Revision 92b30744

b/block/qcow2.c
52 52
#define  QCOW_EXT_MAGIC_END 0
53 53
#define  QCOW_EXT_MAGIC_BACKING_FORMAT 0xE2792ACA
54 54

  
55
static BlockDriver bdrv_qcow2;
56

  
57 55
static int qcow_probe(const uint8_t *buf, int buf_size, const char *filename)
58 56
{
59 57
    const QCowHeader *cow_header = (const void *)buf;
......
1018 1016
    /* Preallocate metadata */
1019 1017
    if (ret == 0 && prealloc) {
1020 1018
        BlockDriverState *bs;
1019
        BlockDriver *drv = bdrv_find_format("qcow2");
1021 1020
        bs = bdrv_new("");
1022
        bdrv_open(bs, filename, BDRV_O_CACHE_WB | BDRV_O_RDWR, &bdrv_qcow2);
1021
        bdrv_open(bs, filename, BDRV_O_CACHE_WB | BDRV_O_RDWR, drv);
1023 1022
        preallocate(bs);
1024 1023
        bdrv_close(bs);
1025 1024
    }

Also available in: Unified diff