diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-01-10 18:23:24 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-01-10 18:28:30 +0900 |
commit | bd17fa8cd870bc403e698fafa5ac0bd6dc4af901 (patch) | |
tree | 7b228e82ef39ce1f9bd6e2684df046d1bd790768 /src/busctl | |
parent | 964a7745de89e80a5b84e2d421831f06e5ebc911 (diff) | |
download | systemd-bd17fa8cd870bc403e698fafa5ac0bd6dc4af901.tar.gz |
tree-wide: use table_log_add_error()
Diffstat (limited to 'src/busctl')
-rw-r--r-- | src/busctl/busctl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c index aec323749c..659621256b 100644 --- a/src/busctl/busctl.c +++ b/src/busctl/busctl.c @@ -237,7 +237,7 @@ static int list_bus_names(int argc, char **argv, void *userdata) { TABLE_EMPTY, TABLE_EMPTY); if (r < 0) - return log_error_errno(r, "Failed to fill line: %m"); + return table_log_add_error(r); continue; } @@ -254,7 +254,7 @@ static int list_bus_names(int argc, char **argv, void *userdata) { TABLE_INT, PTR_TO_INT(v), TABLE_STRING, k); if (r < 0) - return log_error_errno(r, "Failed to add name %s to table: %m", k); + return table_log_add_error(r); r = sd_bus_get_name_creds( bus, k, @@ -283,7 +283,7 @@ static int list_bus_names(int argc, char **argv, void *userdata) { } else r = table_add_many(table, TABLE_EMPTY, TABLE_EMPTY); if (r < 0) - return log_error_errno(r, "Failed to add fields to table: %m"); + return table_log_add_error(r); r = sd_bus_creds_get_euid(creds, &uid); if (r >= 0) { @@ -297,7 +297,7 @@ static int list_bus_names(int argc, char **argv, void *userdata) { } else r = table_add_cell(table, NULL, TABLE_EMPTY, NULL); if (r < 0) - return log_error_errno(r, "Failed to add field to table: %m"); + return table_log_add_error(r); (void) sd_bus_creds_get_unique_name(creds, &unique); (void) sd_bus_creds_get_unit(creds, &unit); @@ -312,7 +312,7 @@ static int list_bus_names(int argc, char **argv, void *userdata) { TABLE_STRING, cn); } if (r < 0) - return log_error_errno(r, "Failed to add fields to table: %m"); + return table_log_add_error(r); if (arg_show_machine) { sd_id128_t mid; @@ -325,7 +325,7 @@ static int list_bus_names(int argc, char **argv, void *userdata) { r = table_add_cell(table, NULL, TABLE_STRING, sd_id128_to_string(mid, m)); if (r < 0) - return log_error_errno(r, "Failed to add field to table: %m"); + return table_log_add_error(r); continue; /* line fully filled, no need to fill the remainder below */ } |