summaryrefslogtreecommitdiffstats
path: root/src/cgtop
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-10-19 00:06:47 +0200
committerLennart Poettering <lennart@poettering.net>2012-10-19 00:07:55 +0200
commited757c0cb03eef50e8d9aeb4682401c3e9486f0b (patch)
tree3350f8e7efb3a713d23591983378b5fbebaea7f5 /src/cgtop
parentutil: unify usage of on_tty() in util.c (diff)
downloadsystemd-ed757c0cb03eef50e8d9aeb4682401c3e9486f0b.tar.xz
systemd-ed757c0cb03eef50e8d9aeb4682401c3e9486f0b.zip
util: unify line caching and column caching
Diffstat (limited to 'src/cgtop')
-rw-r--r--src/cgtop/cgtop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index ee421e383b..f2e62761f1 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -443,9 +443,9 @@ static int display(Hashmap *a) {
qsort(array, n, sizeof(Group*), group_compare);
- rows = fd_lines(STDOUT_FILENO);
- if (rows <= 0)
- rows = 25;
+ rows = lines();
+ if (rows <= 10)
+ rows = 10;
path_columns = columns() - 42;
if (path_columns < 10)
@@ -653,7 +653,7 @@ int main(int argc, char *argv[]) {
goto finish;
}
- signal(SIGWINCH, columns_cache_reset);
+ signal(SIGWINCH, columns_lines_cache_reset);
while (!quit) {
Hashmap *c;