projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11650e3
)
raw CDROM access for windows (Filip Navara)
author
bellard
<bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 26 Apr 2005 21:47:02 +0000
(21:47 +0000)
committer
bellard
<bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 26 Apr 2005 21:47:02 +0000
(21:47 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1411
c046a42c
-6fe2-441c-8c8c-
71466251a162
block.c
patch
|
blob
|
history
diff --git
a/block.c
b/block.c
index 7af6379a397503f61749de10d767c2a5c0ec46cb..e9061424d2468b5434ff76ed93455fd511a2d5ba 100644
(file)
--- a/
block.c
+++ b/
block.c
@@
-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;