mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
ioemu: Fix segfault when creating qcow-backed vbds.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
1 parent
76ec5868d2
commit
2ac6718f9d
3 files changed
+1
-9
No files matched your search
@@ -1489,7 +1489,5 @@ BlockDriver bdrv_host_device = {
|
||||
.bdrv_pread = raw_pread,
|
||||
.bdrv_pwrite = raw_pwrite,
|
||||
.bdrv_getlength = raw_getlength,
|
||||
|
||||
.bdrv_flags = BLOCK_DRIVER_FLAG_EXTENDABLE
|
||||
};
|
||||
#endif /* _WIN32 */
|
||||
+1
-4
@@ -350,11 +350,8 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags,
|
||||
bs->is_temporary = 0;
|
||||
bs->encrypted = 0;
|
||||
|
||||
if (flags & BDRV_O_EXTENDABLE) {
|
||||
if (!(drv->bdrv_flags & BLOCK_DRIVER_FLAG_EXTENDABLE))
|
||||
return -ENOSYS;
|
||||
if (flags & BDRV_O_EXTENDABLE)
|
||||
bs->extendable = 1;
|
||||
}
|
||||
|
||||
if (flags & BDRV_O_SNAPSHOT) {
|
||||
BlockDriverState *bs1;
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
#ifndef BLOCK_INT_H
|
||||
#define BLOCK_INT_H
|
||||
|
||||
#define BLOCK_DRIVER_FLAG_EXTENDABLE 0x0001u
|
||||
|
||||
struct BlockDriver {
|
||||
const char *format_name;
|
||||
int instance_size;
|
||||
@@ -78,7 +76,6 @@ struct BlockDriver {
|
||||
int (*bdrv_eject)(BlockDriverState *bs, int eject_flag);
|
||||
int (*bdrv_set_locked)(BlockDriverState *bs, int locked);
|
||||
|
||||
unsigned bdrv_flags;
|
||||
BlockDriverAIOCB *free_aiocb;
|
||||
struct BlockDriver *next;
|
||||
};
|
||||
|
||||