From: Nolish, K. <Kev...@ma...> - 2001-08-28 13:47:54
|
Rogier Wolff wrote: > Nolish, Kevin wrote: > > Additionally, ENOIOCTLCMD isn't registered with the system error list > > so perror and strerror cannot make sense out of the returned errno > > value. > > That is intentional: It's an "internal use only" error code. It should > not be possible to leak "out of the kernel". > > How did this show up in userspace? > Ehmm. This can be misinterpreted. I meant: What does this look like in > userspace: Does glibc change the erorr code into "EFAULT", maybe? ENOIOCTLCMD is defined in the kernel's errno.h to be the value 515. That's what's stuffed into errno by the system call dispatch logic. glibc isn't involved. There is no mapping of return values. The return value of atm_ioctl, if non success, winds up in user space errno. Because 515 isn't an ioctl value in user space ioctl, it isn't in the symbolic tables that perror or strerror use to map errno values to strings. That's why the error reported by the call to strerror in ilmid is: "Unknown error 515" This seems to be the strerror/perror message for values that it cannot interpret as known errno values. I tracked down the ENOIOCTLCMD definition this morning. It shouldn't be defined as a user visible string. That's clearly not the intent of the definition. In any event, I can now use both ilmid and ppp on the same interface, so all is well that ends well. If this is useful to others, even better. |