ssize_t parse_config_file_simple(const char *pathname, char sep, struct equation *lines, size_t size) { ssize_t ret; struct parse_config_file_simple_context context = { .count = 0, .size = size, .lines = lines, }; ret = parse_config_file2(pathname, sep, parse_config_file_simple_handler, &context); if (ret < 0) { return ret; } return context.count; }
int bootimg_parse_config_file(struct bootimg_header *hdr, const char *pathname) { return parse_config_file2(pathname, ':', bootimg_parse_config_handler, hdr); }