mirror of
https://github.com/troglobit/finit.git
synced 2026-10-16 10:39:35 +00:00
svc.c: Replace daemon-only logging API with API from err.h
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
0f64e18f27
commit
d56031db7d
1 file changed
+3
-4
@@ -22,6 +22,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <err.h>
|
||||
#include <ctype.h> /* isdigit() */
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
@@ -42,7 +43,7 @@ static svc_t *__connect_shm(void)
|
||||
if (!list) {
|
||||
/* This should never happen, but if it does we're probably
|
||||
* knee-deep in more serious problems already... */
|
||||
_e("Failed connecting to shared memory, error %d: %s", errno, strerror(errno));
|
||||
warn("Failed connecting to shared memory, error %d", errno);
|
||||
abort();
|
||||
}
|
||||
|
||||
@@ -313,10 +314,8 @@ svc_t *svc_find(char *cmd, int id)
|
||||
svc_t *svc;
|
||||
|
||||
for (svc = svc_iterator(1); svc; svc = svc_iterator(0)) {
|
||||
if (svc->id == id && !strncmp(svc->cmd, cmd, strlen(svc->cmd))) {
|
||||
_d("Found a matching svc for %s", cmd);
|
||||
if (svc->id == id && !strncmp(svc->cmd, cmd, strlen(svc->cmd)))
|
||||
return svc;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
Reference in new issue
Block a user