rem: int need_extra_file = 0;
add: int need_vmstat_file = 0; int need_proc_scan = 0;
context: static void getstat(jiff *cuse, jiff *cice, jiff *csys, jiff *cide, jiff *ciow,	     unsigned *pin, unsigned *pout, unsigned *s_in, unsigned *sout,	     unsigned *itot, unsigned *i1, unsigned *ct) {  static int fd;  int need_extra_file = 0;  char* b;  buff[BUFFSIZE-1] = 0;  /* ensure null termination in buffer */  if(fd){    lseek(fd, 0L, SEEK_SET);  }else{    fd = open("/proc/stat", O_RDONLY, 0);    if(fd == -1) crash("/proc/stat");  }  read(fd,buff,BUFFSIZE-1);  *itot = 0;   *i1 = 1;   /* ensure assert below will fail if the sscanf bombs */  *ciow = 0;  /* not separated out until the 2.5.41 kernel */  b = strstr(buff, "cpu ");  if(b) sscanf(b,  "cpu  %Lu %Lu %Lu %Lu %Lu", cuse, cice, csys, cide, ciow);  b = strstr(buff, "page ");  if(b) sscanf(b,  "page %u %u", pin, pout);  else need_extra_file = 1;  b = strstr(buff, "swap ");  if(b) sscanf(b,  "swap %u %u", s_in, sout);  else need_extra_file = 1;  b = strstr(buff, "intr ");  if(b) sscanf(b,  "intr %u %u", itot, i1);  b = strstr(buff, "ctxt ");  if(b) sscanf(b,  "ctxt %u", ct);  if(need_extra_file){  /* 2.5.40-bk4 and above */    vminfo();    *pin  = vm_pgpgin;    *pout = vm_pgpgout;    *s_in = vm_pswpin;    *sout = vm_pswpout;  }}