[openfirmware] [commit] r3662 - cpu/x86/pc/olpc dev/olpc/spiflash

repository service svn at openfirmware.info
Tue May 21 03:37:35 CEST 2013


Author: quozl
Date: Tue May 21 03:37:34 2013
New Revision: 3662
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3662

Log:
OLPC - avoid duplicate file creation.  #12684.

Modified:
   cpu/x86/pc/olpc/terminal.fth
   dev/olpc/spiflash/spiui.fth

Modified: cpu/x86/pc/olpc/terminal.fth
==============================================================================
--- cpu/x86/pc/olpc/terminal.fth	Mon May 20 07:02:03 2013	(r3661)
+++ cpu/x86/pc/olpc/terminal.fth	Tue May 21 03:37:34 2013	(r3662)
@@ -337,7 +337,9 @@
 [ifdef] log-ih
 : serial-log  ( "filename" -- )
    serial{
-   safe-parse-word $create-file to log-ih
+   safe-parse-word
+   2dup ['] $delete  catch  if  2drop  then
+   $create-file to log-ih
    log-ih add-output
    {serial}
    log-ih remove-output

Modified: dev/olpc/spiflash/spiui.fth
==============================================================================
--- dev/olpc/spiflash/spiui.fth	Mon May 20 07:02:03 2013	(r3661)
+++ dev/olpc/spiflash/spiui.fth	Tue May 21 03:37:34 2013	(r3662)
@@ -145,6 +145,7 @@
 : save-mfg-data  ( -- )
    flash-open
    make-sn-name                               ( name$ )
+   2dup ['] $delete  catch  if  2drop  then   ( name$ )
    ." Creating " 2dup type cr                 ( name$ )
    $create-file                               ( ihandle )
    dup 0= abort" Can't create file"   >r      ( r: ihandle )



More information about the openfirmware mailing list