[openfirmware] [commit] r3668 - dev/olpc/spiflash

repository service svn at openfirmware.info
Thu Jun 6 04:06:14 CEST 2013


Author: quozl
Date: Thu Jun  6 04:06:14 2013
New Revision: 3668
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3668

Log:
OLPC - save-mfg-data, simplify SN processing code following #12695 review.  No functional change.

Modified:
   dev/olpc/spiflash/spiui.fth

Modified: dev/olpc/spiflash/spiui.fth
==============================================================================
--- dev/olpc/spiflash/spiui.fth	Wed Jun  5 04:32:41 2013	(r3667)
+++ dev/olpc/spiflash/spiui.fth	Thu Jun  6 04:06:14 2013	(r3668)
@@ -120,11 +120,7 @@
 [ifdef] $call-method
 : make-sn-name  ( -- filename$ )
    " SN" find-tag 0=  abort" No serial number in mfg data"  ( sn$ )
-   dup  if                   ( sn$ )
-      2dup + 1- c@ 0=  if    ( sn$ )
-         1-                  ( sn$' )    \ Remove Null
-      then                   ( sn$ )
-   then                      ( sn$ )
+   ?-null                    ( sn$' )    \ Remove Null
    d# 11 over -  dup 0>  if  ( sn$' #excess )
       /string                ( sn$' )  \ Keep last 11 characters
    else                      ( sn$' #excess )



More information about the openfirmware mailing list