* This file contains the code for parsing uci config files
*/
+#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/file.h>
#include <stdbool.h>
#include <unistd.h>
#include <fcntl.h>
char *tmp;
tmp = next_arg(ctx, str, false, false);
- if (tmp && *tmp)
+ if (tmp && *tmp && (ctx->flags & UCI_FLAG_STRICT))
uci_parse_error(ctx, *str, "too many arguments");
}
FILE *file = NULL;
UCI_HANDLE_ERR(ctx);
- UCI_ASSERT(ctx, uci_validate_name(name));
switch (name[0]) {
case '.':
break;
default:
/* config in /etc/config */
+ UCI_ASSERT(ctx, uci_validate_name(name));
filename = uci_config_path(ctx, name);
confdir = true;
break;