j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Yaboot relies on the read function from openbios to stop reading at the end of a file. This patch makes sure to not read beyond the end of the file. This fixes the boot of debian-installer using a CD-ROM.
Signed-off-by: Aurelien Jarno aurelien@aurel32.net
diff --git a/fs/grubfs/grubfs_fs.c b/fs/grubfs/grubfs_fs.c index f172b75..588d677 100644 --- a/fs/grubfs/grubfs_fs.c +++ b/fs/grubfs/grubfs_fs.c @@ -161,6 +161,9 @@ grubfs_file_read( file_desc_t *fd, void *buf, size_t count ) filepos=file->pos; filemax=file->len;
+ if (count > filemax - filepos) + count = filemax - filepos; + ret=curfs->fsys->read_func(buf, count);
file->pos=filepos;
On 1/9/09, Aurelien Jarno aurelien@aurel32.net wrote:
Yaboot relies on the read function from openbios to stop reading at the end of a file. This patch makes sure to not read beyond the end of the file. This fixes the boot of debian-installer using a CD-ROM.
Signed-off-by: Aurelien Jarno aurelien@aurel32.net
Thanks, applied.