raw dmg support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1424 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2005-04-28 20:49:23 +00:00
parent d37282add1
commit 7c35359cbf
1 changed files with 3 additions and 1 deletions

View File

@ -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)