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

Re: [MiNT] Dopendir() return values



On 11/01/11 09:41, Jean-François Lemaire wrote:
> Hello,
>
> I just found out that Dopendir() returns the following value for a non-
> existing directory:
>
> "-33 EFILNF 	File not found"
>
> But according to TOS.HYP, it's supposed to return:
>
> "-34 EPTHNF 	Directory (folder) not found"
>
> Now, I know that a directory is essentially a file, but EPTHNF would seem more 
> logical to me.
>
> Also, it seems that "EFILNF" is not defined in "mint/errno.h".

In this case, I think TOS.HYP is wrong. -33 is ENOENT, which is "No such
file or directory". -34 is ENOTDIR "Not a directory". There's even this
comment in mint/errno.h....

   KERNEL/FIXME: This used to be the same as ESRCH and and ECHILD,
   in the kernel it was usually called EFILNF.  Fix the wrong usage
   of ESRCH and ECHILD and replace EFILNF with ENOENT.  */

Alan.