confile: improve log messages

parent fb9efed8
...@@ -1666,7 +1666,7 @@ static int set_config_idmaps(const char *key, const char *value, ...@@ -1666,7 +1666,7 @@ static int set_config_idmaps(const char *key, const char *value,
ret = parse_idmaps(value, &type, &nsid, &hostid, &range); ret = parse_idmaps(value, &type, &nsid, &hostid, &range);
if (ret < 0) { if (ret < 0) {
ERROR("error parsing id maps"); ERROR("Failed to parse id mappings");
goto on_error; goto on_error;
} }
......
...@@ -63,7 +63,7 @@ int parse_idmaps(const char *idmap, char *type, unsigned long *nsid, ...@@ -63,7 +63,7 @@ int parse_idmaps(const char *idmap, char *type, unsigned long *nsid,
/* Validate type. */ /* Validate type. */
if (*slide != 'u' && *slide != 'g') { if (*slide != 'u' && *slide != 'g') {
ERROR("invalid mapping type: %c", *slide); ERROR("Invalid id mapping type: %c", *slide);
goto on_error; goto on_error;
} }
...@@ -80,19 +80,19 @@ int parse_idmaps(const char *idmap, char *type, unsigned long *nsid, ...@@ -80,19 +80,19 @@ int parse_idmaps(const char *idmap, char *type, unsigned long *nsid,
if (slide == window) if (slide == window)
goto on_error; goto on_error;
/* Mark beginning of nsuid. */ /* Mark beginning of nsid. */
window = slide; window = slide;
/* Validate that non-whitespace follows. */ /* Validate that non-whitespace follows. */
slide += strcspn(slide, " \t\r"); slide += strcspn(slide, " \t\r");
/* There must be non-whitespace. */ /* There must be non-whitespace. */
if (slide == window || *slide == '\0') if (slide == window || *slide == '\0')
goto on_error; goto on_error;
/* Mark end of nsuid. */ /* Mark end of nsid. */
*slide = '\0'; *slide = '\0';
/* Parse nsuid. */ /* Parse nsid. */
if (lxc_safe_ulong(window, &tmp_nsid) < 0) { if (lxc_safe_ulong(window, &tmp_nsid) < 0) {
ERROR("couldn't parse nsuid: %s", window); ERROR("Failed to parse nsid: %s", window);
goto on_error; goto on_error;
} }
...@@ -113,12 +113,12 @@ int parse_idmaps(const char *idmap, char *type, unsigned long *nsid, ...@@ -113,12 +113,12 @@ int parse_idmaps(const char *idmap, char *type, unsigned long *nsid,
/* There must be non-whitespace. */ /* There must be non-whitespace. */
if (slide == window || *slide == '\0') if (slide == window || *slide == '\0')
goto on_error; goto on_error;
/* Mark end of nsuid. */ /* Mark end of nsid. */
*slide = '\0'; *slide = '\0';
/* Parse hostid. */ /* Parse hostid. */
if (lxc_safe_ulong(window, &tmp_hostid) < 0) { if (lxc_safe_ulong(window, &tmp_hostid) < 0) {
ERROR("couldn't parse hostid: %s", window); ERROR("Failed to parse hostid: %s", window);
goto on_error; goto on_error;
} }
...@@ -141,7 +141,7 @@ int parse_idmaps(const char *idmap, char *type, unsigned long *nsid, ...@@ -141,7 +141,7 @@ int parse_idmaps(const char *idmap, char *type, unsigned long *nsid,
goto on_error; goto on_error;
/* The range is the last valid entry we expect. So make sure that there /* The range is the last valid entry we expect. So make sure that there
* is not trailing garbage and if there is, error out. * is no trailing garbage and if there is, error out.
*/ */
if (*(slide + strspn(slide, " \t\r\n")) != '\0') if (*(slide + strspn(slide, " \t\r\n")) != '\0')
goto on_error; goto on_error;
...@@ -150,7 +150,7 @@ int parse_idmaps(const char *idmap, char *type, unsigned long *nsid, ...@@ -150,7 +150,7 @@ int parse_idmaps(const char *idmap, char *type, unsigned long *nsid,
/* Parse range. */ /* Parse range. */
if (lxc_safe_ulong(window, &tmp_range) < 0) { if (lxc_safe_ulong(window, &tmp_range) < 0) {
ERROR("couldn't parse range: %s", window); ERROR("Failed to parse id mapping range: %s", window);
goto on_error; goto on_error;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment