Merging some linux/generic code into linux?

Florian Weimer fw@deneb.enyo.de
Thu Dec 31 15:41:00 GMT 2015


* Aurelien Jarno:

> Now that the GNU libc requires at least a 2.6.32 kernel, the *at
> syscalls are always available. This might gives the opportunity to
> cleanup a bit the sysdeps/univ/sysv/linux/generic directory. In some
> cases like dl-origin.c, the code is almost duplicated, differing only
> by the syscall and its arguments. In some other cases like chown or
> rename we have an entry in syscalls.list on one side, and a C file on
> the other.

I'm very much in favor of unifying things as far as possible. :)

Although I find the dl-origin.c case rather puzzling.  Arent
readlinkat with AT_FDCWD and readlink should be equivalent.  Why was
this discrepancy introduced?

(Curiously, /proc/self/exe can refer to a file whose full path is
longer than PATH_MAX, in which case readlink fails with ENAMETOOLONG.
It would be nice to have /proc/self/origin for the directory which
contains /proc/self/exe.)

Florian



More information about the Libc-alpha mailing list