[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] opendir() regression
Hello.
In order to check GCC is OK, I have just recompiled coreutils-6.9. The pwd
command does not work as expected in a specific case, probably due to a
regression in the MiNTLib.
Basically:
root@easymint:/f>pwd
./pwd: cannot open directory `..': Internal error
The kernel:
The problem happens only with old kernels and Ozk snapshot,
but it works fine with the trunk and Helmut snapshot.
The MiNTLib:
My old pwd compiled from the same sources with an old CVS MiNTLib works fine
on every kernel. This supposes that the bug is in the MiNTLib.
The current directory and file system:
This problems appears only on ARAnyM's hostfs mounts, when the current
directory is a hostfs root, like /f.
The problem occurs because pwd does always opendir("..").
As a summary, this fails on old and Ozk kernels when the current directory
is an hostfs root.
This has probably some relation with Alan's evolutions on directories.
See the attached testcase.
--
Vincent Rivière
#include <stdio.h>
#include <dirent.h>
#include <errno.h>
int main(void)
{
DIR* dirp = opendir("..");
if (!dirp)
{
fprintf(stderr, "error: %s\n", strerror(errno));
return 1;
}
puts("OK");
return 0;
}