systat drive list
Andy Farkas
andyf at speednet.com.au
Thu Nov 20 19:52:09 PST 2003
Low priority, but easy to accomplish:
Now that my eisa scsi disk controllers are working again, I'd like to
monitor the 8 drives attached with systat(1), except its broken.
Would someone like to commit this trivial patch? (see pr bin/59220)
> cd /usr/src/usr.bin/systat/
> ident devs.c
devs.c:
$FreeBSD: src/usr.bin/systat/devs.c,v 1.9 2003/10/20 20:13:50 phk Exp $
> diff -u devs.c-orig devs.c
--- devs.c-orig Fri Nov 21 13:23:33 2003
+++ devs.c Fri Nov 21 13:46:14 2003
@@ -280,12 +280,12 @@
;
if (*cp)
*cp++ = '\0';
- if (cp - args == 0)
+ if (cp - tmpstr1 == 0)
break;
for (i = 0; i < num_devices; i++) {
asprintf(&buffer, "%s%d",
dev_select[i].device_name,
dev_select[i].unit_number);
- if (strcmp(buffer, tmpstr1) == 0) {
+ if (strcmp(tmpstr1, buffer) == 0) {
num_devices_specified++;
@@ -303,8 +303,8 @@
free(buffer);
}
if (i >= num_devices)
- error("%s: unknown drive", args);
- args = cp;
+ error("%s: unknown drive", tmpstr1);
+ tmpstr1 = cp;
}
free(tmpstr);
--
:{ andyf at speednet.com.au
Andy Farkas
System Administrator
Speednet Communications
http://www.speednet.com.au/
More information about the freebsd-current
mailing list