aboutsummaryrefslogtreecommitdiff
path: root/block-dmg.c
diff options
context:
space:
mode:
Diffstat (limited to 'block-dmg.c')
-rw-r--r--block-dmg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block-dmg.c b/block-dmg.c
index 582e3cb..5df7235 100644
--- a/block-dmg.c
+++ b/block-dmg.c
@@ -91,7 +91,9 @@ static int dmg_open(BlockDriverState *bs, const char *filename)
if(lseek(s->fd,-0x1d8,SEEK_END)<0) {
dmg_close:
close(s->fd);
- return -1;
+ /* open raw instead */
+ bs->drv=&bdrv_raw;
+ return bs->drv->bdrv_open(bs,filename);
}
info_begin=read_off(s->fd);
if(info_begin==0)