Revision eae041fe

b/block.c
3322 3322
    return drv->bdrv_get_info(bs, bdi);
3323 3323
}
3324 3324

  
3325
ImageInfoSpecific *bdrv_get_specific_info(BlockDriverState *bs)
3326
{
3327
    BlockDriver *drv = bs->drv;
3328
    if (drv && drv->bdrv_get_specific_info) {
3329
        return drv->bdrv_get_specific_info(bs);
3330
    }
3331
    return NULL;
3332
}
3333

  
3325 3334
int bdrv_save_vmstate(BlockDriverState *bs, const uint8_t *buf,
3326 3335
                      int64_t pos, int size)
3327 3336
{
b/block/qapi.c
134 134
        info->dirty_flag = bdi.is_dirty;
135 135
        info->has_dirty_flag = true;
136 136
    }
137
    info->format_specific     = bdrv_get_specific_info(bs);
138
    info->has_format_specific = info->format_specific != NULL;
139

  
137 140
    backing_filename = bs->backing_file;
138 141
    if (backing_filename[0] != '\0') {
139 142
        info->backing_filename = g_strdup(backing_filename);
b/include/block/block.h
335 335
int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,
336 336
                          const uint8_t *buf, int nb_sectors);
337 337
int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi);
338
ImageInfoSpecific *bdrv_get_specific_info(BlockDriverState *bs);
338 339
void bdrv_round_to_clusters(BlockDriverState *bs,
339 340
                            int64_t sector_num, int nb_sectors,
340 341
                            int64_t *cluster_sector_num,
b/include/block/block_int.h
168 168
    int (*bdrv_snapshot_load_tmp)(BlockDriverState *bs,
169 169
                                  const char *snapshot_name);
170 170
    int (*bdrv_get_info)(BlockDriverState *bs, BlockDriverInfo *bdi);
171
    ImageInfoSpecific *(*bdrv_get_specific_info)(BlockDriverState *bs);
171 172

  
172 173
    int (*bdrv_save_vmstate)(BlockDriverState *bs, QEMUIOVector *qiov,
173 174
                             int64_t pos);

Also available in: Unified diff