Lines Matching defs:line
48 * wpa_config_get_line - Read the next configuration file line
49 * @s: Buffer for the line
52 * @line: Pointer to a variable storing the file line number
53 * @_pos: Buffer for the pointer to the beginning of data on the text line or
55 * Returns: Pointer to the beginning of data on the text line or %NULL if no
58 * This function reads the next non-empty line from the configuration file and
61 static char * wpa_config_get_line(char *s, int size, FILE *stream, int *line,
67 (*line)++;
71 * The line was truncated - skip rest of it to avoid
74 wpa_printf(MSG_INFO, "Long line in configuration file "
80 /* Skip white space from the beginning of line. */
123 static int wpa_config_validate_network(struct wpa_ssid *ssid, int line)
129 wpa_printf(MSG_ERROR, "Line %d: both PSK and "
130 "passphrase configured.", line);
140 wpa_printf(MSG_DEBUG, "Line %d: removed CCMP from group cipher"
142 "cipher", line);
150 static struct wpa_ssid * wpa_config_read_network(FILE *f, int *line, int id)
156 wpa_printf(MSG_MSGDUMP, "Line: %d - start of a new network block",
157 *line);
166 while (wpa_config_get_line(buf, sizeof(buf), f, line, &pos)) {
174 wpa_printf(MSG_ERROR, "Line %d: Invalid SSID line "
175 "'%s'.", *line, pos);
183 wpa_printf(MSG_ERROR, "Line %d: invalid "
184 "quotation '%s'.", *line, pos2);
190 if (wpa_config_set(ssid, pos, pos2, *line) < 0)
195 wpa_printf(MSG_ERROR, "Line %d: network block was not "
196 "terminated properly.", *line);
200 errors += wpa_config_validate_network(ssid, *line);
211 static struct wpa_cred * wpa_config_read_cred(FILE *f, int *line, int id)
217 wpa_printf(MSG_MSGDUMP, "Line: %d - start of a new cred block", *line);
223 while (wpa_config_get_line(buf, sizeof(buf), f, line, &pos)) {
231 wpa_printf(MSG_ERROR, "Line %d: Invalid cred line "
232 "'%s'.", *line, pos);
240 wpa_printf(MSG_ERROR, "Line %d: invalid "
241 "quotation '%s'.", *line, pos2);
247 if (wpa_config_set_cred(cred, pos, pos2, *line) < 0)
252 wpa_printf(MSG_ERROR, "Line %d: cred block was not "
253 "terminated properly.", *line);
267 static struct wpa_config_blob * wpa_config_read_blob(FILE *f, int *line,
276 wpa_printf(MSG_MSGDUMP, "Line: %d - start of a new named blob '%s'",
277 *line, name);
279 while (wpa_config_get_line(buf, sizeof(buf), f, line, &pos)) {
288 wpa_printf(MSG_ERROR, "Line %d: not enough memory for "
289 "blob", *line);
299 wpa_printf(MSG_ERROR, "Line %d: blob was not terminated "
300 "properly", *line);
324 int *line, char *bname)
331 wpa_printf(MSG_ERROR, "Line %d: no blob name terminator",
332 *line);
337 blob = wpa_config_read_blob(f, line, bname);
339 wpa_printf(MSG_ERROR, "Line %d: failed to read blob %s",
340 *line, bname);
353 int errors = 0, line = 0;
383 while (wpa_config_get_line(buf, sizeof(buf), f, &line, &pos)) {
385 ssid = wpa_config_read_network(f, &line, id++);
387 wpa_printf(MSG_ERROR, "Line %d: failed to "
388 "parse network block.", line);
399 wpa_printf(MSG_ERROR, "Line %d: failed to add "
401 line);
406 cred = wpa_config_read_cred(f, &line, cred_id++);
408 wpa_printf(MSG_ERROR, "Line %d: failed to "
409 "parse cred block.", line);
421 if (wpa_config_process_blob(config, f, &line, pos + 12)
423 wpa_printf(MSG_ERROR, "Line %d: failed to "
424 "process blob.", line);
429 } else if (wpa_config_process_global(config, pos, line) < 0) {
430 wpa_printf(MSG_ERROR, "Line %d: Invalid configuration "
431 "line '%s'.", line, pos);