summaryrefslogtreecommitdiffstats
path: root/rcS.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-11-14 13:41:13 +0100
committerJohn Crispin <blogic@openwrt.org>2013-11-15 17:05:20 +0100
commit916f95cb58604038695347ee41a430d8ca1f0556 (patch)
tree5dbb52a6adaf28c6c6989ea37e6975aa52075160 /rcS.c
parentf9d31edb8938341b9217ee4c14eb58111414eb97 (diff)
downloadunitd-916f95cb58604038695347ee41a430d8ca1f0556.tar
unitd-916f95cb58604038695347ee41a430d8ca1f0556.zip
debloat and reorganize code
split app into procd and init binaries remove log support, this is an external service now Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'rcS.c')
-rw-r--r--rcS.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rcS.c b/rcS.c
index f041f09..ae8f08e 100644
--- a/rcS.c
+++ b/rcS.c
@@ -55,7 +55,7 @@ static void pipe_cb(struct ustream *s, int bytes)
break;
*newline = 0;
len = newline + 1 - str;
- log_printf(buf->data);
+ syslog(0, buf->data);
ustream_consume(s, len);
} while (1);
}
@@ -66,7 +66,7 @@ static void q_initd_run(struct runqueue *q, struct runqueue_task *t)
int pipefd[2];
pid_t pid;
- DEBUG(1, "start %s %s \n", s->file, s->param);
+ DEBUG(2, "start %s %s \n", s->file, s->param);
if (pipe(pipefd) == -1) {
ERROR("Failed to create pipe\n");
return;
@@ -96,7 +96,7 @@ static void q_initd_complete(struct runqueue *q, struct runqueue_task *p)
{
struct initd *s = container_of(p, struct initd, proc.task);
- DEBUG(1, "stop %s %s \n", s->file, s->param);
+ DEBUG(2, "stop %s %s \n", s->file, s->param);
ustream_free(&s->fd.stream);
close(s->fd.fd.fd);
free(s);
@@ -126,10 +126,10 @@ static int _rc(struct runqueue *q, char *path, const char *file, char *pattern,
int j;
- DEBUG(1, "running %s/%s%s %s\n", path, file, pattern, param);
+ DEBUG(2, "running %s/%s%s %s\n", path, file, pattern, param);
snprintf(dir, sizeof(dir), "%s/%s%s", path, file, pattern);
if (glob(dir, GLOB_NOESCAPE | GLOB_MARK, NULL, &gl)) {
- printf("glob failed on %s\n", dir);
+ DEBUG(2, "glob failed on %s\n", dir);
return -1;
}