projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vss: Use the stripped header also at stream start.
[paraslash.git]
/
daemon.c
diff --git
a/daemon.c
b/daemon.c
index a669482fc27525f8c9d2c4ce64a62eb350d4cb06..b7a0a3267b68df5b020159f90c56337073463244 100644
(file)
--- a/
daemon.c
+++ b/
daemon.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 1997-20
09
Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1997-20
11
Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
@@
-56,10
+56,8
@@
void daemon_set_default_log_colors(void)
[LL_CRIT] = "magenta bold",
[LL_EMERG] = "red bold",
};
[LL_CRIT] = "magenta bold",
[LL_EMERG] = "red bold",
};
- for (i = 0; i < NUM_LOGLEVELS; i++) {
- int ret = color_parse(default_log_colors[i], me->log_colors[i]);
- assert(ret >= 0);
- }
+ for (i = 0; i < NUM_LOGLEVELS; i++)
+ color_parse_or_die(default_log_colors[i], me->log_colors[i]);
}
/**
}
/**
@@
-71,7
+69,7
@@
void daemon_set_default_log_colors(void)
*
* \return 1 On success, -1 on errors.
*/
*
* \return 1 On success, -1 on errors.
*/
-
int daemon_set_log_color
(char const *arg)
+
void daemon_set_log_color_or_die
(char const *arg)
{
char *p = strchr(arg, ':');
int ret, ll;
{
char *p = strchr(arg, ':');
int ret, ll;
@@
-83,14
+81,11
@@
int daemon_set_log_color(char const *arg)
goto err;
ll = ret;
p++;
goto err;
ll = ret;
p++;
- ret = color_parse(p, me->log_colors[ll]);
- if (ret < 0)
- goto err;
- return 1;
+ color_parse_or_die(p, me->log_colors[ll]);
+ return;
err:
err:
- PARA_ERROR_LOG("%s: color syntax error\n", arg);
- return -1;
-
+ PARA_EMERG_LOG("%s: color syntax error\n", arg);
+ exit(EXIT_FAILURE);
}
/**
}
/**