1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 14:55:37 +03:00

userdb: fix error handling

This commit is contained in:
Yu Watanabe 2022-05-13 21:49:53 +09:00
parent 2c032478fc
commit a98042e7a3

View File

@ -957,7 +957,7 @@ static int display_services(int argc, char *argv[], void *userdata) {
fd = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
if (fd < 0)
return log_error_errno(r, "Failed to allocate AF_UNIX/SOCK_STREAM socket: %m");
return log_error_errno(errno, "Failed to allocate AF_UNIX/SOCK_STREAM socket: %m");
if (connect(fd, &sockaddr.sa, sockaddr_len) < 0) {
no = strjoin("No (", errno_to_name(errno), ")");