path: root/src/pies.h
authorSergey Poznyakoff <>2013-01-07 15:40:47 (GMT)
committer Sergey Poznyakoff <>2013-01-07 16:06:19 (GMT)
commite92cf71a8f4d51810de7c0f7a613402737d66168 (patch) (side-by-side diff)
tree775bba0b6bfb026fc458e4c681744fb7661f349e /src/pies.h
parent5d2eff82abf052d5edb8f201559cb6e17bbf158f (diff)
Add function for parsing /etc/inittab.
* src/limits.c (free_limits): New function. * src/pies.c (config_syntax): Move to pies.h (config_syntax_tab): New type "inittab" (free_action,component_free): New functions. (component_finish): Call component_free to discard the failed component. (main): In sysvinit mode, default to reading two configuration files: /etc/inittab and /etc/pies.init. Don't exit on configuration errors in this mode. * src/pies.h (str_to_config_syntax) (add_config,free_redirector) (component_free,free_limits) (inittab_parse): New protos. * src/progman.c (free_redirector): New function. * src/sysvinit.c (inittab_parse): New function.
Diffstat (limited to 'src/pies.h') (more/less context) (ignore whitespace changes)
1 files changed, 16 insertions, 0 deletions
diff --git a/src/pies.h b/src/pies.h
index ca50a26..28a27a7 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -278,6 +278,19 @@ extern char *console_device;
extern int initdefault;
extern int dfl_level;
+enum config_syntax
+ {
+ };
+int str_to_config_syntax (const char *str, enum config_syntax *psynt);
+void add_config (enum config_syntax syntax, const char *name);
+void free_redirector (struct redirector *rp);
void register_prog (struct component *comp);
int progman_running_p (void);
size_t progman_running_count (void);
@@ -335,6 +348,7 @@ int str_to_socket_type (const char *str, int *pret);
int socket_type_to_str (int socket_type, const char **pres);
struct component *component_create (const char *name);
+void component_free (struct component *comp);
void component_finish (struct component *comp, grecs_locus_t *locus);
struct grecs_keyword *find_component_keyword (const char *ident);
@@ -375,6 +389,7 @@ void enable_socket (int fd);
int parse_limits (limits_record_t *plrec, char *str, char **endp);
int set_limits (const char *name, limits_record_t lrec);
+void free_limits (limits_record_t rec);
void meta1_parser_set_debug (void);
@@ -462,6 +477,7 @@ int is_comp_wait (struct component *comp);
int is_valid_runlevel (int c);
int console_open (int mode);
int telinit (const char *arg);
+int inittab_parse (const char *file);
extern char *sysvinit_environ_hint[];

Return to:

Send suggestions and report system problems to the System administrator.