o With -x switch do not pay attention at the hardcoded limit of 3 devices and dump stats for all devices in the system. User can still limit iostat -x by -n switch.
Spotted by: Igor Sysoev Submitted by: kensmith Approved by: re (kensmith) MFC after: 2 weeks
This commit is contained in:
parent
2174a10b9e
commit
dd9bccc479
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171709
@ -281,11 +281,17 @@ main(int argc, char **argv)
|
||||
Tflag = 1;
|
||||
}
|
||||
|
||||
/* find out how many devices we have */
|
||||
if ((num_devices = devstat_getnumdevs(kd)) < 0)
|
||||
err(1, "can't get number of devices");
|
||||
|
||||
/*
|
||||
* Figure out how many devices we should display.
|
||||
*/
|
||||
if (nflag == 0) {
|
||||
if (oflag > 0) {
|
||||
if (xflag > 0)
|
||||
maxshowdevs = num_devices;
|
||||
else if (oflag > 0) {
|
||||
if ((dflag > 0) && (Cflag == 0) && (Tflag == 0))
|
||||
maxshowdevs = 5;
|
||||
else if ((dflag > 0) && (Tflag > 0) && (Cflag == 0))
|
||||
@ -300,10 +306,6 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
/* find out how many devices we have */
|
||||
if ((num_devices = devstat_getnumdevs(kd)) < 0)
|
||||
err(1, "can't get number of devices");
|
||||
|
||||
cur.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo));
|
||||
if (cur.dinfo == NULL)
|
||||
err(1, "malloc failed");
|
||||
|
Loading…
Reference in New Issue
Block a user