Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
procps
procps-3.2.6-xen.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File procps-3.2.6-xen.dif of Package procps
--- vmstat.c +++ vmstat.c 2009-08-19 12:37:57.000000000 +0000 @@ -184,7 +184,7 @@ static void new_format(void) { unsigned int intr[2], ctxt[2]; unsigned int sleep_half; unsigned long kb_per_page = sysconf(_SC_PAGESIZE) / 1024ul; - int debt = 0; // handle idle ticks running backwards + long long debt = 0; // handle idle ticks running backwards sleep_half=(sleep_time/2); new_header(); @@ -203,6 +203,8 @@ static void new_format(void) { dstl= *cpu_zzz; Div= duse+dsys+didl+diow+dstl; divo2= Div/2UL; + if (Div == 0) + Div++; printf(format, running, blocked, unitConvert(kb_swap_used), unitConvert(kb_main_free), @@ -242,16 +244,18 @@ static void new_format(void) { /* idle can run backwards for a moment -- kernel "feature" */ if(debt){ - didl = (int)didl + debt; - debt = 0; + didl = (long long)didl + debt; + debt = 0LL; } - if( (int)didl < 0 ){ - debt = (int)didl; - didl = 0; + if((long long)didl < 0){ + debt = (long long)didl; + didl = 0ULL; } Div= duse+dsys+didl+diow+dstl; divo2= Div/2UL; + if (Div == 0) + continue; printf(format, running, blocked, unitConvert(kb_swap_used),unitConvert(kb_main_free),
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor