libc_r: fix bugs in openat()
authorNicolas Thery <nthery@gmail.com>
Sun, 26 Jul 2009 18:40:46 +0000 (20:40 +0200)
committerNicolas Thery <nthery@gmail.com>
Sun, 26 Jul 2009 19:54:24 +0000 (21:54 +0200)
commit5b77e1f680812324ac459c1b6bf730ad1a638b68
treef6ecd9eededc4137923e3842dd6eafa7aaeeca35
parentd10ffba14fac6bda1538d631ad8191e8a187a575
libc_r: fix bugs in openat()

The openat() wrapper was not locking its file descriptor argument.

Special case the magic AT_FDCWD descriptor in the file descriptor
locking code (_FD_LOCK() / _FD_UNLOCK()) to avoid EINVAL on locking.
lib/libc_r/uthread/uthread_fd.c
lib/libc_r/uthread/uthread_open.c