提交 c747cd1f 编写于 作者: B bellard

raw CDROM access for windows (Filip Navara)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1411 c046a42c-6fe2-441c-8c8c-71466251a162
上级 11650e36
......@@ -533,6 +533,12 @@ static int raw_open(BlockDriverState *bs, const char *filename)
bs->read_only = 1;
}
size = lseek(fd, 0, SEEK_END);
#ifdef _WIN32
/* On Windows hosts it can happen that we're unable to get file size
for CD-ROM raw device (it's inherent limitation of the CDFS driver). */
if (size == -1)
size = LONG_LONG_MAX;
#endif
bs->total_sectors = size / 512;
s->fd = fd;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册