*str += strlen(*str) + 1;
type = next_arg(ctx, str, true, false);
- if (!uci_validate_str(type, false))
+ if (!uci_validate_type(type))
uci_parse_error(ctx, type, "invalid character in field");
name = next_arg(ctx, str, false, true);
assert_eol(ctx, str);
* NB: the config file can still override the package name
*/
if (name) {
- UCI_ASSERT(ctx, uci_validate_str(name, false));
+ UCI_ASSERT(ctx, uci_validate_package(name));
pctx->name = name;
}
{
char *filename;
- UCI_ASSERT(ctx, uci_validate_str(name, false));
+ UCI_ASSERT(ctx, uci_validate_package(name));
filename = uci_malloc(ctx, strlen(name) + strlen(ctx->confdir) + 2);
sprintf(filename, "%s/%s", ctx->confdir, name);
if (!p)
continue;
- if (!uci_validate_name(p))
+ if (!uci_validate_package(p))
continue;
configs[i] = buf;