]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Signal invalid ipc operation with ENOSYS
authorUlrich Drepper <drepper@redhat.com>
Fri, 4 Apr 2003 12:18:20 +0000 (04:18 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 4 Apr 2003 12:18:20 +0000 (04:18 -0800)
The ipc multiplexer syscall on x86 currently returns EINVAL for a
non-existing sub-opcode.  This logical but is a problem with the
introduction of new operations (like semtimedop).  Now EINVAL can mean
"no such operation" and "invalid parameter".  To avoid such problems in
future, could you apply the attached patch?

arch/i386/kernel/sys_i386.c

index f38fda8ceb7b206bd101852e2b7004627a2d444e..a478aa8505ce3811801fe534ff3ce6f7fe3bff5e 100644 (file)
@@ -204,7 +204,7 @@ asmlinkage int sys_ipc (uint call, int first, int second,
                return sys_shmctl (first, second,
                                   (struct shmid_ds *) ptr);
        default:
-               return -EINVAL;
+               return -ENOSYS;
        }
 }