From 2499405b2777de9d18540cdbf77cd980d2424b62 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 6 Sep 2016 00:07:48 +0200 Subject: [PATCH] Misc. whitespace fixes, and comment Signed-off-by: Joachim Nilsson --- client.c | 2 +- helpers.c | 2 +- plugin.c | 3 ++- svc.h | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client.c b/client.c index d09d64a8..fa2edfc4 100644 --- a/client.c +++ b/client.c @@ -98,7 +98,7 @@ static int usage(int rc) { fprintf(stderr, "Usage: %s [OPTIONS] [q | Q | 0-9]\n\n" "Options:\n" - " -h, --help This help text\n\n" + " -h, --help This help text\n" " -V, --version Show Finit version\n\n" "Commands:\n" " 0 Power-off the system, same as initctl poweroff\n" diff --git a/helpers.c b/helpers.c index 1c3dfa2d..1bc5546b 100644 --- a/helpers.c +++ b/helpers.c @@ -192,7 +192,7 @@ void logit(int prio, const char *fmt, ...) fp = fopen("/dev/kmsg", "w"); if (fp) { - fprintf(fp, "<%d>finit[1]: ", LOG_DAEMON | prio); + fprintf(fp, "<%d>finit[1]:", LOG_DAEMON | prio); vfprintf(fp, fmt, ap); fclose(fp); } else { diff --git a/plugin.c b/plugin.c index c7ee9130..1821192e 100644 --- a/plugin.c +++ b/plugin.c @@ -51,7 +51,8 @@ static char *trim_ext(char *name) if (name) { ptr = strstr(name, ".so"); - if (!ptr) ptr = strstr(name, ".c"); + if (!ptr) + ptr = strstr(name, ".c"); if (ptr) *ptr = 0; } diff --git a/svc.h b/svc.h index 207fabee..078a9add 100755 --- a/svc.h +++ b/svc.h @@ -102,7 +102,8 @@ typedef struct svc { inetd_t inetd; int stdin_fd; - int log; + /* Set for services we need to redirect stdout/stderr to syslog */ + int log; /* Identity */ char username[MAX_USER_LEN];