[BACK]Return to vmstat.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / vmstat

Diff for /src/usr.bin/vmstat/vmstat.c between version 1.91 and 1.92

version 1.91, 2004/09/23 22:55:06 version 1.92, 2004/11/09 23:20:18
Line 1118 
Line 1118 
         mib[2] = KERN_POOL_NPOOLS;          mib[2] = KERN_POOL_NPOOLS;
         size = sizeof(npools);          size = sizeof(npools);
         if (sysctl(mib, 3, &npools, &size, NULL, 0) < 0) {          if (sysctl(mib, 3, &npools, &size, NULL, 0) < 0) {
                 printf("Can't figure out number of pools in kernel: %s\n",                  warn("can't figure out number of pools in kernel");
                         strerror(errno));  
                 return;                  return;
         }          }
   
Line 1134 
Line 1133 
                 if (sysctl(mib, 4, &pool, &size, NULL, 0) < 0) {                  if (sysctl(mib, 4, &pool, &size, NULL, 0) < 0) {
                         if (errno == ENOENT)                          if (errno == ENOENT)
                                 continue;                                  continue;
                         printf("error getting pool: %s\n", strerror(errno));                          warn("error getting pool");
                         return;                          return;
                 }                  }
                 npools--;                  npools--;
                 mib[2] = KERN_POOL_NAME;                  mib[2] = KERN_POOL_NAME;
                 size = sizeof(name);                  size = sizeof(name);
                 if (sysctl(mib, 4, &name, &size, NULL, 0) < 0) {                  if (sysctl(mib, 4, &name, &size, NULL, 0) < 0) {
                         printf("error getting pool name: %s\n",                          warn("error getting pool name");
                                 strerror(errno));  
                         return;                          return;
                 }                  }
                 print_pool(&pool, name);                  print_pool(&pool, name);

Legend:
Removed from v.1.91  
changed lines
  Added in v.1.92