diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-11-04 23:30:11 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-11-04 23:30:11 +0100 |
commit | dea28e1e558228d9c46cdb25c7f00986d9d52bcc (patch) | |
tree | 178fa466dea11782289f721a3c9992e4d981841f /procps | |
parent | dcb163aa8e7808b59aef3d3319c707e7d9ac4ce4 (diff) | |
download | busybox-w32-dea28e1e558228d9c46cdb25c7f00986d9d52bcc.tar.gz busybox-w32-dea28e1e558228d9c46cdb25c7f00986d9d52bcc.tar.bz2 busybox-w32-dea28e1e558228d9c46cdb25c7f00986d9d52bcc.zip |
powertop: fix last line detection in process_timer_stats()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps')
-rw-r--r-- | procps/powertop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/procps/powertop.c b/procps/powertop.c index 87efbe892..da7f05258 100644 --- a/procps/powertop.c +++ b/procps/powertop.c | |||
@@ -420,12 +420,12 @@ static NOINLINE int process_timer_stats(void) | |||
420 | int idx; | 420 | int idx; |
421 | 421 | ||
422 | count = skip_whitespace(buf); | 422 | count = skip_whitespace(buf); |
423 | if (strcmp(strchrnul(count, ' '), " total events") == 0) | ||
424 | break; | ||
425 | p = strchr(count, ','); | 423 | p = strchr(count, ','); |
426 | if (!p) | 424 | if (!p) |
427 | continue; | 425 | continue; |
428 | *p++ = '\0'; | 426 | *p++ = '\0'; |
427 | if (strcmp(skip_non_whitespace(count), " total events") == 0) | ||
428 | break; | ||
429 | if (strchr(count, 'D')) | 429 | if (strchr(count, 'D')) |
430 | continue; /* deferred */ | 430 | continue; /* deferred */ |
431 | p = skip_whitespace(p); /* points to pid now */ | 431 | p = skip_whitespace(p); /* points to pid now */ |