Re: Patch for prctl(2)

Andi Kleen (ak@muc.de)
26 Aug 1997 21:54:36 +0200


smurf@lap.noris.de (Matthias Urlichs) writes:

> Richard Gooch <rgooch@atnf.CSIRO.AU> writes:
> > +
> > +asmlinkage int sys_prctl(int option, unsigned long arg2, unsigned long arg3,
> > + unsigned long arg4, unsigned long arg5)
> > +{
> > + switch (option) {
> > + default:
> > + error = -EINVAL;
>
> Shouldn't that rather be -ENOSYS?

Nope, -EINVAL is correct IMHO. -ENOSYS is only for non-existing syscall
numbers, not for invalid parameters to existing syscalls. Other
similar functions like fcntl(),ioctl(),setsockopt() etc. return
-EINVAL too in this case.

-Andi