#11345 LOW Opportu: XO-1 Q2E48 to-file unnecessary warning
Zarro Boogs per Child
bugtracker at laptop.org
Mon Oct 17 03:24:09 EDT 2011
#11345: XO-1 Q2E48 to-file unnecessary warning
---------------------------------+------------------------------------------
Reporter: Quozl | Owner: wmb at firmworks.com
Type: defect | Status: new
Priority: low | Milestone: Opportunity
Component: ofw - open firmware | Version: Development firmware
Keywords: | Next_action: diagnose
Verified: 0 | Deployment_affected:
Blockedby: | Blocking:
---------------------------------+------------------------------------------
On Q2E48ja (svn 2623), with a 128MB ext2 filesystem generated according to
ext2test.sh, the following command:
{{{
ok to-file u:\words.txt words
}}}
generates
{{{
Abort: Can't delete file
}}}
only if the output file does not exist ... yet the command line completes,
and the new file is present.
Debugging shows this is from $delete1 in filecmds.fth, called from _ofopen
in ofwfw.fth.
Does not occur on XO-1.75 Q4B12.
Debugging session:
{{{
ok to-file u:\words.txt words
: to-file ( Empty )
writing Abort: Can't delete file
( Empty )
cmdline-to-file g
ok debug to-file
Stepper keys: <space> Down Up Continue Forth Go Help ? See $tring Quit
ok to-file u:\words.txt words
: to-file ( Empty )
writing d
: writing ( Empty )
safe-parse-word ( ffb7fbb0 c )
$new-file d
: $new-file ( ffb7fbb0 c )
2dup ( ffb7fbb0 c ffb7fbb0 c )
r/w ( ffb7fbb0 c ffb7fbb0 c 2 )
create-file d
: create-file ( ffb7fbb0 c ffb7fbb0 c 2 )
8 ( ffb7fbb0 c ffb7fbb0 c 2 8 )
or ( ffb7fbb0 c ffb7fbb0 c a )
open-file d
: open-file ( ffb7fbb0 c ffb7fbb0 c a )
file ( ffb7fbb0 c ffb7fbb0 c a ff9fc1f4 )
@ ( ffb7fbb0 c ffb7fbb0 c a ffb7c8fc )
>r ( ffb7fbb0 c ffb7fbb0 c a )
>r ( ffb7fbb0 c ffb7fbb0 c )
2dup ( ffb7fbb0 c ffb7fbb0 c ffb7fbb0 c )
opened-filename ( ffb7fbb0 c ffb7fbb0 c ffb7fbb0 c ff9fc228 )
2! ( ffb7fbb0 c ffb7fbb0 c )
cstrbuf ( ffb7fbb0 c ffb7fbb0 c ffb7c7f8 )
pack ( ffb7fbb0 c ffb7c7f8 )
r@ ( ffb7fbb0 c ffb7c7f8 a )
fopen d
: fopen ( ffb7fbb0 c ffb7c7f8 a )
2 ( ffb7fbb0 c ffb7c7f8 a 2 )
?enough ( ffb7fbb0 c ffb7c7f8 a )
get-fd ( ffb7fbb0 c ffb7c7f8 a )
over ( ffb7fbb0 c ffb7c7f8 a ffb7c7f8 )
>r ( ffb7fbb0 c ffb7c7f8 a )
dup ( ffb7fbb0 c ffb7c7f8 a a )
fmode ( ffb7fbb0 c ffb7c7f8 a a ffb7c880 )
! ( ffb7fbb0 c ffb7c7f8 a )
do-fopen d
: _ofopen ( ffb7fbb0 c ffb7c7f8 a )
>r ( ffb7fbb0 c ffb7c7f8 )
count ( ffb7fbb0 c ffb7c7f9 c )
r@ ( ffb7fbb0 c ffb7c7f9 c a )
create-flag ( ffb7fbb0 c ffb7c7f9 c a 8 )
and ( ffb7fbb0 c ffb7c7f9 c 8 )
if ( ffb7fbb0 c ffb7c7f9 c )
2dup ( ffb7fbb0 c ffb7c7f9 c ffb7c7f9 c )
['] _ofdelete ( ffb7fbb0 c ffb7c7f9 c ffb7c7f9 c ff832840 )
catch d
: $delete1 ( ffb7fbb0 c ffb7c7f9 c ffb7c7f9 c )
open-directory ( ffb7fbb0 c ffb7c7f9 c ffb6f264 9 ffb6192c )
?dup ( ffb7fbb0 c ffb7c7f9 c ffb6f264 9 ffb6192c
ffb6192c )
0= ( ffb7fbb0 c ffb7c7f9 c ffb6f264 9 ffb6192c 0 )
abort" Can't open directory" ( ffb7fbb0 c ffb7c7f9 c ffb6f264 9
ffb6192c )
>r ( ffb7fbb0 c ffb7c7f9 c ffb6f264 9 )
" $delete!" ( ffb7fbb0 c ffb7c7f9 c ffb6f264 9 ff8778ed 8 )
r@ ( ffb7fbb0 c ffb7c7f9 c ffb6f264 9 ff8778ed 8
ffb6192c )
$call-method
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/11345>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list