1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
3 #ifndef fooexitstatushfoo
4 #define fooexitstatushfoo
7 This file is part of systemd.
9 Copyright 2010 Lennart Poettering
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25 typedef enum ExitStatus {
26 /* EXIT_SUCCESS defined by libc */
27 /* EXIT_FAILURE defined by libc */
28 EXIT_INVALIDARGUMENT = 2,
29 EXIT_NOTIMPLEMENTED = 3,
30 EXIT_NOPERMISSION = 4,
31 EXIT_NOTINSTALLED = 5,
32 EXIT_NOTCONFIGURED = 6,
35 /* The LSB suggests that error codes >= 200 are "reserved". We
36 * use them here under the assumption that they hence are
37 * unused by init scripts.
39 * http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html */
51 EXIT_CHROOT, /* 210 */
61 EXIT_SETSID, /* 220 */
69 typedef enum ExitStatusLevel {
73 EXIT_STATUS_FULL = EXIT_STATUS_LSB
76 const char* exit_status_to_string(ExitStatus status, ExitStatusLevel level);