Blame misc/sysexits.h

Packit 6c4009
/*
Packit 6c4009
 * Copyright (c) 1987, 1993
Packit 6c4009
 *	The Regents of the University of California.  All rights reserved.
Packit 6c4009
 *
Packit 6c4009
 * Redistribution and use in source and binary forms, with or without
Packit 6c4009
 * modification, are permitted provided that the following conditions
Packit 6c4009
 * are met:
Packit 6c4009
 * 1. Redistributions of source code must retain the above copyright
Packit 6c4009
 *    notice, this list of conditions and the following disclaimer.
Packit 6c4009
 * 2. Redistributions in binary form must reproduce the above copyright
Packit 6c4009
 *    notice, this list of conditions and the following disclaimer in the
Packit 6c4009
 *    documentation and/or other materials provided with the distribution.
Packit 6c4009
 * 4. Neither the name of the University nor the names of its contributors
Packit 6c4009
 *    may be used to endorse or promote products derived from this software
Packit 6c4009
 *    without specific prior written permission.
Packit 6c4009
 *
Packit 6c4009
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
Packit 6c4009
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit 6c4009
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit 6c4009
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
Packit 6c4009
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit 6c4009
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Packit 6c4009
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Packit 6c4009
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Packit 6c4009
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Packit 6c4009
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Packit 6c4009
 * SUCH DAMAGE.
Packit 6c4009
 *
Packit 6c4009
 *	@(#)sysexits.h	8.1 (Berkeley) 6/2/93
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
#ifndef	_SYSEXITS_H
Packit 6c4009
#define	_SYSEXITS_H 1
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 *  SYSEXITS.H -- Exit status codes for system programs.
Packit 6c4009
 *
Packit 6c4009
 *	This include file attempts to categorize possible error
Packit 6c4009
 *	exit statuses for system programs, notably delivermail
Packit 6c4009
 *	and the Berkeley network.
Packit 6c4009
 *
Packit 6c4009
 *	Error numbers begin at EX__BASE to reduce the possibility of
Packit 6c4009
 *	clashing with other exit statuses that random programs may
Packit 6c4009
 *	already return.  The meaning of the codes is approximately
Packit 6c4009
 *	as follows:
Packit 6c4009
 *
Packit 6c4009
 *	EX_USAGE -- The command was used incorrectly, e.g., with
Packit 6c4009
 *		the wrong number of arguments, a bad flag, a bad
Packit 6c4009
 *		syntax in a parameter, or whatever.
Packit 6c4009
 *	EX_DATAERR -- The input data was incorrect in some way.
Packit 6c4009
 *		This should only be used for user's data & not
Packit 6c4009
 *		system files.
Packit 6c4009
 *	EX_NOINPUT -- An input file (not a system file) did not
Packit 6c4009
 *		exist or was not readable.  This could also include
Packit 6c4009
 *		errors like "No message" to a mailer (if it cared
Packit 6c4009
 *		to catch it).
Packit 6c4009
 *	EX_NOUSER -- The user specified did not exist.  This might
Packit 6c4009
 *		be used for mail addresses or remote logins.
Packit 6c4009
 *	EX_NOHOST -- The host specified did not exist.  This is used
Packit 6c4009
 *		in mail addresses or network requests.
Packit 6c4009
 *	EX_UNAVAILABLE -- A service is unavailable.  This can occur
Packit 6c4009
 *		if a support program or file does not exist.  This
Packit 6c4009
 *		can also be used as a catchall message when something
Packit 6c4009
 *		you wanted to do doesn't work, but you don't know
Packit 6c4009
 *		why.
Packit 6c4009
 *	EX_SOFTWARE -- An internal software error has been detected.
Packit 6c4009
 *		This should be limited to non-operating system related
Packit 6c4009
 *		errors as possible.
Packit 6c4009
 *	EX_OSERR -- An operating system error has been detected.
Packit 6c4009
 *		This is intended to be used for such things as "cannot
Packit 6c4009
 *		fork", "cannot create pipe", or the like.  It includes
Packit 6c4009
 *		things like getuid returning a user that does not
Packit 6c4009
 *		exist in the passwd file.
Packit 6c4009
 *	EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
Packit 6c4009
 *		etc.) does not exist, cannot be opened, or has some
Packit 6c4009
 *		sort of error (e.g., syntax error).
Packit 6c4009
 *	EX_CANTCREAT -- A (user specified) output file cannot be
Packit 6c4009
 *		created.
Packit 6c4009
 *	EX_IOERR -- An error occurred while doing I/O on some file.
Packit 6c4009
 *	EX_TEMPFAIL -- temporary failure, indicating something that
Packit 6c4009
 *		is not really an error.  In sendmail, this means
Packit 6c4009
 *		that a mailer (e.g.) could not create a connection,
Packit 6c4009
 *		and the request should be reattempted later.
Packit 6c4009
 *	EX_PROTOCOL -- the remote system returned something that
Packit 6c4009
 *		was "not possible" during a protocol exchange.
Packit 6c4009
 *	EX_NOPERM -- You did not have sufficient permission to
Packit 6c4009
 *		perform the operation.  This is not intended for
Packit 6c4009
 *		file system problems, which should use NOINPUT or
Packit 6c4009
 *		CANTCREAT, but rather for higher level permissions.
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
#define EX_OK		0	/* successful termination */
Packit 6c4009
Packit 6c4009
#define EX__BASE	64	/* base value for error messages */
Packit 6c4009
Packit 6c4009
#define EX_USAGE	64	/* command line usage error */
Packit 6c4009
#define EX_DATAERR	65	/* data format error */
Packit 6c4009
#define EX_NOINPUT	66	/* cannot open input */
Packit 6c4009
#define EX_NOUSER	67	/* addressee unknown */
Packit 6c4009
#define EX_NOHOST	68	/* host name unknown */
Packit 6c4009
#define EX_UNAVAILABLE	69	/* service unavailable */
Packit 6c4009
#define EX_SOFTWARE	70	/* internal software error */
Packit 6c4009
#define EX_OSERR	71	/* system error (e.g., can't fork) */
Packit 6c4009
#define EX_OSFILE	72	/* critical OS file missing */
Packit 6c4009
#define EX_CANTCREAT	73	/* can't create (user) output file */
Packit 6c4009
#define EX_IOERR	74	/* input/output error */
Packit 6c4009
#define EX_TEMPFAIL	75	/* temp failure; user is invited to retry */
Packit 6c4009
#define EX_PROTOCOL	76	/* remote error in protocol */
Packit 6c4009
#define EX_NOPERM	77	/* permission denied */
Packit 6c4009
#define EX_CONFIG	78	/* configuration error */
Packit 6c4009
Packit 6c4009
#define EX__MAX	78	/* maximum listed value */
Packit 6c4009
Packit 6c4009
#endif /* sysexits.h */