Michael McTails <address@hidden> wrote:
> I built coreutils with a native GCC compiler on the NSLU2 which is an
> armv5b device. I keep getting circular directory structure even though
> the filesystem is fine. Here the error messages exactly, and any info
> I think is useful:
>
> DATABANK:/opt/src root# ls
> bash-3.0 coreutil.tar coreutils-5.2.1 test
> DATABANK:/opt/src root# rm -r test/
> rm: WARNING: Circular directory structure.
> This almost certainly means that you have a corrupted file system.
> NOTIFY YOUR SYSTEM MANAGER.
> The following directory is part of the cycle:
> `test//../../../../../../../..'
Thanks for the report.
Be careful. Could this be due to a compiler bug?
GNU rm should never traverse `..' links, but the directory
name in the diagnostic above makes it look like rm did exactly
that, several times. If that is the case, then the code to
detect whether a file is named `..' or `.' is being miscompiled.
Look at the function named readdir_ignoring_dot_and_dotdot.