ia64/xen-unstable

changeset 17177:d0daf11fb35d

ioemu: Fix segfault when creating qcow-backed vbds.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Mar 03 13:54:05 2008 +0000 (2008-03-03)
parents 38bbaa69c065
children 7530c4dba8a5
files tools/ioemu/block-raw.c tools/ioemu/block.c tools/ioemu/block_int.h
line diff
     1.1 --- a/tools/ioemu/block-raw.c	Mon Mar 03 13:19:44 2008 +0000
     1.2 +++ b/tools/ioemu/block-raw.c	Mon Mar 03 13:54:05 2008 +0000
     1.3 @@ -1489,7 +1489,5 @@ BlockDriver bdrv_host_device = {
     1.4      .bdrv_pread = raw_pread,
     1.5      .bdrv_pwrite = raw_pwrite,
     1.6      .bdrv_getlength = raw_getlength,
     1.7 -
     1.8 -    .bdrv_flags = BLOCK_DRIVER_FLAG_EXTENDABLE
     1.9  };
    1.10  #endif /* _WIN32 */
     2.1 --- a/tools/ioemu/block.c	Mon Mar 03 13:19:44 2008 +0000
     2.2 +++ b/tools/ioemu/block.c	Mon Mar 03 13:54:05 2008 +0000
     2.3 @@ -350,11 +350,8 @@ int bdrv_open2(BlockDriverState *bs, con
     2.4      bs->is_temporary = 0;
     2.5      bs->encrypted = 0;
     2.6  
     2.7 -    if (flags & BDRV_O_EXTENDABLE) {
     2.8 -	if (!(drv->bdrv_flags & BLOCK_DRIVER_FLAG_EXTENDABLE))
     2.9 -	    return -ENOSYS;
    2.10 +    if (flags & BDRV_O_EXTENDABLE)
    2.11  	bs->extendable = 1;
    2.12 -    }
    2.13  
    2.14      if (flags & BDRV_O_SNAPSHOT) {
    2.15          BlockDriverState *bs1;
     3.1 --- a/tools/ioemu/block_int.h	Mon Mar 03 13:19:44 2008 +0000
     3.2 +++ b/tools/ioemu/block_int.h	Mon Mar 03 13:54:05 2008 +0000
     3.3 @@ -24,8 +24,6 @@
     3.4  #ifndef BLOCK_INT_H
     3.5  #define BLOCK_INT_H
     3.6  
     3.7 -#define BLOCK_DRIVER_FLAG_EXTENDABLE  0x0001u
     3.8 -
     3.9  struct BlockDriver {
    3.10      const char *format_name;
    3.11      int instance_size;
    3.12 @@ -78,7 +76,6 @@ struct BlockDriver {
    3.13      int (*bdrv_eject)(BlockDriverState *bs, int eject_flag);
    3.14      int (*bdrv_set_locked)(BlockDriverState *bs, int locked);
    3.15      
    3.16 -    unsigned bdrv_flags;
    3.17      BlockDriverAIOCB *free_aiocb;
    3.18      struct BlockDriver *next;
    3.19  };