blob: c5ed1e3298caee3ee2a472cc15dcb807c8c0b8a1 [file] [log] [blame]
Scott James Remnantd4f5fb82007-01-08 23:25:23 +00001/* upstart
2 *
Scott James Remnant75123022009-05-22 13:27:56 +02003 * Copyright © 2009 Canonical Ltd.
Scott James Remnant7d5b2ea2009-05-22 15:20:12 +02004 * Author: Scott James Remnant <scott@netsplit.com>.
Scott James Remnantd4f5fb82007-01-08 23:25:23 +00005 *
Scott James Remnant0c0c5a52009-06-23 10:29:35 +01006 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
Scott James Remnant75123022009-05-22 13:27:56 +02008 * published by the Free Software Foundation.
Scott James Remnantd4f5fb82007-01-08 23:25:23 +00009 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
Scott James Remnant0c0c5a52009-06-23 10:29:35 +010015 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Scott James Remnantd4f5fb82007-01-08 23:25:23 +000018 */
19
20#ifndef INIT_ERRORS_H
21#define INIT_ERRORS_H
22
23#include <nih/macros.h>
24#include <nih/errors.h>
25
26
27/* Allocated error numbers */
28enum {
29 UPSTART_ERROR_START = NIH_ERROR_APPLICATION_START,
30
Scott James Remnant7d2c9fb2008-03-03 17:29:13 +000031 /* Errors while dealing with environment */
32 ENVIRON_ILLEGAL_PARAM,
33 ENVIRON_UNKNOWN_PARAM,
34 ENVIRON_EXPECTED_OPERATOR,
35 ENVIRON_MISMATCHED_BRACES,
36
Scott James Remnant8092e792008-04-29 23:36:16 +010037 /* Errors while handling job processes */
38 JOB_PROCESS_ERROR,
Scott James Remnant7d2c9fb2008-03-03 17:29:13 +000039
Scott James Remnantd4f5fb82007-01-08 23:25:23 +000040 /* Errors while parsing configuration files */
Scott James Remnanta940d5c2007-06-06 15:45:26 +010041 PARSE_ILLEGAL_INTERVAL,
42 PARSE_ILLEGAL_EXIT,
Marc A. Dahlhaus48ea1fe2011-05-05 11:04:21 +020043 PARSE_ILLEGAL_SIGNAL,
Scott James Remnanta940d5c2007-06-06 15:45:26 +010044 PARSE_ILLEGAL_UMASK,
45 PARSE_ILLEGAL_NICE,
Scott James Remnantac3d4ea2008-04-18 18:11:47 +010046 PARSE_ILLEGAL_OOM,
Scott James Remnanta940d5c2007-06-06 15:45:26 +010047 PARSE_ILLEGAL_LIMIT,
Scott James Remnantce628ca2007-06-20 23:25:02 +010048 PARSE_EXPECTED_EVENT,
49 PARSE_EXPECTED_OPERATOR,
Scott James Remnant7e96c7b2008-02-22 17:23:18 +000050 PARSE_EXPECTED_VARIABLE,
Scott James Remnantce628ca2007-06-20 23:25:02 +010051 PARSE_MISMATCHED_PARENS,
Scott James Remnant9fab4e92008-04-18 13:19:06 +010052
53 /* Errors while handling control requests */
54 CONTROL_NAME_TAKEN,
Dmitry Torokhov164e5352016-06-08 16:16:35 -070055
56 /* SELinux handling errors */
57 SELINUX_POLICY_LOAD_FAIL,
Scott James Remnantd4f5fb82007-01-08 23:25:23 +000058};
59
60/* Error strings for defined messages */
Scott James Remnant7d2c9fb2008-03-03 17:29:13 +000061#define ENVIRON_ILLEGAL_PARAM_STR N_("Illegal parameter")
62#define ENVIRON_UNKNOWN_PARAM_STR N_("Unknown parameter")
63#define ENVIRON_EXPECTED_OPERATOR_STR N_("Expected operator")
64#define ENVIRON_MISMATCHED_BRACES_STR N_("Mismatched braces")
Scott James Remnanta940d5c2007-06-06 15:45:26 +010065#define PARSE_ILLEGAL_INTERVAL_STR N_("Illegal interval, expected number of seconds")
66#define PARSE_ILLEGAL_EXIT_STR N_("Illegal exit status, expected integer")
Marc A. Dahlhaus48ea1fe2011-05-05 11:04:21 +020067#define PARSE_ILLEGAL_SIGNAL_STR N_("Illegal signal status, expected integer")
Scott James Remnanta940d5c2007-06-06 15:45:26 +010068#define PARSE_ILLEGAL_UMASK_STR N_("Illegal file creation mask, expected octal integer")
69#define PARSE_ILLEGAL_NICE_STR N_("Illegal nice value, expected -20 to 19")
Marc A. Dahlhaus12710302011-05-05 12:13:49 +020070#define PARSE_ILLEGAL_OOM_STR N_("Illegal oom adjustment, expected -16 to 15 or 'never'")
71#define PARSE_ILLEGAL_OOM_SCORE_STR N_("Illegal oom score adjustment, expected -999 to 1000 or 'never'")
Scott James Remnanta940d5c2007-06-06 15:45:26 +010072#define PARSE_ILLEGAL_LIMIT_STR N_("Illegal limit, expected 'unlimited' or integer")
Scott James Remnantce628ca2007-06-20 23:25:02 +010073#define PARSE_EXPECTED_EVENT_STR N_("Expected event")
74#define PARSE_EXPECTED_OPERATOR_STR N_("Expected operator")
Scott James Remnant7e96c7b2008-02-22 17:23:18 +000075#define PARSE_EXPECTED_VARIABLE_STR N_("Expected variable name before value")
Scott James Remnantce628ca2007-06-20 23:25:02 +010076#define PARSE_MISMATCHED_PARENS_STR N_("Mismatched parentheses")
Scott James Remnant9fab4e92008-04-18 13:19:06 +010077#define CONTROL_NAME_TAKEN_STR N_("Name already taken")
Dmitry Torokhov164e5352016-06-08 16:16:35 -070078#define SELINUX_POLICY_LOAD_FAIL_STR N_("Failed to load SELinux policy while in enforcing mode")
Scott James Remnantd4f5fb82007-01-08 23:25:23 +000079
80#endif /* INIT_ERRORS_H */