zmstat-io calls iostat with '-d -k' options.

iostat on our system doesn't support -k:
========================
[root@mail1 bproctor]# iostat -d -k
iostat: invalid option -- k
iostat v2.2, (C) 1999-2005 by Greg Franks, Zlatko Calusic, Rick Lindsley, Arnaud Desitter
Distributed under the terms of the GPL (see LICENSE file)
Usage: iostat [-cdDpPxh] [disks...] [interval [count]]
options:

c - print cpu usage info
d - print basic disk info
D - print disk utilization info
p - print partition info also
P - print partition info only
x - print extended disk info
h - this help
========================

Which causes this loop:
/opt/zimbra/libexec/zmstat-io

while ($line !~ /^avg-cpu/ && $line !~ /^Device:/) {
$line = readLine(*HEADING, 1);
}

To continually spam a line into:
/opt/zimbra/zmstat/zmstat.out
About:
"Use of uninitialized value in pattern match (m//) at /opt/zimbra/libexec/zmstat-io line 70."

Which caused our disk to fill up in fairly short order.


Questions:
What version of iostat is assumed?

Why doesn't the line read something like
while ($line && $line !~ /^avg-cpu/ && $line !~ /^Device:/) {
$line = readLine(*HEADING, 1);
}

to avoid the infinite loop?

This is all on CentOS 4.4.