diff options
author | Roy Marples <roy@marples.name> | 2008-10-10 08:37:21 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-10-10 08:37:21 +0000 |
commit | d6da8e8c48feb8faf9287fc86fbbf0890c37a87c (patch) | |
tree | e6cdf21f0f3a3270b705fe14b876f92b14b38dbf /src/librc/librc-misc.c | |
parent | 247766695cd7c5e8d83dff72f7eb7e6578bf57b8 (diff) |
sysinit is now a real runlevel that handles things like udev, dmesg and
mounting various bits in /dev and /sys.
init.sh JUST mounts /lib/rc/init.d (and /proc for Linux systems)
To make development of this easier we now return an empty RC_STRINGLIST
instead of a NULL for empty things.
If you don't have a udev init script installed, don't reboot your box OR
roll back to an older OpenRC version.
Diffstat (limited to 'src/librc/librc-misc.c')
-rw-r--r-- | src/librc/librc-misc.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/librc/librc-misc.c b/src/librc/librc-misc.c index b6157009..749fd812 100644 --- a/src/librc/librc-misc.c +++ b/src/librc/librc-misc.c @@ -84,10 +84,10 @@ RC_STRINGLIST *rc_config_list(const char *file) size_t len = 0; char *p; char *token; - RC_STRINGLIST *list = NULL; + RC_STRINGLIST *list = rc_stringlist_new(); if (!(fp = fopen(file, "r"))) - return NULL; + return list; while ((rc_getline(&buffer, &len, fp))) { p = buffer; @@ -104,8 +104,6 @@ RC_STRINGLIST *rc_config_list(const char *file) if (token[strlen(token) - 1] == '\n') token[strlen(token) - 1] = 0; - if (!list) - list = rc_stringlist_new(); rc_stringlist_add(list, token); } } @@ -131,9 +129,6 @@ RC_STRINGLIST *rc_config_load(const char *file) char *p; list = rc_config_list(file); - if (!list) - return NULL; - config = rc_stringlist_new(); TAILQ_FOREACH(line, list, entries) { /* Get entry */ @@ -203,9 +198,6 @@ char *rc_config_value(RC_STRINGLIST *list, const char *entry) RC_STRING *line; char *p; - if (!list) - return NULL; - TAILQ_FOREACH(line, list, entries) { p = strchr(line->value, '='); if (p && |