[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.136 and 1.137

version 1.136, 2015/01/16 06:40:14 version 1.137, 2015/01/30 19:00:56
Line 136 
Line 136 
         while ((c = getopt(argc, argv, "c:fiM:mN:stw:vz")) != -1) {          while ((c = getopt(argc, argv, "c:fiM:mN:stw:vz")) != -1) {
                 switch (c) {                  switch (c) {
                 case 'c':                  case 'c':
                         reps = atoi(optarg);                          reps = strtonum(optarg, 0, INT_MAX, &errstr);
                           if (errstr)
                                   errx(1, "-c %s: %s", optarg, errstr);
                         break;                          break;
                 case 'f':                  case 'f':
                         todo |= FORKSTAT;                          todo |= FORKSTAT;
Line 222 
Line 224 
         if (*argv) {          if (*argv) {
                 interval = (u_int)strtonum(*argv, 0, 1000, &errstr);                  interval = (u_int)strtonum(*argv, 0, 1000, &errstr);
                 if (errstr)                  if (errstr)
                         errx(1, "%s: %s", *argv, errstr);                          errx(1, "interval %s: %s", *argv, errstr);
   
                 if (*++argv)                  if (*++argv) {
                         reps = atoi(*argv);                          reps = strtonum(*argv, 0, INT_MAX, &errstr);
                           if (errstr)
                                   errx(1, "reps %s: %s", *argv, errstr);
                   }
         }          }
 #endif  #endif
   
Line 276 
Line 281 
                         ++ndrives;                          ++ndrives;
                         break;                          break;
                 }                  }
                   if (i == dk_ndrive)
                           errx(1, "invalid interval or drive name: %s", *argv);
         }          }
         for (i = 0; i < dk_ndrive && ndrives < 2; i++) {          for (i = 0; i < dk_ndrive && ndrives < 2; i++) {
                 if (dk_select[i])                  if (dk_select[i])

Legend:
Removed from v.1.136  
changed lines
  Added in v.1.137