Lines Matching refs:token
47 static uint32_t get_cfg_value(char *token, char *name, int linenr) in get_cfg_value() argument
53 value = strtoul(token, &endptr, 16); in get_cfg_value()
54 if (errno || (token == endptr)) { in get_cfg_value()
56 name, linenr, token); in get_cfg_value()
72 static void parse_cfg_cmd(struct ubl_header *ublhdr, int32_t cmd, char *token, in parse_cfg_cmd() argument
80 "ublimage special boot mode", token); in parse_cfg_cmd()
83 "(%s)\n", name, lineno, token); in parse_cfg_cmd()
91 ublhdr->entry = get_cfg_value(token, name, lineno); in parse_cfg_cmd()
94 ublhdr->pages = get_cfg_value(token, name, lineno); in parse_cfg_cmd()
97 ublhdr->block = get_cfg_value(token, name, lineno); in parse_cfg_cmd()
100 ublhdr->page = get_cfg_value(token, name, lineno); in parse_cfg_cmd()
103 ublhdr->pll_m = get_cfg_value(token, name, lineno); in parse_cfg_cmd()
109 char *token, char *name, int lineno, int fld, int *dcd_len) in parse_cfg_fld() argument
115 "ublimage commands", token); in parse_cfg_fld()
118 "(%s)\n", name, lineno, token); in parse_cfg_fld()
123 parse_cfg_cmd(ublhdr, *cmd, token, name, lineno, fld, *dcd_len); in parse_cfg_fld()
133 char *token, *saveptr1, *saveptr2; in parse_cfg_file() local
162 token = strtok_r(line, "\r\n", &saveptr1); in parse_cfg_file()
163 if (token == NULL) in parse_cfg_file()
168 line = token; ; line = NULL, fld++) { in parse_cfg_file()
169 token = strtok_r(line, " \t", &saveptr2); in parse_cfg_file()
170 if (token == NULL) in parse_cfg_file()
174 if (token[0] == '#') in parse_cfg_file()
177 parse_cfg_fld(ublhdr, &cmd, token, name, in parse_cfg_file()