diff options
Diffstat (limited to 'src/login/loginctl.c')
-rw-r--r-- | src/login/loginctl.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/login/loginctl.c b/src/login/loginctl.c index fcdf6275e9..d0fd14b90d 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -385,7 +385,7 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li r = bus_map_all_properties(bus, "org.freedesktop.login1", path, map, &i); if (r < 0) { - log_error("Could not get properties: %s", strerror(-r)); + log_error_errno(-r, "Could not get properties: %m"); return r; } @@ -498,7 +498,7 @@ static int print_user_status_info(sd_bus *bus, const char *path, bool *new_line) r = bus_map_all_properties(bus, "org.freedesktop.login1", path, map, &i); if (r < 0) { - log_error("Could not get properties: %s", strerror(-r)); + log_error_errno(-r, "Could not get properties: %m"); goto finish; } @@ -562,7 +562,7 @@ static int print_seat_status_info(sd_bus *bus, const char *path, bool *new_line) r = bus_map_all_properties(bus, "org.freedesktop.login1", path, map, &i); if (r < 0) { - log_error("Could not get properties: %s", strerror(-r)); + log_error_errno(-r, "Could not get properties: %m"); goto finish; } @@ -617,7 +617,7 @@ static int show_properties(sd_bus *bus, const char *path, bool *new_line) { r = bus_print_all_properties(bus, "org.freedesktop.login1", path, arg_property, arg_all); if (r < 0) - log_error("Could not get properties: %s", strerror(-r)); + log_error_errno(-r, "Could not get properties: %m"); return r; } @@ -700,7 +700,7 @@ static int show_user(sd_bus *bus, char **args, unsigned n) { r = get_user_creds((const char**) (args+i), &uid, NULL, NULL, NULL); if (r < 0) { - log_error("Failed to look up user %s: %s", args[i], strerror(-r)); + log_error_errno(-r, "Failed to look up user %s: %m", args[i]); return r; } @@ -860,7 +860,7 @@ static int enable_linger(sd_bus *bus, char **args, unsigned n) { r = get_user_creds((const char**) (args+i), &uid, NULL, NULL, NULL); if (r < 0) { - log_error("Failed to look up user %s: %s", args[i], strerror(-r)); + log_error_errno(-r, "Failed to look up user %s: %m", args[i]); return r; } @@ -893,7 +893,7 @@ static int terminate_user(sd_bus *bus, char **args, unsigned n) { r = get_user_creds((const char**) (args+i), &uid, NULL, NULL, NULL); if (r < 0) { - log_error("Failed to look up user %s: %s", args[i], strerror(-r)); + log_error_errno(-r, "Failed to look up user %s: %m", args[i]); return r; } @@ -929,7 +929,7 @@ static int kill_user(sd_bus *bus, char **args, unsigned n) { r = get_user_creds((const char**) (args+i), &uid, NULL, NULL, NULL); if (r < 0) { - log_error("Failed to look up user %s: %s", args[i], strerror(-r)); + log_error_errno(-r, "Failed to look up user %s: %m", args[i]); return r; } @@ -1308,7 +1308,7 @@ int main(int argc, char *argv[]) { r = bus_open_transport(arg_transport, arg_host, false, &bus); if (r < 0) { - log_error("Failed to create bus connection: %s", strerror(-r)); + log_error_errno(-r, "Failed to create bus connection: %m"); goto finish; } |