diff options
author | jhb <jhb@FreeBSD.org> | 2017-01-09 00:09:19 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2017-01-09 00:09:19 +0000 |
commit | 5c38e13fbf76bb879889d029ece563829d7961d6 (patch) | |
tree | 0853513b918536a00080dbffeb02e2587d44753d /sys | |
parent | 8c2ec9c91590c3ec360b990ecf912e7886c2076a (diff) | |
download | FreeBSD-src-5c38e13fbf76bb879889d029ece563829d7961d6.zip FreeBSD-src-5c38e13fbf76bb879889d029ece563829d7961d6.tar.gz |
MFC 306564: Expose kernel-only errno values if _WANT_KERNEL_ERRNO is defined.
The kernel uses a few negative errno values for internal conditions
such as requesting a system call restart. Normally these errno values
are not exposed to userland. However, kdump needs access to these
values as some of then can be present in a ktrace system call return
record. Previously kdump was defining _KERNEL to gain access to ehse
values, but was then having to manually declare 'errno' (and doing it
incorrectly). Now, kdump uses _WANT_KERNEL_ERRNO instead of _KERNEL
and uses the system-provided declaration of errno.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/errno.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/errno.h b/sys/sys/errno.h index 52efd31..b6056d2 100644 --- a/sys/sys/errno.h +++ b/sys/sys/errno.h @@ -184,7 +184,7 @@ __END_DECLS #define ELAST 96 /* Must be equal largest errno */ #endif /* _POSIX_SOURCE */ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) /* pseudo-errors returned inside kernel to modify return to process */ #define ERESTART (-1) /* restart syscall */ #define EJUSTRETURN (-2) /* don't modify regs, just return */ |