[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Dopendir() return values



> But Dopendir is not a legacy GEMDOS call, it's a MiNT-extension that
> mimics the behaviour of the unix opendir syscall.

And what is the advantage that a GEMDOS function return real GEMDOS 
errorcodes and an other unix?

What I don't understand is the code from opendir in the mintlib:
-------------------------------cut-------------------------------
__opendir(const char *uname)
{
..
..
  r = Dopendir(name, 0);
  if (r != -ENOSYS) {
    if ( (r & 0xff000000L) == 0xff000000L ) {
      if ((r == -ENOTDIR) && (_enoent(name)))
        r = -ENOENT;
      free(d);
..
..
-------------------------------cut-------------------------------
Why will be ask here for ENOTDIR (-34)?

Can someone make a short program with opendir, with printf from the 
return values. What will be happend if a directory is not presend?

> So I'd say that MagiC's implementation is wrong in this case.

At the moment I´m not sure.

Gerhard