aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/errno.h
Commit message (Collapse)AuthorAgeFilesLines
* Allow the pseudo-errnos to be returned as well in boot loaderWarner Losh2020-08-281-1/+1
| | | | | | | | | Expose the pseudo-errno values in _STANDALONE is defined so that code in the boot loader can make use of them. Nothing uses them today, but the zstd support that's coming will need them. Notes: svn path=/head/; revision=364925
* Create new EINTEGRITY error with message "Integrity check failed".Kirk McKusick2019-01-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | An integrity check such as a check-hash or a cross-correlation failed. The integrity error falls between EINVAL that identifies errors in parameters to a system call and EIO that identifies errors with the underlying storage media. EINTEGRITY is typically raised by intermediate kernel layers such as a filesystem or an in-kernel GEOM subsystem when they detect inconsistencies. Uses include allowing the mount(8) command to return a different exit value to automate the running of fsck(8) during a system boot. These changes make no use of the new error, they just add it. Later commits will be made for the use of the new error number and it will be added to additional manual pages as appropriate. Reviewed by: gnn, dim, brueffer, imp Discussed with: kib, cem, emaste, ed, jilles Differential Revision: https://reviews.freebsd.org/D18765 Notes: svn path=/head/; revision=343111
* We don't need both _STAND and _STANDALONE. There's more places thatWarner Losh2017-12-021-1/+1
| | | | | | | | | use _STANDALONE, so change the former to the latter. Sponsored by: Netflix Notes: svn path=/head/; revision=326443
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* When building standalone, don't define errno. Let the definition fromWarner Losh2017-10-221-1/+1
| | | | | | | | | stand.h override. This is similar to what we do in the kernel. Sponsored by: Netflix Notes: svn path=/head/; revision=324844
* Only activate __EXT1_VISIBLE block when using sys/errno.h in userspace.Konstantin Belousov2017-03-301-0/+2
| | | | | | | | | | | | | | The prerequisite for '#if __EXT1_VISIBLE' functionality is the inclusion of sys/cdefs.h. errno.h only auto-includes the header for non-kernel environment, and EXT1 block only useful for non-kernel as well. Reported by: lwhsu Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Notes: svn path=/head/; revision=316258
* Implement the memset_s(3) function as specified by the C11 ISO/IECKonstantin Belousov2017-03-301-0/+8
| | | | | | | | | | | | | | | | | 9899:2011 Appendix K 3.7.4.1. Other needed supporting types, defines and constraint_handler infrastructure is added as specified in the C11 spec. Submitted by: Tom Rix <trix@juniper.net> Sponsored by: Juniper Networks Discussed with: ed MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D9903 Differential revision: https://reviews.freebsd.org/D10161 Notes: svn path=/head/; revision=316213
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Expose kernel-only errno values if _WANT_KERNEL_ERRNO is defined.John Baldwin2016-10-011-1/+1
| | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=306564
* Fix autofs triggering problem. Assume you have an NFS server,Edward Tomasz Napierala2016-03-121-0/+1
| | | | | | | | | | | | | | | | | | | | 192.168.1.1, with share "share". This commit fixes a problem where "mkdir /net/192.168.1.1/share/meh" would return spurious error instead of creating the directory if the target filesystem wasn't mounted yet; subsequent attempts would work correctly. The failure scenario is kind of complicated to explain, but it all boils down to calling VOP_MKDIR() for the target filesystem (NFS) with wrong dvp - the autofs vnode instead of the filesystem root mounted over it. Reviewed by: kib@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5442 Notes: svn path=/head/; revision=296715
* POSIX 1003.1-2008: add ENOTRECOVERABLE, EOWNERDEAD errnos.Sergey Kandaurov2013-05-041-1/+3
| | | | Notes: svn path=/head/; revision=250250
* errno.h: fix couple of whitespace nitsAndriy Gapon2011-04-041-2/+2
| | | | | | | | Submitted by: bde (a half of the changes) MFC after: 1 week Notes: svn path=/head/; revision=220335
* Add ECAPMODE, "Not permitted in capability mode", a new kernel errnoRobert Watson2011-03-011-1/+2
| | | | | | | | | | | | | constant to indicate that a system call (or perhaps an operation requested via a system call) is not permitted for a capability mode process. Submitted by: anderson Sponsored by: Google, Inc. Obtained from: Capsicum Project MFC after: 1 week Notes: svn path=/head/; revision=219128
* Add a new errno, ENOTCAPABLE, to be returned when a process requests anRobert Watson2009-10-071-1/+5
| | | | | | | | | | | operation on a file descriptor that is not authorized by the descriptor's capability flags. MFC after: 1 month Sponsored by: Google Notes: svn path=/head/; revision=197841
* Add some missing errnos from POSIX. Nothing in FreeBSD generatesDavid Schultz2005-04-021-1/+7
| | | | | | | | | | | | | these at the moment, but applications that test for them will now have a better chance of compiling. I have intentionally omitted errnos that are only good for STREAMS, since apps that use STREAMS won't compile anyway. The exception is EPROTO, which was apparently intended for STREAMS, but worth having anyway because Linux (mis)uses it for other things. Notes: svn path=/head/; revision=144530
* /* -> /*- for license, minor formatting changesWarner Losh2005-01-071-1/+1
| | | | Notes: svn path=/head/; revision=139825
* Remove advertising clause from University of California Regent's license,Warner Losh2004-04-071-4/+0
| | | | | | | | | per letter dated July 22, 1999. Approved by: core Notes: svn path=/head/; revision=127976
* Copyin and copyout are only possible from a process-native thread,Poul-Henning Kamp2002-10-071-0/+1
| | | | | | | | | | | | | | | | | | and therefore we need a way for ioctl handlers to run in that thread in GEOM. Rather than invent a complicated registration system to recognize which ioctl handler to use for a given ioctl, we still schedule all ioctls down the tree as bio transactions but add a special return code that means "call me directly" and have the geom_dev layer do that. Use this for all ioctls that make it as far as a diskdriver to avoid any backwards compatibility problems. Requested by: scottl Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=104602
* s/EDOFUS/EDOOFUS/Poul-Henning Kamp2002-08-211-1/+1
| | | | | | | Persuaded by: Google Notes: svn path=/head/; revision=102229
* Update ELAST.Poul-Henning Kamp2002-08-091-1/+2
| | | | Notes: svn path=/head/; revision=101587
* Introduce a new error return code:Poul-Henning Kamp2002-08-091-0/+2
| | | | | | | | | #define EDOFUS 88 /* Programming error */ This can be used to signal error situations which indicate that the program logic or assumptions is deficient. Notes: svn path=/head/; revision=101567
* More s/file system/filesystem/gTom Rhodes2002-05-161-1/+1
| | | | Notes: svn path=/head/; revision=96755
* Remove __PAlfred Perlstein2002-03-191-1/+1
| | | | Notes: svn path=/head/; revision=92719
* Add new errno ``ENOATTR''.Brian Feldman2002-03-071-1/+2
| | | | Notes: svn path=/head/; revision=91814
* Tiny style change. Whitespace only change.Giorgos Keramidas2002-01-221-1/+1
| | | | | | | | | Use tab after #define ENOTSUP. Reviewed by: mike Notes: svn path=/head/; revision=89642
* Back out prev. change. According to bde:Andrey A. Chernov2001-08-271-4/+1
| | | | | | | _POSIX_SOURCE means POSIX.1-1990, not the current version of POSIX. Notes: svn path=/head/; revision=82431
* EOVERFLOW is POSIXed, so move it out #ifndef _POSIX_SOURCE sectionAndrey A. Chernov2001-08-271-1/+4
| | | | Notes: svn path=/head/; revision=82430
* Add ENOTSUP, which is specified as an error return value for variousJason Evans2000-05-021-0/+1
| | | | | | | POSIX/SUSv2 functions. Notes: svn path=/head/; revision=59889
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-12-291-2/+2
| | | | | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come. Notes: svn path=/head/; revision=55205
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* typo in commentPoul-Henning Kamp1999-04-241-2/+2
| | | | | | | | | PR: 11285 Submitted by: Chris Costello <chris@calldei.com> Reviewed by: phk Notes: svn path=/head/; revision=46017
* Added 3 new errno values, requred by various standards: EOVERFLOW,Dmitrij Tejblum1998-12-141-4/+7
| | | | | | | | | | ECANCELED, EILSEQ. Fixed ibcs2 and especially linux EIDRM and ENOMSG errno mapping. Reviewed by: Dan Nelson <dnelson@emsphone.com> Notes: svn path=/head/; revision=41796
* Make errno finally and permanently thread-aware so that it is no longerJohn Birrell1998-04-301-5/+1
| | | | | | | | | | | | | | | necessary to compile with _THREAD_SAFE defined. This means that people will get thread-aware code whether they like it or not. This change is required to allow a process to link against libpthread and libc to use kernel threads (and prevent each thread from clobbering another thread's errno just be doing a syscall). This is bound to break some ports, but it is strictly allowed by ANSI C, so anything that breaks as a result was already broken anyway 8-). "Sorry". Notes: svn path=/head/; revision=35542
* Add EIDRM errno (PR 176), ENOMSG errno (myself) for prober sysv_ipc.Søren Schmidt1998-04-131-2/+5
| | | | Notes: svn path=/head/; revision=35175
* Added a kernel-only error code ENOICTL. This will be returned fromBruce Evans1997-12-061-3/+4
| | | | | | | | | | | | | | | | | low level ioctl routines instead of the magic number -1 so that callers can distinguish it from ERESTART (which happens to be -1). -1 meant that the ioctl was not handled at the called level. ERESTART is normal when a sleeping ioctl is interrupted. ERESTART got converted to ENOTTY instead of restarting the ioctl. Many (most?) ioctls can not be restarted safely, but this is apparently supposed to be handled by drivers converting ERESTART to EINTR. I first saw this problem for TIOCDRAIN. Justin saw if for disk ioctls. Added missing parentheses. Notes: svn path=/head/; revision=31575
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* make the declaration of the __error() function C++ safe. Otherwise,Peter Wemm1996-08-181-2/+5
| | | | | | | | the linker comes up with undefined variables because of the #define errno when using _THREAD_SAFE. Notes: svn path=/head/; revision=17649
* Reviewed by: julian and (hsu?)Julian Elischer1996-01-221-1/+6
| | | | | | | | | Submitted by: John Birrel(L?) changes for threadsafe operations Notes: svn path=/head/; revision=13545
* Made them all idempotent.Paul Richards1994-08-211-1/+6
| | | | | | | | Reviewed by: Submitted by: Notes: svn path=/head/; revision=2165
* Added $Id$David Greenman1994-08-021-0/+1
| | | | Notes: svn path=/head/; revision=1817
* BSD 4.4 Lite Kernel SourcesRodney W. Grimes1994-05-241-0/+163
Notes: svn path=/head/; revision=1541