* fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Drop
initialization of bytes_to_read. Set bytes_to_read to len in non-buffered case. Call read_bytes correctly with bytes_to_read instead of len.
This commit is contained in:
parent
b007725e34
commit
99abc9526e
|
@ -1,3 +1,10 @@
|
||||||
|
2008-11-21 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Drop
|
||||||
|
initialization of bytes_to_read. Set bytes_to_read to len in
|
||||||
|
non-buffered case. Call read_bytes correctly with bytes_to_read
|
||||||
|
instead of len.
|
||||||
|
|
||||||
2008-11-21 Corinna Vinschen <corinna@vinschen.de>
|
2008-11-21 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* mmap.cc (MapView): Add NT status to debug output.
|
* mmap.cc (MapView): Add NT status to debug output.
|
||||||
|
|
|
@ -245,7 +245,7 @@ fhandler_dev_floppy::raw_read (void *ptr, size_t& ulen)
|
||||||
{
|
{
|
||||||
DWORD bytes_read = 0;
|
DWORD bytes_read = 0;
|
||||||
DWORD read2;
|
DWORD read2;
|
||||||
DWORD bytes_to_read = 0;
|
DWORD bytes_to_read;
|
||||||
int ret;
|
int ret;
|
||||||
size_t len = ulen;
|
size_t len = ulen;
|
||||||
char *tgt;
|
char *tgt;
|
||||||
|
@ -341,9 +341,10 @@ fhandler_dev_floppy::raw_read (void *ptr, size_t& ulen)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_off64_t current_position = get_current_position ();
|
_off64_t current_position = get_current_position ();
|
||||||
|
bytes_to_read = len;
|
||||||
if (current_position + bytes_to_read >= drive_size)
|
if (current_position + bytes_to_read >= drive_size)
|
||||||
bytes_to_read = drive_size - current_position;
|
bytes_to_read = drive_size - current_position;
|
||||||
if (bytes_to_read && !read_file (p, len, &bytes_read, &ret))
|
if (bytes_to_read && !read_file (p, bytes_to_read, &bytes_read, &ret))
|
||||||
{
|
{
|
||||||
if (!IS_EOM (ret))
|
if (!IS_EOM (ret))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue