diff options
author | Kenny Levinsen <kl@kl.wtf> | 2021-03-02 00:14:32 +0100 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2021-03-02 00:27:38 +0100 |
commit | e4c28227ec1de65ee6ce5bb52412a2a2cf4c0628 (patch) | |
tree | f212f7c89cb81485ae142f25f6fd8dbf6ff59aaf /seatd/seatd.c | |
parent | 79b90788bd1b836e3d5449722e40e4628326574d (diff) |
Normalize log texts a bit
Diffstat (limited to 'seatd/seatd.c')
-rw-r--r-- | seatd/seatd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/seatd/seatd.c b/seatd/seatd.c index b601bce..278f857 100644 --- a/seatd/seatd.c +++ b/seatd/seatd.c @@ -24,7 +24,7 @@ static int open_socket(const char *path, int uid, int gid) { } addr = {{0}}; int fd = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); if (fd == -1) { - log_errorf("could not create socket: %s", strerror(errno)); + log_errorf("Could not create socket: %s", strerror(errno)); return -1; } @@ -32,21 +32,21 @@ static int open_socket(const char *path, int uid, int gid) { strncpy(addr.unix.sun_path, path, sizeof addr.unix.sun_path - 1); socklen_t size = offsetof(struct sockaddr_un, sun_path) + strlen(addr.unix.sun_path); if (bind(fd, &addr.generic, size) == -1) { - log_errorf("could not bind socket: %s", strerror(errno)); + log_errorf("Could not bind socket: %s", strerror(errno)); close(fd); return -1; } if (listen(fd, LISTEN_BACKLOG) == -1) { - log_errorf("could not listen on socket: %s", strerror(errno)); + log_errorf("Could not listen on socket: %s", strerror(errno)); close(fd); return -1; } if (uid != 0 || gid != 0) { if (chown(path, uid, gid) == -1) { - log_errorf("could not chown socket to uid %d, gid %d: %s", uid, gid, + log_errorf("Could not chown socket to uid %d, gid %d: %s", uid, gid, strerror(errno)); } else if (chmod(path, 0770) == -1) { - log_errorf("could not chmod socket: %s", strerror(errno)); + log_errorf("Could not chmod socket: %s", strerror(errno)); } } return fd; @@ -122,7 +122,7 @@ int main(int argc, char *argv[]) { socket_path = SEATD_DEFAULTPATH; struct stat st; if (stat(socket_path, &st) == 0) { - log_info("removing leftover seatd socket"); + log_info("Removing leftover seatd socket"); unlink(socket_path); } } @@ -135,13 +135,13 @@ int main(int argc, char *argv[]) { int socket_fd = open_socket(socket_path, uid, gid); if (socket_fd == -1) { - log_errorf("could not create server socket: %s", strerror(errno)); + log_errorf("Could not create server socket: %s", strerror(errno)); server_finish(&server); return 1; } if (poller_add_fd(&server.poller, socket_fd, EVENT_READABLE, server_handle_connection, &server) == NULL) { - log_errorf("could not add socket to poller: %s", strerror(errno)); + log_errorf("Could not add socket to poller: %s", strerror(errno)); close(socket_fd); server_finish(&server); return 1; @@ -151,7 +151,7 @@ int main(int argc, char *argv[]) { while (server.running) { if (poller_poll(&server.poller) == -1) { - log_errorf("poller failed: %s", strerror(errno)); + log_errorf("Poller failed: %s", strerror(errno)); return 1; } } |