Revision e183ef75 block/vvfat.c

b/block/vvfat.c
2727 2727
    return 0;
2728 2728
}
2729 2729

  
2730
static coroutine_fn int vvfat_co_write(BlockDriverState *bs, int64_t sector_num,
2731
                                       const uint8_t *buf, int nb_sectors)
2732
{
2733
    int ret;
2734
    BDRVVVFATState *s = bs->opaque;
2735
    qemu_co_mutex_lock(&s->lock);
2736
    ret = vvfat_write(bs, sector_num, buf, nb_sectors);
2737
    qemu_co_mutex_unlock(&s->lock);
2738
    return ret;
2739
}
2740

  
2730 2741
static int vvfat_is_allocated(BlockDriverState *bs,
2731 2742
	int64_t sector_num, int nb_sectors, int* n)
2732 2743
{
......
2817 2828
    .instance_size	= sizeof(BDRVVVFATState),
2818 2829
    .bdrv_file_open	= vvfat_open,
2819 2830
    .bdrv_read          = vvfat_co_read,
2820
    .bdrv_write		= vvfat_write,
2831
    .bdrv_write         = vvfat_co_write,
2821 2832
    .bdrv_close		= vvfat_close,
2822 2833
    .bdrv_is_allocated	= vvfat_is_allocated,
2823 2834
    .protocol_name	= "fat",

Also available in: Unified diff