mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
when you try to run iostat is fails with invalid dk_ndrive 0
Reviewed by: phk Submitted by: John-Mark Gurney <jmg@nike.efn.org>
This commit is contained in:
parent
46a414ffbb
commit
d469fb7bda
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19472
@ -184,7 +184,7 @@ main(argc, argv)
|
||||
if (namelist[X_DK_NDRIVE].n_type == 0)
|
||||
errx(1, "dk_ndrive not found in namelist");
|
||||
(void)nlread(X_DK_NDRIVE, dk_ndrive);
|
||||
if (dk_ndrive <= 0)
|
||||
if (dk_ndrive < 0)
|
||||
errx(1, "invalid dk_ndrive %d\n", dk_ndrive);
|
||||
|
||||
cur.dk_time = calloc(dk_ndrive, sizeof(long));
|
||||
|
Loading…
Reference in New Issue
Block a user