diff options
| author | Dmitri Pal <dpal@redhat.com> | 2010-07-28 16:27:09 -0400 |
|---|---|---|
| committer | Dmitri Pal <dpal@redhat.com> | 2010-08-10 12:51:32 -0400 |
| commit | 3b39c023b8462d134c45540342193a154ee1a169 (patch) | |
| tree | 23fa7e80dbce9cdeadcf834438afda104b622025 /common/ini | |
| parent | e1005dcb23f724fe4af14b2c4ebe288eb33d06ed (diff) | |
| download | sssd-3b39c023b8462d134c45540342193a154ee1a169.tar.gz sssd-3b39c023b8462d134c45540342193a154ee1a169.tar.xz sssd-3b39c023b8462d134c45540342193a154ee1a169.zip | |
[INI] Add error codes for the new parser
Diffstat (limited to 'common/ini')
| -rw-r--r-- | common/ini/ini_config.h | 12 | ||||
| -rw-r--r-- | common/ini/ini_print.c | 5 |
2 files changed, 12 insertions, 5 deletions
diff --git a/common/ini/ini_config.h b/common/ini/ini_config.h index 28e1af8..c69e235 100644 --- a/common/ini/ini_config.h +++ b/common/ini/ini_config.h @@ -226,15 +226,19 @@ #define ERR_NOSECTION 3 /** @brief Section name too long (Error). */ #define ERR_SECTIONLONG 4 -/** @brief No equal sign (Warning). */ +/** @brief No equal sign (Error). */ #define ERR_NOEQUAL 5 -/** @brief No key before equal sign (Warning). */ +/** @brief No key before equal sign (Error). */ #define ERR_NOKEY 6 -/** @brief Key is too long (Warning). */ +/** @brief Key is too long (Error). */ #define ERR_LONGKEY 7 +/** @brief Failed to read line (Error). */ +#define ERR_READ 8 +/** @brief Line starts with space when it should not (Error). */ +#define ERR_SPACE 9 /** @brief Size of the error array. */ -#define ERR_MAXPARSE ERR_LONGKEY +#define ERR_MAXPARSE ERR_SPACE /** * @} diff --git a/common/ini/ini_print.c b/common/ini/ini_print.c index e8f9186..60771d3 100644 --- a/common/ini/ini_print.c +++ b/common/ini/ini_print.c @@ -75,7 +75,10 @@ const char *parsing_error_str(int parsing_error) _("Section name is too long."), _("Equal sign is missing."), _("Property name is missing."), - _("Property name is too long.") + _("Property name is too long."), + _("Failed to read line."), + _("Invalid space character at the " + "beginning of the line.") }; /* Check the range */ |
