sysexits-compat.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /** BEGIN COPYRIGHT BLOCK
  2. * This Program is free software; you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation; version 2 of the License.
  5. *
  6. * This Program is distributed in the hope that it will be useful, but WITHOUT
  7. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  9. *
  10. * You should have received a copy of the GNU General Public License along with
  11. * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  12. * Place, Suite 330, Boston, MA 02111-1307 USA.
  13. *
  14. * In addition, as a special exception, Red Hat, Inc. gives You the additional
  15. * right to link the code of this Program with code not covered under the GNU
  16. * General Public License ("Non-GPL Code") and to distribute linked combinations
  17. * including the two, subject to the limitations in this paragraph. Non-GPL Code
  18. * permitted under this exception must only link to the code of this Program
  19. * through those well defined interfaces identified in the file named EXCEPTION
  20. * found in the source code files (the "Approved Interfaces"). The files of
  21. * Non-GPL Code may instantiate templates or use macros or inline functions from
  22. * the Approved Interfaces without causing the resulting work to be covered by
  23. * the GNU General Public License. Only Red Hat, Inc. may make changes or
  24. * additions to the list of Approved Interfaces. You must obey the GNU General
  25. * Public License in all respects for all of the Program code and other code used
  26. * in conjunction with the Program except the Non-GPL Code covered by this
  27. * exception. If you modify this file, you may extend this exception to your
  28. * version of the file, but you are not obligated to do so. If you do not wish to
  29. * provide this exception without modification, you must delete this exception
  30. * statement from your version and license this file solely under the GPL without
  31. * exception.
  32. *
  33. *
  34. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  35. * Copyright (C) 2005 Red Hat, Inc.
  36. * All rights reserved.
  37. * END COPYRIGHT BLOCK **/
  38. #ifdef HAVE_CONFIG_H
  39. # include <config.h>
  40. #endif
  41. /*
  42. * Copyright (c) 1987 Regents of the University of California.
  43. * All rights reserved.
  44. *
  45. * Redistribution and use in source and binary forms are permitted
  46. * provided that the above copyright notice and this paragraph are
  47. * duplicated in all such forms and that any documentation,
  48. * advertising materials, and other materials related to such
  49. * distribution and use acknowledge that the software was developed
  50. * by the University of California, Berkeley. The name of the
  51. * University may not be used to endorse or promote products derived
  52. * from this software without specific prior written permission.
  53. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  54. * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  55. * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  56. *
  57. * @(#)sysexits.h 4.5 (Berkeley) 7/6/88
  58. */
  59. /*
  60. ** SYSEXITS.H -- Exit status codes for system programs.
  61. **
  62. ** This include file attempts to categorize possible error
  63. ** exit statuses for system programs, notably delivermail
  64. ** and the Berkeley network.
  65. **
  66. ** Error numbers begin at EX__BASE to reduce the possibility of
  67. ** clashing with other exit statuses that random programs may
  68. ** already return. The meaning of the codes is approximately
  69. ** as follows:
  70. **
  71. ** EX_USAGE -- The command was used incorrectly, e.g., with
  72. ** the wrong number of arguments, a bad flag, a bad
  73. ** syntax in a parameter, or whatever.
  74. ** EX_DATAERR -- The input data was incorrect in some way.
  75. ** This should only be used for user's data & not
  76. ** system files.
  77. ** EX_NOINPUT -- An input file (not a system file) did not
  78. ** exist or was not readable. This could also include
  79. ** errors like "No message" to a mailer (if it cared
  80. ** to catch it).
  81. ** EX_NOUSER -- The user specified did not exist. This might
  82. ** be used for mail addresses or remote logins.
  83. ** EX_NOHOST -- The host specified did not exist. This is used
  84. ** in mail addresses or network requests.
  85. ** EX_UNAVAILABLE -- A service is unavailable. This can occur
  86. ** if a support program or file does not exist. This
  87. ** can also be used as a catchall message when something
  88. ** you wanted to do doesn't work, but you don't know
  89. ** why.
  90. ** EX_SOFTWARE -- An internal software error has been detected.
  91. ** This should be limited to non-operating system related
  92. ** errors as possible.
  93. ** EX_OSERR -- An operating system error has been detected.
  94. ** This is intended to be used for such things as "cannot
  95. ** fork", "cannot create pipe", or the like. It includes
  96. ** things like getuid returning a user that does not
  97. ** exist in the passwd file.
  98. ** EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
  99. ** etc.) does not exist, cannot be opened, or has some
  100. ** sort of error (e.g., syntax error).
  101. ** EX_CANTCREAT -- A (user specified) output file cannot be
  102. ** created.
  103. ** EX_IOERR -- An error occurred while doing I/O on some file.
  104. ** EX_TEMPFAIL -- temporary failure, indicating something that
  105. ** is not really an error. In sendmail, this means
  106. ** that a mailer (e.g.) could not create a connection,
  107. ** and the request should be reattempted later.
  108. ** EX_PROTOCOL -- the remote system returned something that
  109. ** was "not possible" during a protocol exchange.
  110. ** EX_NOPERM -- You did not have sufficient permission to
  111. ** perform the operation. This is not intended for
  112. ** file system problems, which should use NOINPUT or
  113. ** CANTCREAT, but rather for higher level permissions.
  114. ** For example, kre uses this to restrict who students
  115. ** can send mail to.
  116. **
  117. ** Maintained by Eric Allman (eric@berkeley, ucbvax!eric) --
  118. ** please mail changes to me.
  119. **
  120. ** @(#)sysexits.h 4.5 7/6/88
  121. */
  122. # define EX_OK 0 /* successful termination */
  123. # define EX__BASE 64 /* base value for error messages */
  124. # define EX_USAGE 64 /* command line usage error */
  125. # define EX_DATAERR 65 /* data format error */
  126. # define EX_NOINPUT 66 /* cannot open input */
  127. # define EX_NOUSER 67 /* addressee unknown */
  128. # define EX_NOHOST 68 /* host name unknown */
  129. # define EX_UNAVAILABLE 69 /* service unavailable */
  130. # define EX_SOFTWARE 70 /* internal software error */
  131. # define EX_OSERR 71 /* system error (e.g., can't fork) */
  132. # define EX_OSFILE 72 /* critical OS file missing */
  133. # define EX_CANTCREAT 73 /* can't create (user) output file */
  134. # define EX_IOERR 74 /* input/output error */
  135. # define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
  136. # define EX_PROTOCOL 76 /* remote error in protocol */
  137. # define EX_NOPERM 77 /* permission denied */
  138. # define EX_CONFIG 78 /* configuration error */