Author: wmb
Date: Sat Oct 30 05:02:32 2010
New Revision: 1994
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1994
Log:
FAT filesystem reader - handle files larger than 2 GiB (but files larger than 4 GiB will still fail). Is it even possible to have files that large with FAT?
Modified:
ofw/fs/fatfs/read.fth
Modified: ofw/fs/fatfs/read.fth
==============================================================================
--- ofw/fs/fatfs/read.fth Sat Oct 30 05:01:34 2010 (r1993)
+++ ofw/fs/fatfs/read.fth Sat Oct 30 05:02:32 2010 (r1994)
@@ -104,7 +104,7 @@
begin
dup 0>
remaining @ 0> and
- current-position fh_length l@ < and
+ current-position fh_length l@ u< and
last-cluster? 0= and
while ( #cls-remaining )
to-next-cluster
@@ -134,10 +134,10 @@
\ If the last cluster of the file has been read, account for the
\ true length of the file
- fh_length l@ current-position - 0 min + ( bytes-valid )
- 0 max \ **** cpt 12/29/89, neg value must not be returned for appending
+ fh_length l@ current-position - + ( bytes-valid )
false
;
+
\ LICENSE_BEGIN
\ Copyright (c) 2006 FirmWorks
\