ioemu: Fix segfault when creating qcow-backed vbds.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2008-03-03 13:54:05 +00:00
1 parent 76ec5868d2
commit 2ac6718f9d
3 files changed
+1 -9

No files matched your search

-2
View File
@@ -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
View File
@@ -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;
-3
View File
@@ -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;
};
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.