On Fri, 2008-09-12 at 10:37 +0200, Bastian Blank wrote: > On Fri, Sep 12, 2008 at 12:32:15AM -0700, Steve Langasek wrote: > > On Fri, Sep 12, 2008 at 09:24:55AM +0200, Bastian Blank wrote: > > > And which value should they be mapped to? > > EPERM The file system containing oldpath and newpath does not > > support > > the creation of hard links. > > That seems to cover any case where the kernel might return ENOSYS... > > Well. The kernel may face out that syscall.
No, that's not what ENOSYS means. ENOSYS is the error returned either (1) if the system simply doesn't support it at all. For example, glibc could be ported to a non-Unix system entirely, where the link system call fundamentally doesn't exist. The glibc maintainers would arrange for link to return ENOSYS in that case. And (2), the Unix case, ENOSYS is returned if the system call trap number is not implemented in the running kernel. For example, if the calling sequence of a syscall changes, it was once common to choose a new trap number and phase out the old one. This was done by BSD, for example, when such things as stty/gtty gave way to ioctl, and when stat formats changed. In that way, old binaries would continue to run, provided you compiled the kernel with the old traps enabled along side the new ones. Eventually you might turn off that compat option, or the kernel might no longer support it, and then the trap would fail--with ENOSYS. That's what ENOSYS really is: a low-level error, indicating that a syscall trap number has been offerred to the kernel which the running kernel does not understand. Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

