]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze-fdstore: ignore table header when checking stored fd count
authorMike Yuan <me@yhndnzj.com>
Sat, 23 Dec 2023 20:26:16 +0000 (04:26 +0800)
committerMike Yuan <me@yhndnzj.com>
Sat, 23 Dec 2023 20:27:55 +0000 (04:27 +0800)
src/analyze/analyze-fdstore.c

index 13db7f50883134a8f83c4be7618931bba6d2dad0..9881520242fc56bfc1f1273b7c6d909aba4798d2 100644 (file)
@@ -81,7 +81,7 @@ 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);