mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +00:00
log.c: New log_is_debug() function, hide access to debug variable
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e9d5512e1a
commit
51e1a907e6
6 files changed
+18
-11
No files matched your search
+2
-2
@@ -255,7 +255,7 @@ static int service_start(svc_t *svc)
|
||||
dup2(fd, STDOUT_FILENO);
|
||||
dup2(fd, STDERR_FILENO);
|
||||
close(fd);
|
||||
} else if (debug) {
|
||||
} else if (log_is_debug()) {
|
||||
int fd;
|
||||
|
||||
fd = open(CONSOLE, O_WRONLY | O_APPEND);
|
||||
@@ -286,7 +286,7 @@ static int service_start(svc_t *svc)
|
||||
waitpid(pid, NULL, 0);
|
||||
|
||||
exit(status);
|
||||
} else if (debug) {
|
||||
} else if (log_is_debug()) {
|
||||
char buf[CMD_SIZE] = "";
|
||||
|
||||
for (i = 0; i < (MAX_NUM_SVC_ARGS - 1) && svc->args[i][0] != 0; i++) {
|
||||
|
||||
Reference in new issue
Block a user