mirror of
https://github.com/systemd/systemd.git
synced 2025-01-14 23:24:38 +03:00
systemctl: use LESS_BY where appropriate
This commit is contained in:
parent
27ba2ad2f6
commit
a0dde733ac
@ -710,11 +710,7 @@ static void print_status_info(
|
||||
|
||||
printf(" CGroup: %s\n", i->control_group);
|
||||
|
||||
c = columns();
|
||||
if (c > sizeof(prefix) - 1)
|
||||
c -= sizeof(prefix) - 1;
|
||||
else
|
||||
c = 0;
|
||||
c = LESS_BY(columns(), strlen(prefix));
|
||||
|
||||
r = unit_show_processes(bus, i->id, i->control_group, prefix, c, get_output_flags(), &error);
|
||||
if (r == -EBADR) {
|
||||
@ -2097,11 +2093,7 @@ static int show_system_status(sd_bus *bus) {
|
||||
static const char prefix[] = " ";
|
||||
unsigned c;
|
||||
|
||||
c = columns();
|
||||
if (c > sizeof(prefix) - 1)
|
||||
c -= sizeof(prefix) - 1;
|
||||
else
|
||||
c = 0;
|
||||
c = LESS_BY(columns(), strlen(prefix));
|
||||
|
||||
show_cgroup(SYSTEMD_CGROUP_CONTROLLER, strempty(mi.control_group), prefix, c, get_output_flags());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user