* fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Keep track of
current position in non-buffered case, too.
This commit is contained in:
parent
2768ae50dd
commit
3059d18288
|
@ -1,3 +1,8 @@
|
||||||
|
2008-10-09 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Keep track of
|
||||||
|
current position in non-buffered case, too.
|
||||||
|
|
||||||
2008-10-09 Corinna Vinschen <corinna@vinschen.de>
|
2008-10-09 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* grp.cc (pwdgrp::read_group): Generate more speaking group name
|
* grp.cc (pwdgrp::read_group): Generate more speaking group name
|
||||||
|
|
|
@ -338,7 +338,12 @@ fhandler_dev_floppy::raw_read (void *ptr, size_t& ulen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!read_file (p, len, &bytes_read, &ret))
|
else
|
||||||
|
{
|
||||||
|
_off64_t current_position = get_current_position ();
|
||||||
|
if (current_position + bytes_to_read >= drive_size)
|
||||||
|
bytes_to_read = drive_size - current_position;
|
||||||
|
if (bytes_to_read && !read_file (p, len, &bytes_read, &ret))
|
||||||
{
|
{
|
||||||
if (!IS_EOM (ret))
|
if (!IS_EOM (ret))
|
||||||
{
|
{
|
||||||
|
@ -354,6 +359,7 @@ fhandler_dev_floppy::raw_read (void *ptr, size_t& ulen)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ulen = (size_t) bytes_read;
|
ulen = (size_t) bytes_read;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue