Closed GoogleCodeExporter closed 8 years ago
Good point. i _think_ this is fixed in the newer epfs code, but it will be easy
to add this to whefs as well.
Thanks once again for taking the time to report the problem.
Original comment by sgbeal@googlemail.com
on 18 Apr 2011 at 9:58
@Dan: i'm relatively certain, looking at the fopen code, that this was
indirectly fixed by the issue #26 workaround. whefs_fopen_ro() (the internal
impl for "r" open modes) searches by name and would have found the ghost entry
from issue #26.
Can you verify that this is still a problem?
Original comment by sgbeal@googlemail.com
on 18 Apr 2011 at 2:07
i just tested this with the following additions to the issue-26.c code attached
to issue #26:
{ /* test issue #25 while we're at it ... */
fileptr = whefs_fopen( fsys, "non-existent", "r" );
assert( NULL == fileptr );
rc = whefs_unlink_filename(fsys,"testf");
assert( 0 == rc );
fileptr = whefs_fopen( fsys, "testf", "r" );
assert( NULL == fileptr );
}
and the problem appears to be solved. i believe this was a side-effect of issue
#26, where fopen() was succeeding but returning an inode which was marked as
unused (which could have all kinds of nasty side-effects later on, depending on
app usage).
@Dan: if you're still seeing this let me know and i'll re-open this ticket.
Original comment by sgbeal@googlemail.com
on 18 Apr 2011 at 4:54
Original issue reported on code.google.com by
dan.schm...@gmail.com
on 16 Apr 2011 at 8:23