diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-04-26 21:47:02 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-04-26 21:47:02 +0000 |
commit | c747cd1fa26d1ed0cc009302fb9c75a8f03651e2 (patch) | |
tree | c4493f1438656e3dad7e6f620039d5bd675fe753 /block.c | |
parent | clean target update (diff) | |
download | qemu-kvm-c747cd1fa26d1ed0cc009302fb9c75a8f03651e2.tar.gz qemu-kvm-c747cd1fa26d1ed0cc009302fb9c75a8f03651e2.tar.bz2 qemu-kvm-c747cd1fa26d1ed0cc009302fb9c75a8f03651e2.zip |
raw CDROM access for windows (Filip Navara)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1411 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |