Scott James Remnant | d4f5fb8 | 2007-01-08 23:25:23 +0000 | [diff] [blame] | 1 | /* upstart |
| 2 | * |
Scott James Remnant | 7512302 | 2009-05-22 13:27:56 +0200 | [diff] [blame] | 3 | * Copyright © 2009 Canonical Ltd. |
Scott James Remnant | 7d5b2ea | 2009-05-22 15:20:12 +0200 | [diff] [blame] | 4 | * Author: Scott James Remnant <scott@netsplit.com>. |
Scott James Remnant | d4f5fb8 | 2007-01-08 23:25:23 +0000 | [diff] [blame] | 5 | * |
Scott James Remnant | 0c0c5a5 | 2009-06-23 10:29:35 +0100 | [diff] [blame] | 6 | * 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 Remnant | 7512302 | 2009-05-22 13:27:56 +0200 | [diff] [blame] | 8 | * published by the Free Software Foundation. |
Scott James Remnant | d4f5fb8 | 2007-01-08 23:25:23 +0000 | [diff] [blame] | 9 | * |
| 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 Remnant | 0c0c5a5 | 2009-06-23 10:29:35 +0100 | [diff] [blame] | 15 | * 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 Remnant | d4f5fb8 | 2007-01-08 23:25:23 +0000 | [diff] [blame] | 18 | */ |
| 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 */ |
| 28 | enum { |
| 29 | UPSTART_ERROR_START = NIH_ERROR_APPLICATION_START, |
| 30 | |
Scott James Remnant | 7d2c9fb | 2008-03-03 17:29:13 +0000 | [diff] [blame] | 31 | /* Errors while dealing with environment */ |
| 32 | ENVIRON_ILLEGAL_PARAM, |
| 33 | ENVIRON_UNKNOWN_PARAM, |
| 34 | ENVIRON_EXPECTED_OPERATOR, |
| 35 | ENVIRON_MISMATCHED_BRACES, |
| 36 | |
Scott James Remnant | 8092e79 | 2008-04-29 23:36:16 +0100 | [diff] [blame] | 37 | /* Errors while handling job processes */ |
| 38 | JOB_PROCESS_ERROR, |
Scott James Remnant | 7d2c9fb | 2008-03-03 17:29:13 +0000 | [diff] [blame] | 39 | |
Scott James Remnant | d4f5fb8 | 2007-01-08 23:25:23 +0000 | [diff] [blame] | 40 | /* Errors while parsing configuration files */ |
Scott James Remnant | a940d5c | 2007-06-06 15:45:26 +0100 | [diff] [blame] | 41 | PARSE_ILLEGAL_INTERVAL, |
| 42 | PARSE_ILLEGAL_EXIT, |
Marc A. Dahlhaus | 48ea1fe | 2011-05-05 11:04:21 +0200 | [diff] [blame] | 43 | PARSE_ILLEGAL_SIGNAL, |
Scott James Remnant | a940d5c | 2007-06-06 15:45:26 +0100 | [diff] [blame] | 44 | PARSE_ILLEGAL_UMASK, |
| 45 | PARSE_ILLEGAL_NICE, |
Scott James Remnant | ac3d4ea | 2008-04-18 18:11:47 +0100 | [diff] [blame] | 46 | PARSE_ILLEGAL_OOM, |
Scott James Remnant | a940d5c | 2007-06-06 15:45:26 +0100 | [diff] [blame] | 47 | PARSE_ILLEGAL_LIMIT, |
Scott James Remnant | ce628ca | 2007-06-20 23:25:02 +0100 | [diff] [blame] | 48 | PARSE_EXPECTED_EVENT, |
| 49 | PARSE_EXPECTED_OPERATOR, |
Scott James Remnant | 7e96c7b | 2008-02-22 17:23:18 +0000 | [diff] [blame] | 50 | PARSE_EXPECTED_VARIABLE, |
Scott James Remnant | ce628ca | 2007-06-20 23:25:02 +0100 | [diff] [blame] | 51 | PARSE_MISMATCHED_PARENS, |
Scott James Remnant | 9fab4e9 | 2008-04-18 13:19:06 +0100 | [diff] [blame] | 52 | |
| 53 | /* Errors while handling control requests */ |
| 54 | CONTROL_NAME_TAKEN, |
Dmitry Torokhov | 164e535 | 2016-06-08 16:16:35 -0700 | [diff] [blame^] | 55 | |
| 56 | /* SELinux handling errors */ |
| 57 | SELINUX_POLICY_LOAD_FAIL, |
Scott James Remnant | d4f5fb8 | 2007-01-08 23:25:23 +0000 | [diff] [blame] | 58 | }; |
| 59 | |
| 60 | /* Error strings for defined messages */ |
Scott James Remnant | 7d2c9fb | 2008-03-03 17:29:13 +0000 | [diff] [blame] | 61 | #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 Remnant | a940d5c | 2007-06-06 15:45:26 +0100 | [diff] [blame] | 65 | #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. Dahlhaus | 48ea1fe | 2011-05-05 11:04:21 +0200 | [diff] [blame] | 67 | #define PARSE_ILLEGAL_SIGNAL_STR N_("Illegal signal status, expected integer") |
Scott James Remnant | a940d5c | 2007-06-06 15:45:26 +0100 | [diff] [blame] | 68 | #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. Dahlhaus | 1271030 | 2011-05-05 12:13:49 +0200 | [diff] [blame] | 70 | #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 Remnant | a940d5c | 2007-06-06 15:45:26 +0100 | [diff] [blame] | 72 | #define PARSE_ILLEGAL_LIMIT_STR N_("Illegal limit, expected 'unlimited' or integer") |
Scott James Remnant | ce628ca | 2007-06-20 23:25:02 +0100 | [diff] [blame] | 73 | #define PARSE_EXPECTED_EVENT_STR N_("Expected event") |
| 74 | #define PARSE_EXPECTED_OPERATOR_STR N_("Expected operator") |
Scott James Remnant | 7e96c7b | 2008-02-22 17:23:18 +0000 | [diff] [blame] | 75 | #define PARSE_EXPECTED_VARIABLE_STR N_("Expected variable name before value") |
Scott James Remnant | ce628ca | 2007-06-20 23:25:02 +0100 | [diff] [blame] | 76 | #define PARSE_MISMATCHED_PARENS_STR N_("Mismatched parentheses") |
Scott James Remnant | 9fab4e9 | 2008-04-18 13:19:06 +0100 | [diff] [blame] | 77 | #define CONTROL_NAME_TAKEN_STR N_("Name already taken") |
Dmitry Torokhov | 164e535 | 2016-06-08 16:16:35 -0700 | [diff] [blame^] | 78 | #define SELINUX_POLICY_LOAD_FAIL_STR N_("Failed to load SELinux policy while in enforcing mode") |
Scott James Remnant | d4f5fb8 | 2007-01-08 23:25:23 +0000 | [diff] [blame] | 79 | |
| 80 | #endif /* INIT_ERRORS_H */ |