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:
Poul-Henning Kamp 1996-11-06 19:43:10 +00:00
parent 46a414ffbb
commit d469fb7bda

View File

@ -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));