systemctl: hide some empty properties without --all

Fixes: #19423
This commit is contained in:
Frantisek Sumsal
2021-04-27 12:16:50 +09:00
committed by Yu Watanabe
parent ea1036e253
commit 1ceaad6937
2 changed files with 8 additions and 4 deletions
+4 -2
View File
@@ -1425,7 +1425,8 @@ static int print_property(const char *name, const char *expected_value, sd_bus_m
if (n < 0)
return log_oom();
bus_print_property_value(name, expected_value, value, h);
if (all || !isempty(h))
bus_print_property_value(name, expected_value, value, h);
return 1;
@@ -1626,7 +1627,8 @@ static int print_property(const char *name, const char *expected_value, sd_bus_m
if (!affinity)
return log_oom();
bus_print_property_value(name, expected_value, value, affinity);
if (all || !isempty(affinity))
bus_print_property_value(name, expected_value, value, affinity);
return 1;
} else if (streq(name, "MountImages")) {