version 1.136, 2015/01/16 06:40:14 |
version 1.137, 2015/01/30 19:00:56 |
|
|
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; |
|
|
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 |
|
|
|
|
++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]) |