j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: laurent Date: 2009-11-02 23:35:59 +0100 (Mon, 02 Nov 2009) New Revision: 593
Modified: trunk/openbios-devel/modules/filesystems.c Log: load: manage file size smaller than 512 bytes
Allow to load bootinfo scripts of haiku and FreeBSD.
Signed-off-by: Laurent Vivier Laurent@vivier.eu
Modified: trunk/openbios-devel/modules/filesystems.c =================================================================== --- trunk/openbios-devel/modules/filesystems.c 2009-11-02 22:17:40 UTC (rev 592) +++ trunk/openbios-devel/modules/filesystems.c 2009-11-02 22:35:59 UTC (rev 593) @@ -259,11 +259,13 @@ size = 0; while(1) { ret = mi->fs->read( mi->file, buf, 512 ); - if (ret != 512) + if (ret <= 0) break; buf += ret; mi->filepos += ret; size += ret; + if (ret != 512) + break; } PUSH( size ); }