From 37989eb47e1ce58eb42bcc50b2abc2dd962ef076 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 27 Jan 2022 18:21:45 +0100 Subject: prefix perror with rvnit: --- rvnit.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rvnit.c b/rvnit.c index f7b35de..9afd3f7 100644 --- a/rvnit.c +++ b/rvnit.c @@ -220,7 +220,7 @@ socket_loop(void* ignored) strncpy(addr.sun_path, path, sizeof addr.sun_path - 1); int listenfd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); if (listenfd < 0) { - perror("socket"); + perror("rvnit: socket"); exit(111); } unlink(path); @@ -228,13 +228,13 @@ socket_loop(void* ignored) int r = bind(listenfd, (struct sockaddr *)&addr, sizeof addr); umask(mask); if (r < 0) { - perror("bind"); + perror("rvnit: bind"); exit(111); } r = listen(listenfd, SOMAXCONN); if (r < 0) { - perror("listen"); + perror("rvnit: listen"); exit(111); } @@ -367,7 +367,7 @@ logger_loop(void* ignored) int n = poll(fds, nfds, -1); if (n < 0) { - perror("poll"); + perror("rvnit: poll"); sleep(1); continue; } @@ -399,7 +399,7 @@ logger_loop(void* ignored) char buf[4096]; ssize_t rd = read(fds[j].fd, buf, sizeof buf); if (rd < 0) { - perror("read"); + perror("rvnit: read"); continue; } @@ -666,7 +666,7 @@ main(int argc, char *argv[]) dir = argv[1]; if (chdir(dir) < 0) { - perror("chdir"); + perror("rvnit: chdir"); return 111; } @@ -702,7 +702,7 @@ main(int argc, char *argv[]) } if (pthread_mutex_init(&services_lock, 0) != 0) { - perror("pthread_mutex_init"); + perror("rvnit: pthread_mutex_init"); return 111; } -- cgit 1.4.1