summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorSusant Sahani <susant@redhat.com>2017-04-25 18:41:50 +0530
committerSusant Sahani <susant@redhat.com>2017-04-25 18:46:04 +0530
commit134e24e136e3a474f1412eb32fd94b4b77eecabd (patch)
tree0f358dce2b3f7bdfce0401ed32c437e00bf4c0e4 /src/shared
parentd5d5e06086734f6406b3ccc522c4951cdc18ca21 (diff)
config parser: Introduce config_parse_uint8
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/conf-parser.c1
-rw-r--r--src/shared/conf-parser.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 265ac83dc0..d8393cbc8d 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -506,6 +506,7 @@ int config_parse_many(
DEFINE_PARSER(int, int, safe_atoi);
DEFINE_PARSER(long, long, safe_atoli);
+DEFINE_PARSER(uint8, uint8_t, safe_atou8);
DEFINE_PARSER(uint16, uint16_t, safe_atou16);
DEFINE_PARSER(uint32, uint32_t, safe_atou32);
DEFINE_PARSER(uint64, uint64_t, safe_atou64);
diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h
index 26ff3df16f..82ea5c1288 100644
--- a/src/shared/conf-parser.h
+++ b/src/shared/conf-parser.h
@@ -119,6 +119,7 @@ int config_parse_many(
int config_parse_int(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_unsigned(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_long(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_uint8(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_uint16(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_uint32(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_uint64(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);