Revision a655211a
b/block/vvfat.c | ||
---|---|---|
2788 | 2788 |
{ |
2789 | 2789 |
BlockDriver *bdrv_qcow; |
2790 | 2790 |
QEMUOptionParameter *options; |
2791 |
int ret; |
|
2791 | 2792 |
int size = sector2cluster(s, s->sector_count); |
2792 | 2793 |
s->used_clusters = calloc(size, 1); |
2793 | 2794 |
|
... | ... | |
2803 | 2804 |
|
2804 | 2805 |
if (bdrv_create(bdrv_qcow, s->qcow_filename, options) < 0) |
2805 | 2806 |
return -1; |
2807 |
|
|
2806 | 2808 |
s->qcow = bdrv_new(""); |
2807 |
if (s->qcow == NULL || |
|
2808 |
bdrv_open(s->qcow, s->qcow_filename, BDRV_O_RDWR, bdrv_qcow) < 0) |
|
2809 |
{ |
|
2810 |
return -1; |
|
2809 |
if (s->qcow == NULL) { |
|
2810 |
return -1; |
|
2811 |
} |
|
2812 |
|
|
2813 |
ret = bdrv_open(s->qcow, s->qcow_filename, |
|
2814 |
BDRV_O_RDWR | BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH, bdrv_qcow); |
|
2815 |
if (ret < 0) { |
|
2816 |
return ret; |
|
2811 | 2817 |
} |
2812 | 2818 |
|
2813 | 2819 |
#ifndef _WIN32 |
Also available in: Unified diff