[uClibc]mips errno issues w/ 6/2o/2 uclibc release

Phil Hopely phil at ayrnetworks.com
Tue Jun 25 02:51:54 UTC 2002


Greetings,


I began looking into the uclibc and busybox sources and subscribed to 
the mailing list today, so please forgive me if these are obvious or 
naive observations/questions:

I am working with the latest releases of busybox and uclibc for a mips 
big endian target, and I am noting that errno values appear, well, 
rather bogus.  FWIW, errno appears to work fine for x86 targets in our 
testing.


For a busybox command such as mkdir -p, the errno return value has 
significance, and hence this command fails rather mysteriously (though 
w/o -p works fine).  The logic around the stat call in libbb's 
make_directory routine expects the errno value to be set (in particular 
to ENOENT if the body of the conditional is to be entered - circa line 
55 of libbb/make_directory.c, fwiw).


I found reference to errno down in libc/misc/internals/*... but as the 
x86 appears to work fine, I assume the more likely location of trouble 
is in the mips-specific code?

I do not know if I am looking in the right place, but I spelunked and 
noticed that there are some references to errno being excluded down in 
uclibc/ldso/ldso/mips/ld_syscalls.h in the syscall macro definitions. 
Similar variants of these syscall macros can be found in the kernel 
sources at include/asm-mips/unistd.h.

One apparent difference between these two files seems to be that errno 
(at least in the kernel sources which we are using here at ayr for mips, 
2.4.16) is set to the v0 register value in the kernel, but not in the 
uclibc ld_syscalls.h variant...  I do not understand the explanation 
comment that makes reference to the ~"disable that is to occur in 
__syscall_return" (though this same message does appear to be present 
for other target architectures - looks like a cut and paste oversight 
perhaps?).

Is there no errno implemented for this platform or perhaps am I just 
compiling uclibc incorrectly?  If none is implemented, what would be an 
orthodox manner in which it could be implemented?  Could somebody make a 
suggestion as to where I could/should begin to look?


Thanks in advance for your help!
Phil




More information about the uClibc mailing list