Home
last modified time | relevance | path

Searched refs:parser (Results 1 – 25 of 30) sorted by relevance

12

/busybox-1.35.0/libbb/
Dparse_config.c72 parser_t *parser; in config_open2() local
77 parser = xzalloc(sizeof(*parser)); in config_open2()
78 parser->fp = fp; in config_open2()
79 return parser; in config_open2()
87 void FAST_FUNC config_close(parser_t *parser) in config_close() argument
89 if (parser) { in config_close()
91 free(parser->data); in config_close()
92 fclose(parser->fp); in config_close()
93 free(parser->line); in config_close()
94 free(parser->nline); in config_close()
[all …]
Dsecuretty.c13 parser_t *parser = config_open2("/etc/securetty", fopen_for_read); in is_tty_secure() local
14 while (config_read(parser, &buf, 1, 1, "# \t", PARSE_NORMAL)) { in is_tty_secure()
19 config_close(parser); in is_tty_secure()
/busybox-1.35.0/util-linux/
Dlsusb.c31 parser_t *parser; in fileAction() local
37 parser = config_open2(uevent_filename, fopen_for_read); in fileAction()
40 while (config_read(parser, tokens, 4, 2, "\\/=", PARSE_NORMAL)) { in fileAction()
41 if ((parser->lineno == 1) && strcmp(tokens[0], "DEVTYPE") == 0) { in fileAction()
61 config_close(parser); in fileAction()
Dlspci.c44 parser_t *parser; in fileAction() local
51 parser = config_open2(uevent_filename, fopen_for_read); in fileAction()
54 while (config_read(parser, tokens, 3, 2, "\0:=", PARSE_NORMAL)) { in fileAction()
82 config_close(parser); in fileAction()
Dacpid.c203 parser_t *parser; in parse_conf_file() local
206 parser = config_open2(filename, fopen_for_read); in parse_conf_file()
208 if (parser) { in parse_conf_file()
209 while (config_read(parser, tokens, 2, 2, "# \t", PARSE_NORMAL)) { in parse_conf_file()
215 config_close(parser); in parse_conf_file()
224 parser_t *parser; in parse_map_file() local
227 parser = config_open2(filename, fopen_for_read); in parse_map_file()
229 if (parser) { in parse_map_file()
230 while (config_read(parser, tokens, 6, 6, "# \t", PARSE_NORMAL)) { in parse_map_file()
240 config_close(parser); in parse_map_file()
Dmdev.c304 parser_t *parser; member
386 if (!config_read(G.parser, tokens, 4, 3, "# \t", PARSE_NORMAL & ~PARSE_EOL_COMMENTS)) in parse_next_rule()
405 bb_error_msg("bad @maj,min on line %d", G.parser->lineno); in parse_next_rule()
416 bb_error_msg("bad $envvar=regex on line %d", G.parser->lineno); in parse_next_rule()
428 bb_error_msg("unknown user/group '%s' on line %d", tokens[1], G.parser->lineno); in parse_next_rule()
447 bb_error_msg("bad line %u", G.parser->lineno); in parse_next_rule()
459 config_close(G.parser); in parse_next_rule()
460 G.parser = NULL; in parse_next_rule()
474 if (!G.parser && G.filename) { in next_rule()
476 G.parser = config_open2(G.filename, fopen_for_read); in next_rule()
[all …]
Dfbset.c274 parser_t *parser = config_open(fn); in read_mode_db() local
276 while (config_read(parser, token, 2, 1, "# \t\r", PARSE_NORMAL)) { in read_mode_db()
296 while (config_read(parser, token, 2, 1, "# \t", PARSE_NORMAL)) { in read_mode_db()
/busybox-1.35.0/modutils/
Dlsmod.c79 parser_t *parser = config_open("/proc/modules"); in lsmod_main() local
88 while (config_read(parser, token, 4, 3, "# \t", PARSE_NORMAL)) { in lsmod_main()
107 while (config_read(parser, token, 4, 4, "# \t", PARSE_NORMAL & ~PARSE_GREEDY)) { in lsmod_main()
127 config_close(parser); in lsmod_main()
Dmodinfo.c144 parser_t *parser; in modinfo_main() local
157 parser = config_open2( in modinfo_main()
162 while (config_read(parser, tokens, 2, 1, "# \t", PARSE_NORMAL)) { in modinfo_main()
176 config_close(parser); in modinfo_main()
Dmodprobe.c626 parser_t *parser = config_open2("/proc/modules", fopen_for_read); in modprobe_main() local
627 while (config_read(parser, &s, 1, 1, "# \t", PARSE_NORMAL & ~PARSE_GREEDY)) in modprobe_main()
629 config_close(parser); in modprobe_main()
631 parser = config_open2("modules.builtin", fopen_for_read); in modprobe_main()
633 while (config_read(parser, &s, 1, 1, "# \t", PARSE_NORMAL)) in modprobe_main()
635 config_close(parser); in modprobe_main()
/busybox-1.35.0/miscutils/
Drfkill.c94 parser_t *parser; in rfkill_main() local
110 parser = config_open2(rf_sysfs, fopen_for_read); in rfkill_main()
111 while (config_read(parser, tokens, 2, 2, "\n=", PARSE_NORMAL)) { in rfkill_main()
121 config_close(parser); in rfkill_main()
Dman.c256 parser_t *parser; in man_main() local
278 parser = config_open2("/etc/man.config", fopen_for_read); in man_main()
279 if (!parser) in man_main()
280 parser = config_open2("/etc/man.conf", fopen_for_read); in man_main()
281 if (!parser) in man_main()
282 parser = config_open2("/etc/man_db.conf", fopen_for_read); in man_main()
284 while (config_read(parser, token, 2, 0, "# \t", PARSE_NORMAL)) { in man_main()
303 config_close(parser); in man_main()
Dmakedevs.c182 parser_t *parser; in makedevs_main() local
200 parser = config_open(line); in makedevs_main()
201 while (config_read(parser, &line, 1, 1, "# \t", PARSE_NORMAL)) { in makedevs_main()
217 linenum = parser->lineno; in makedevs_main()
304 config_close(parser); in makedevs_main()
Dcrond.c416 struct parser_t *parser; in load_crontab() local
432 parser = config_open(fileName); in load_crontab()
433 if (!parser) in load_crontab()
438 if (fstat(fileno(parser->fp), &sbuf) == 0 && sbuf.st_uid == DAEMON_UID) { in load_crontab()
454 n = config_read(parser, tokens, 6, 1, "# \t", PARSE_NORMAL | PARSE_KEEP_COPY); in load_crontab()
458 log5("user:%s entry:%s", fileName, parser->data); in load_crontab()
519 skip_whitespace(parser->data))); in load_crontab()
580 config_close(parser); in load_crontab()
/busybox-1.35.0/networking/
Dnameif.c227 parser_t *parser; in nameif_main() local
246 parser = config_open(fname); in nameif_main()
247 while (config_read(parser, token, 2, 2, "# \t", PARSE_NORMAL)) in nameif_main()
249 config_close(parser); in nameif_main()
253 parser = config_open2("/proc/net/dev", xfopen_for_read); in nameif_main()
255 while (clist && config_read(parser, token, 2, 2, "\0: \t", PARSE_NORMAL)) { in nameif_main()
261 if (parser->lineno <= 2) in nameif_main()
325 config_close(parser); in nameif_main()
Dhostname.c55 parser_t *parser = config_open2(s, xfopen_for_read); in do_sethostname() local
56 while (config_read(parser, &s, 1, 1, "# \t", PARSE_NORMAL & ~PARSE_GREEDY)) { in do_sethostname()
60 config_close(parser); in do_sethostname()
Ddnsd.c118 parser_t *parser; in parse_conf_file() local
125 parser = config_open(fileconf); in parse_conf_file()
126 while (config_read(parser, token, 2, 2, "# \t", PARSE_NORMAL)) { in parse_conf_file()
131 bb_error_msg("error at line %u, skipping", parser->lineno); in parse_conf_file()
158 config_close(parser); in parse_conf_file()
Dinetd.c396 parser_t *parser; member
419 #define parser (G.parser ) macro
664 if (parser != NULL) in reopen_config_file()
665 config_close(parser); in reopen_config_file()
666 parser = config_open(config_filename); in reopen_config_file()
667 return (parser != NULL); in reopen_config_file()
672 if (parser) { in close_config_file()
673 config_close(parser); in close_config_file()
674 parser = NULL; in close_config_file()
734 argc = config_read(parser, token, 6+MAXARGV, 1, "# \t", PARSE_NORMAL); in parse_one_line()
[all …]
/busybox-1.35.0/networking/libiproute/
Drt_names.c32 parser_t *parser; in rtnl_tab_initialize() local
35 parser = config_open2(fullname, fopen_for_read); in rtnl_tab_initialize()
36 while (config_read(parser, token, 2, 2, "# \t", PARSE_NORMAL)) { in rtnl_tab_initialize()
40 file, parser->lineno); in rtnl_tab_initialize()
45 config_close(parser); in rtnl_tab_initialize()
/busybox-1.35.0/selinux/
Dsestatus.c69 parser_t *parser; in read_config() local
74 parser = config_open("/etc/sestatus.conf"); in read_config()
75 while (config_read(parser, &buf, 1, 1, "# \t", PARSE_NORMAL)) { in read_config()
90 config_close(parser); in read_config()
/busybox-1.35.0/procps/
Dsysctl.c277 parser_t *parser; in sysctl_handle_preload_file() local
280 parser = config_open(filename); in sysctl_handle_preload_file()
293 while (config_read(parser, token, 2, 2, ";#=", parse_flags)) { in sysctl_handle_preload_file()
307 config_close(parser); in sysctl_handle_preload_file()
/busybox-1.35.0/init/
Dbootchartd.c388 parser_t *parser = config_open2("/etc/bootchartd.conf" + 5, fopen_for_read); in bootchartd_main() local
389 if (!parser) in bootchartd_main()
390 parser = config_open2("/etc/bootchartd.conf", fopen_for_read); in bootchartd_main()
391 while (config_read(parser, token, 2, 0, "#=", PARSE_NORMAL & ~PARSE_COLLAPSE)) { in bootchartd_main()
400 config_close(parser); in bootchartd_main()
Dinit.c674 parser_t *parser = config_open2("/etc/inittab", fopen_for_read); in parse_inittab() local
676 if (parser == NULL) in parse_inittab()
703 while (config_read(parser, token, 4, 0, "#:", in parse_inittab()
727 parser->lineno); in parse_inittab()
729 config_close(parser); in parse_inittab()
/busybox-1.35.0/console-tools/
Dloadfont.c484 parser_t *parser; in setfont_main() local
495 parser = config_open(mapfilename); in setfont_main()
496 while (config_read(parser, token, 2, 2, "# \t", PARSE_NORMAL | PARSE_MIN_DIE)) { in setfont_main()
512 config_close(parser); in setfont_main()
/busybox-1.35.0/sysklogd/
Dsyslogd.c402 parser_t *parser; in parse_syslogdcfg() local
404 parser = config_open2(file ? file : "/etc/syslog.conf", in parse_syslogdcfg()
406 if (!parser) in parse_syslogdcfg()
414 while (config_read(parser, tok, 3, 2, "# \t", PARSE_NORMAL | PARSE_MIN_DIE)) { in parse_syslogdcfg()
541 config_close(parser); in parse_syslogdcfg()
547 parser->lineno); in parse_syslogdcfg()

12