conf: cleanup and relocation of common parsing functions and helpers

- legacy.[ch]: strictly legacy .conf parser boilerplate only
 - conf.[ch]: .conf parser and generic configuration functionality

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-07-30 15:21:26 +02:00
1 parent c20d64587c
commit 47a18140c1
9 files changed
+831 -826

No files matched your search

+2 -21
View File
@@ -24,27 +24,8 @@
#ifndef FINIT_LEGACY_H_
#define FINIT_LEGACY_H_
#include <sys/resource.h>
extern struct rlimit initial_rlimit[RLIMIT_NLIMITS];
extern int runparts_progress;
extern int runparts_sysv;
/*
* legacy.c -- the frozen legacy one-liner parser. No new features
* land here, only in the libconfuse format frontend in conf.c
*/
int legacy_parse_conf (char *file, int is_rcsd);
void legacy_parse_env (char *line);
void kmod_load (char *mod);
void conf_parse_rlimit (char *line, struct rlimit arr[]);
char *lim2str (struct rlimit *rlim);
/*
* conf.c -- format-detecting frontend. The legacy include directive
* routes back through this so included files are format-detected too.
*/
int conf_parse_file (char *file, int is_rcsd);
int legacy_parse_conf (char *file, int is_rcsd);
void legacy_parse_env (char *line);
#endif /* FINIT_LEGACY_H_ */