Commit 7c35359cbf4eaa1d808a1ebb3647fe65fcc9dc60
1 parent
d37282ad
raw dmg support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1424 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
1 deletions
block-dmg.c
@@ -91,7 +91,9 @@ static int dmg_open(BlockDriverState *bs, const char *filename) | @@ -91,7 +91,9 @@ static int dmg_open(BlockDriverState *bs, const char *filename) | ||
91 | if(lseek(s->fd,-0x1d8,SEEK_END)<0) { | 91 | if(lseek(s->fd,-0x1d8,SEEK_END)<0) { |
92 | dmg_close: | 92 | dmg_close: |
93 | close(s->fd); | 93 | close(s->fd); |
94 | - return -1; | 94 | + /* open raw instead */ |
95 | + bs->drv=&bdrv_raw; | ||
96 | + return bs->drv->bdrv_open(bs,filename); | ||
95 | } | 97 | } |
96 | info_begin=read_off(s->fd); | 98 | info_begin=read_off(s->fd); |
97 | if(info_begin==0) | 99 | if(info_begin==0) |