1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

Merge pull request #30609 from YHNdnzj/analyze-fdstore

analyze-fdstore: minor fixups
This commit is contained in:
Yu Watanabe 2023-12-24 06:44:31 +09:00 committed by GitHub
commit 48e06208ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,12 +81,12 @@ static int dump_fdstore(sd_bus *bus, const char *arg) {
if (r < 0)
return r;
if (FLAGS_SET(arg_json_format_flags, JSON_FORMAT_OFF) && table_get_rows(table) <= 0)
if (FLAGS_SET(arg_json_format_flags, JSON_FORMAT_OFF) && table_get_rows(table) <= 1)
log_info("No file descriptors in fdstore of '%s'.", unit);
else {
r = table_print_with_pager(table, arg_json_format_flags, arg_pager_flags, /* show_header= */true);
if (r < 0)
return log_error_errno(r, "Failed to output table: %m");
return r;
}
return EXIT_SUCCESS;