159d5854d145263f8e68a7312bf52894269203029Elliott Hughes/*	$OpenBSD: sysexits.h,v 1.5 2003/06/02 19:34:12 millert Exp $	*/
259d5854d145263f8e68a7312bf52894269203029Elliott Hughes/*	$NetBSD: sysexits.h,v 1.4 1994/10/26 00:56:33 cgd Exp $	*/
359d5854d145263f8e68a7312bf52894269203029Elliott Hughes
459d5854d145263f8e68a7312bf52894269203029Elliott Hughes/*
559d5854d145263f8e68a7312bf52894269203029Elliott Hughes * Copyright (c) 1987 Regents of the University of California.
659d5854d145263f8e68a7312bf52894269203029Elliott Hughes * All rights reserved.
759d5854d145263f8e68a7312bf52894269203029Elliott Hughes *
859d5854d145263f8e68a7312bf52894269203029Elliott Hughes * Redistribution and use in source and binary forms, with or without
959d5854d145263f8e68a7312bf52894269203029Elliott Hughes * modification, are permitted provided that the following conditions
1059d5854d145263f8e68a7312bf52894269203029Elliott Hughes * are met:
1159d5854d145263f8e68a7312bf52894269203029Elliott Hughes * 1. Redistributions of source code must retain the above copyright
1259d5854d145263f8e68a7312bf52894269203029Elliott Hughes *    notice, this list of conditions and the following disclaimer.
1359d5854d145263f8e68a7312bf52894269203029Elliott Hughes * 2. Redistributions in binary form must reproduce the above copyright
1459d5854d145263f8e68a7312bf52894269203029Elliott Hughes *    notice, this list of conditions and the following disclaimer in the
1559d5854d145263f8e68a7312bf52894269203029Elliott Hughes *    documentation and/or other materials provided with the distribution.
1659d5854d145263f8e68a7312bf52894269203029Elliott Hughes * 3. Neither the name of the University nor the names of its contributors
1759d5854d145263f8e68a7312bf52894269203029Elliott Hughes *    may be used to endorse or promote products derived from this software
1859d5854d145263f8e68a7312bf52894269203029Elliott Hughes *    without specific prior written permission.
1959d5854d145263f8e68a7312bf52894269203029Elliott Hughes *
2059d5854d145263f8e68a7312bf52894269203029Elliott Hughes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2159d5854d145263f8e68a7312bf52894269203029Elliott Hughes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2259d5854d145263f8e68a7312bf52894269203029Elliott Hughes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2359d5854d145263f8e68a7312bf52894269203029Elliott Hughes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2459d5854d145263f8e68a7312bf52894269203029Elliott Hughes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2559d5854d145263f8e68a7312bf52894269203029Elliott Hughes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2659d5854d145263f8e68a7312bf52894269203029Elliott Hughes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2759d5854d145263f8e68a7312bf52894269203029Elliott Hughes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2859d5854d145263f8e68a7312bf52894269203029Elliott Hughes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2959d5854d145263f8e68a7312bf52894269203029Elliott Hughes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3059d5854d145263f8e68a7312bf52894269203029Elliott Hughes * SUCH DAMAGE.
3159d5854d145263f8e68a7312bf52894269203029Elliott Hughes *
3259d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	@(#)sysexits.h	4.8 (Berkeley) 4/3/91
3359d5854d145263f8e68a7312bf52894269203029Elliott Hughes */
3459d5854d145263f8e68a7312bf52894269203029Elliott Hughes
3559d5854d145263f8e68a7312bf52894269203029Elliott Hughes#ifndef	_SYSEXITS_H_
3659d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define	_SYSEXITS_H_
3759d5854d145263f8e68a7312bf52894269203029Elliott Hughes
3859d5854d145263f8e68a7312bf52894269203029Elliott Hughes/*
3959d5854d145263f8e68a7312bf52894269203029Elliott Hughes *  SYSEXITS.H -- Exit status codes for system programs.
4059d5854d145263f8e68a7312bf52894269203029Elliott Hughes *
4159d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	This include file attempts to categorize possible error
4259d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	exit statuses for system programs, notably delivermail
4359d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	and the Berkeley network.
4459d5854d145263f8e68a7312bf52894269203029Elliott Hughes *
4559d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	Error numbers begin at EX__BASE to reduce the possibility of
4659d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	clashing with other exit statuses that random programs may
4759d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	already return.  The meaning of the codes is approximately
4859d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	as follows:
4959d5854d145263f8e68a7312bf52894269203029Elliott Hughes *
5059d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_USAGE -- The command was used incorrectly, e.g., with
5159d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		the wrong number of arguments, a bad flag, a bad
5259d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		syntax in a parameter, or whatever.
5359d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_DATAERR -- The input data was incorrect in some way.
5459d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		This should only be used for user's data & not
5559d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		system files.
5659d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_NOINPUT -- An input file (not a system file) did not
5759d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		exist or was not readable.  This could also include
5859d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		errors like "No message" to a mailer (if it cared
5959d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		to catch it).
6059d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_NOUSER -- The user specified did not exist.  This might
6159d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		be used for mail addresses or remote logins.
6259d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_NOHOST -- The host specified did not exist.  This is used
6359d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		in mail addresses or network requests.
6459d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_UNAVAILABLE -- A service is unavailable.  This can occur
6559d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		if a support program or file does not exist.  This
6659d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		can also be used as a catchall message when something
6759d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		you wanted to do doesn't work, but you don't know
6859d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		why.
6959d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_SOFTWARE -- An internal software error has been detected.
7059d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		This should be limited to non-operating system related
7159d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		errors as possible.
7259d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_OSERR -- An operating system error has been detected.
7359d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		This is intended to be used for such things as "cannot
7459d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		fork", "cannot create pipe", or the like.  It includes
7559d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		things like getuid returning a user that does not
7659d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		exist in the passwd file.
7759d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_OSFILE -- Some system file (e.g., /etc/passwd, /var/run/utmp,
7859d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		etc.) does not exist, cannot be opened, or has some
7959d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		sort of error (e.g., syntax error).
8059d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_CANTCREAT -- A (user specified) output file cannot be
8159d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		created.
8259d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_IOERR -- An error occurred while doing I/O on some file.
8359d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_TEMPFAIL -- temporary failure, indicating something that
8459d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		is not really an error.  In sendmail, this means
8559d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		that a mailer (e.g.) could not create a connection,
8659d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		and the request should be reattempted later.
8759d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_PROTOCOL -- the remote system returned something that
8859d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		was "not possible" during a protocol exchange.
8959d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_NOPERM -- You did not have sufficient permission to
9059d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		perform the operation.  This is not intended for
9159d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		file system problems, which should use EX_NOINPUT or
9259d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		EX_CANTCREAT, but rather for higher level permissions.
9359d5854d145263f8e68a7312bf52894269203029Elliott Hughes *	EX_CONFIG -- Something was found in an unconfigured or
9459d5854d145263f8e68a7312bf52894269203029Elliott Hughes *		misconfigured state.
9559d5854d145263f8e68a7312bf52894269203029Elliott Hughes */
9659d5854d145263f8e68a7312bf52894269203029Elliott Hughes
9759d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_OK		0	/* successful termination */
9859d5854d145263f8e68a7312bf52894269203029Elliott Hughes
9959d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX__BASE	64	/* base value for error messages */
10059d5854d145263f8e68a7312bf52894269203029Elliott Hughes
10159d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_USAGE	64	/* command line usage error */
10259d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_DATAERR	65	/* data format error */
10359d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_NOINPUT	66	/* cannot open input */
10459d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_NOUSER	67	/* addressee unknown */
10559d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_NOHOST	68	/* host name unknown */
10659d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_UNAVAILABLE	69	/* service unavailable */
10759d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_SOFTWARE	70	/* internal software error */
10859d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_OSERR	71	/* system error (e.g., can't fork) */
10959d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_OSFILE	72	/* critical OS file missing */
11059d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_CANTCREAT	73	/* can't create (user) output file */
11159d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_IOERR	74	/* input/output error */
11259d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_TEMPFAIL	75	/* temp failure; user is invited to retry */
11359d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_PROTOCOL	76	/* remote error in protocol */
11459d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_NOPERM	77	/* permission denied */
11559d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX_CONFIG	78	/* configuration error */
11659d5854d145263f8e68a7312bf52894269203029Elliott Hughes
11759d5854d145263f8e68a7312bf52894269203029Elliott Hughes#define EX__MAX		78	/* maximum listed value */
11859d5854d145263f8e68a7312bf52894269203029Elliott Hughes
11959d5854d145263f8e68a7312bf52894269203029Elliott Hughes#endif /* !_SYSEXITS_H_ */
120