Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching full:line

31  * wpa_config_get_line - Read the next configuration file line
32 * @s: Buffer for the line
35 * @line: Pointer to a variable storing the file line number
36 * @_pos: Buffer for the pointer to the beginning of data on the text line or
38 * Returns: Pointer to the beginning of data on the text line or %NULL if no
41 * This function reads the next non-empty line from the configuration file and
44 static char * wpa_config_get_line(char *s, int size, FILE *stream, int *line,
50 (*line)++;
54 /* Skip white space from the beginning of line. */
97 static int wpa_config_validate_network(struct wpa_ssid *ssid, int line)
103 wpa_printf(MSG_ERROR, "Line %d: both PSK and "
104 "passphrase configured.", line);
113 wpa_printf(MSG_ERROR, "Line %d: WPA-PSK accepted for key "
114 "management, but no PSK configured.", line);
122 wpa_printf(MSG_DEBUG, "Line %d: removed CCMP from group cipher"
124 "cipher", line);
132 static struct wpa_ssid * wpa_config_read_network(FILE *f, int *line, int id)
138 wpa_printf(MSG_MSGDUMP, "Line: %d - start of a new network block",
139 *line);
147 while (wpa_config_get_line(buf, sizeof(buf), f, line, &pos)) {
155 wpa_printf(MSG_ERROR, "Line %d: Invalid SSID line "
156 "'%s'.", *line, pos);
164 wpa_printf(MSG_ERROR, "Line %d: invalid "
165 "quotation '%s'.", *line, pos2);
171 if (wpa_config_set(ssid, pos, pos2, *line) < 0)
176 wpa_printf(MSG_ERROR, "Line %d: network block was not "
177 "terminated properly.", *line);
181 errors += wpa_config_validate_network(ssid, *line);
193 static struct wpa_config_blob * wpa_config_read_blob(FILE *f, int *line,
202 wpa_printf(MSG_MSGDUMP, "Line: %d - start of a new named blob '%s'",
203 *line, name);
205 while (wpa_config_get_line(buf, sizeof(buf), f, line, &pos)) {
214 wpa_printf(MSG_ERROR, "Line %d: not enough memory for "
215 "blob", *line);
225 wpa_printf(MSG_ERROR, "Line %d: blob was not terminated "
226 "properly", *line);
250 int *line, char *bname)
257 wpa_printf(MSG_ERROR, "Line %d: no blob name terminator",
258 *line);
263 blob = wpa_config_read_blob(f, line, bname);
265 wpa_printf(MSG_ERROR, "Line %d: failed to read blob %s",
266 *line, bname);
278 struct wpa_config *config, int line, const char *value);
284 struct wpa_config *config, int line,
293 wpa_printf(MSG_ERROR, "Line %d: too small %s (value=%d "
294 "min_value=%ld)", line, data->name, *dst,
301 wpa_printf(MSG_ERROR, "Line %d: too large %s (value=%d "
302 "max_value=%ld)", line, data->name, *dst,
313 struct wpa_config *config, int line,
321 wpa_printf(MSG_ERROR, "Line %d: too short %s (len=%lu "
322 "min_len=%ld)", line, data->name,
328 wpa_printf(MSG_ERROR, "Line %d: too long %s (len=%lu "
329 "max_len=%ld)", line, data->name,
348 struct wpa_config *config, int line,
365 int line, const char *so)
374 wpa_printf(MSG_ERROR, "Line %d: Failed to load dynamic EAP "
375 "method '%s'.", line, so);
386 struct wpa_config *config, int line,
391 wpa_printf(MSG_ERROR, "Line %d: invalid UUID", line);
401 struct wpa_config *config, int line,
405 wpa_printf(MSG_ERROR, "Line %d: invalid os_version", line);
477 int line)
489 if (field->parser(field, config, line, pos + flen + 1)) {
490 wpa_printf(MSG_ERROR, "Line %d: failed to "
491 "parse '%s'.", line, pos);
497 wpa_printf(MSG_ERROR, "Line %d: unknown global field '%s'.",
498 line, pos);
510 int errors = 0, line = 0;
530 while (wpa_config_get_line(buf, sizeof(buf), f, &line, &pos)) {
532 ssid = wpa_config_read_network(f, &line, id++);
534 wpa_printf(MSG_ERROR, "Line %d: failed to "
535 "parse network block.", line);
548 wpa_printf(MSG_ERROR, "Line %d: failed to add "
550 line);
556 if (wpa_config_process_blob(config, f, &line, pos + 12)
562 } else if (wpa_config_process_global(config, pos, line) < 0) {
563 wpa_printf(MSG_ERROR, "Line %d: Invalid configuration "
564 "line '%s'.", line, pos);