systat drive list

From: Andy Farkas <andyf_at_speednet.com.au>
Date: Fri, 21 Nov 2003 13:52:05 +1000 (EST)
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
_at__at_ -280,12 +280,12 _at__at_
                        ;
                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++;

_at__at_ -303,8 +303,8 _at__at_
                                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/
Received on Thu Nov 20 2003 - 18:52:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:30 UTC