[openfirmware] r1619 - cpu/x86/pc/olpc/via
svn at openfirmware.info
svn at openfirmware.info
Wed Dec 16 01:55:51 CET 2009
Author: wmb
Date: 2009-12-16 01:55:51 +0100 (Wed, 16 Dec 2009)
New Revision: 1619
Modified:
cpu/x86/pc/olpc/via/factory.fth
Log:
factory.fth - check for preexisting request file and report the problem.
Modified: cpu/x86/pc/olpc/via/factory.fth
===================================================================
--- cpu/x86/pc/olpc/via/factory.fth 2009-12-16 00:42:29 UTC (rev 1618)
+++ cpu/x86/pc/olpc/via/factory.fth 2009-12-16 00:55:51 UTC (rev 1619)
@@ -70,6 +70,15 @@
" flush" $call-cifs abort" CIFS flush failed"
" close-file" $call-cifs abort" CIFS close-file failed"
tempname$ 2swap " %s\\%s" sprintf ( new-name$ )
+
+ \ Check for preexisting destination file
+ 2dup 0 open-file 0= if ( new-name$ )
+ close-file drop ( new-name$ )
+ ." Error: " type ." already exists on the server" cr ( )
+ tempname$ $delete drop ( )
+ abort
+ then ( new-name$ )
+
tempname$ 2swap " $rename" $call-cifs abort" CIFS rename failed"
;
: get-response ( subdir$ -- adr len )
More information about the openfirmware
mailing list