Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add additional errno values required by POSIX.
ok jca@ kettenis@ deraadt@
  • Loading branch information
jonathangray committed Sep 5, 2017
1 parent a5511fa commit bd616ed
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
6 changes: 5 additions & 1 deletion lib/libc/gen/errlist.c
@@ -1,4 +1,4 @@
/* $OpenBSD: errlist.c,v 1.18 2015/10/24 10:42:02 bluhm Exp $ */
/* $OpenBSD: errlist.c,v 1.19 2017/09/05 03:06:26 jsg Exp $ */
/*
* Copyright (c) 1982, 1985, 1993
* The Regents of the University of California. All rights reserved.
Expand Down Expand Up @@ -142,6 +142,10 @@ const char *const sys_errlist[] = {
"Identifier removed", /* 89 - EIDRM */
"No message of desired type", /* 90 - ENOMSG */
"Not supported", /* 91 - ENOTSUP */
"Bad message", /* 92 - EBADMSG */
"State not recoverable", /* 93 - ENOTRECOVERABLE */
"Previous owner died", /* 94 - EOWNERDEAD */
"Protocol error", /* 95 - EPROTO */
};
const int sys_nerr = { sizeof sys_errlist/sizeof sys_errlist[0] };
#if 0
Expand Down
12 changes: 10 additions & 2 deletions lib/libc/sys/intro.2
@@ -1,4 +1,4 @@
.\" $OpenBSD: intro.2,v 1.64 2016/04/17 14:36:44 jmc Exp $
.\" $OpenBSD: intro.2,v 1.65 2017/09/05 03:06:26 jsg Exp $
.\" $NetBSD: intro.2,v 1.6 1995/02/27 12:33:41 cgd Exp $
.\"
.\" Copyright (c) 1980, 1983, 1986, 1991, 1993
Expand Down Expand Up @@ -30,7 +30,7 @@
.\"
.\" @(#)intro.2 8.3 (Berkeley) 12/11/93
.\"
.Dd $Mdocdate: April 17 2016 $
.Dd $Mdocdate: September 5 2017 $
.Dt INTRO 2
.Os
.Sh NAME
Expand Down Expand Up @@ -425,6 +425,14 @@ An IPC message queue does not contain a message of the desired type,
or a message catalog does not contain the requested message.
.It Er 91 ENOTSUP Em "Not supported" .
The operation has requested an unsupported value.
.It Er 92 EBADMSG Em "Bad message" .
A corrupted message was detected.
.It Er 93 ENOTRECOVERABLE Em "State not recoverable" .
The state protected by a robust mutex is not recoverable.
.It Er 94 EOWNERDEAD Em "Previous owner died" .
The owner of a robust mutex terminated while holding the mutex lock.
.It Er 95 EPROTO Em "Protocol error" .
A device-specific protocol error occurred.
.El
.Sh DEFINITIONS
.Bl -tag -width Ds
Expand Down
3 changes: 1 addition & 2 deletions sys/dev/pci/drm/drm_linux.h
@@ -1,4 +1,4 @@
/* $OpenBSD: drm_linux.h,v 1.62 2017/08/14 01:35:04 jsg Exp $ */
/* $OpenBSD: drm_linux.h,v 1.63 2017/09/05 03:06:26 jsg Exp $ */
/*
* Copyright (c) 2013, 2014, 2015 Mark Kettenis
*
Expand Down Expand Up @@ -279,7 +279,6 @@ struct module;
#define ERESTARTSYS EINTR
#define ETIME ETIMEDOUT
#define EREMOTEIO EIO
#define EPROTO EIO
#define ENOTSUPP ENOTSUP
#define ENODATA ENOTSUP
#define ECHRNG EINVAL
Expand Down
8 changes: 6 additions & 2 deletions sys/sys/errno.h
@@ -1,4 +1,4 @@
/* $OpenBSD: errno.h,v 1.24 2015/10/24 10:42:02 bluhm Exp $ */
/* $OpenBSD: errno.h,v 1.25 2017/09/05 03:06:26 jsg Exp $ */
/* $NetBSD: errno.h,v 1.10 1996/01/20 01:33:53 jtc Exp $ */

/*
Expand Down Expand Up @@ -167,8 +167,12 @@
#define EIDRM 89 /* Identifier removed */
#define ENOMSG 90 /* No message of desired type */
#define ENOTSUP 91 /* Not supported */
#define EBADMSG 92 /* Bad message */
#define ENOTRECOVERABLE 93 /* State not recoverable */
#define EOWNERDEAD 94 /* Previous owner died */
#define EPROTO 95 /* Protocol error */
#if __BSD_VISIBLE
#define ELAST 91 /* Must be equal largest errno */
#define ELAST 95 /* Must be equal largest errno */
#endif /* __BSD_VISIBLE */

#ifdef _KERNEL
Expand Down

0 comments on commit bd616ed

Please sign in to comment.