aboutsummaryrefslogtreecommitdiff
path: root/src/comp.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-02-21 12:40:53 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-02-21 12:40:53 +0200
commit6aac230ce3d21f1e71333ec3863c7ea1afd051c3 (patch)
treebddb95396d1eb12401db23946119fdac79becf43 /src/comp.c
parentda6e295140fc1a1ef56db1c6f792e86793f7f2b1 (diff)
downloadpies-6aac230ce3d21f1e71333ec3863c7ea1afd051c3.tar.gz
pies-6aac230ce3d21f1e71333ec3863c7ea1afd051c3.tar.bz2
Provide fall-back entry in init mode
* src/sysvinit.c (inittab_parse): Provide default entry if inittab cannot be read or if it defined no components. * src/comp.c (component_list_is_empty): New function. * src/pies.c (pies_read_config): Always return 0 in init mode. (main): Use LOG_DAEMON in init mode. * src/pies.h (component_list_is_empty): New proto.
Diffstat (limited to 'src/comp.c')
-rw-r--r--src/comp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/comp.c b/src/comp.c
index 5ddac36..38e440e 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -100,6 +100,12 @@ component_unlink (struct component *comp)
list->tail = comp->prev;
}
+int
+component_list_is_empty (void)
+{
+ return !comp_list[cur].head;
+}
+
struct component *
component_lookup_tag (int idx, const char *tag)
{

Return to:

Send suggestions and report system problems to the System administrator.