Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Nov 2003 13:52:05 +1000 (EST)
From:      Andy Farkas <andyf@speednet.com.au>
To:        freebsd-current@FreeBSD.ORG
Subject:   systat drive list
Message-ID:  <20031121132922.Y72194@hewey.af.speednet.com.au>

next in thread | raw e-mail | index | archive | help

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@speednet.com.au

        Andy Farkas
    System Administrator
   Speednet Communications
 http://www.speednet.com.au/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031121132922.Y72194>