Restore proper error from oshmctl(2), used by COMPAT_43, when the

segment cannot be found.  Broken by r280323.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
This commit is contained in:
Konstantin Belousov 2015-04-04 23:56:38 +00:00
parent e8cfd62ed8
commit 4cfc037c30
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281094

View File

@ -965,7 +965,7 @@ oshmctl(struct thread *td, struct oshmctl_args *uap)
shmseg = shm_find_segment(uap->shmid, true);
if (shmseg == NULL) {
SYSVSHM_UNLOCK();
return (error);
return (EINVAL);
}
switch (uap->cmd) {
case IPC_STAT: