[openfirmware] [commit] r2953 - ofw/fs/ext2fs

repository service svn at openfirmware.info
Wed Apr 25 06:53:44 CEST 2012


Author: quozl
Date: Wed Apr 25 06:53:43 2012
New Revision: 2953
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2953

Log:
ext2fs - interpret a zero physical block in the block list of an inode as meaning the block does not exist, OLPC trac #11812

Modified:
   ofw/fs/ext2fs/layout.fth

Modified: ofw/fs/ext2fs/layout.fth
==============================================================================
--- ofw/fs/ext2fs/layout.fth	Wed Apr 25 01:31:11 2012	(r2952)
+++ ofw/fs/ext2fs/layout.fth	Wed Apr 25 06:53:43 2012	(r2953)
@@ -71,7 +71,9 @@
    >pblk-adr dup 0=  if       ( 0 )
       exit                    ( -- false )
    then                       ( adr )
-   int@ u>d  true             ( d.physical-block# true )
+   int@ dup 0<>  if           ( u.physical-block# )
+      u>d true                ( -- d.physical-block# true )
+   then                       ( -- false ) \ there is no physical block
 ;
 
 



More information about the openfirmware mailing list