Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/raidctl In the previous (and some earlier) version(s) o...



details:   https://anonhg.NetBSD.org/src/rev/7c310cf5ccf2
branches:  trunk
changeset: 366778:7c310cf5ccf2
user:      kre <kre%NetBSD.org@localhost>
date:      Tue Jun 14 08:06:07 2022 +0000

description:
In the previous (and some earlier) version(s) of raidctl.c
the following comment appeared:

        /*
         * After NetBSD 9, convert this to not output the numRow's value,
         * which is no longer required or ever used.
         */

We are after NetBSD 9 (well after).   The change requested in that
comment is made here, and the comment is thus removed.

A couple of places in rf_configure.c where a value for the "rows"
parameter was output in an error message (always simply as the
constant 0) have also been updated (those messages will no longer
include "row 0", which they always said previously).   One of them
was also slightly reworded to be clearer what problem it was
experiencing (when it said 'unable to get device file' it meant
it was unable to locate the name for the device in the config file,
not that it was found, and there was some other problem with it).

diffstat:

 sbin/raidctl/raidctl.c      |  13 ++++---------
 sbin/raidctl/rf_configure.c |  12 ++++++------
 2 files changed, 10 insertions(+), 15 deletions(-)

diffs (75 lines):

diff -r c5f27a54540d -r 7c310cf5ccf2 sbin/raidctl/raidctl.c
--- a/sbin/raidctl/raidctl.c    Tue Jun 14 08:06:01 2022 +0000
+++ b/sbin/raidctl/raidctl.c    Tue Jun 14 08:06:07 2022 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: raidctl.c,v 1.76 2022/06/14 08:06:01 kre Exp $   */
+/*      $NetBSD: raidctl.c,v 1.77 2022/06/14 08:06:07 kre Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: raidctl.c,v 1.76 2022/06/14 08:06:01 kre Exp $");
+__RCSID("$NetBSD: raidctl.c,v 1.77 2022/06/14 08:06:07 kre Exp $");
 #endif
 
 
@@ -637,14 +637,9 @@
        nspares = MIN(device_config.nspares,
                        __arraycount(device_config.spares));
        
-       /*
-        * After NetBSD 9, convert this to not output the numRow's value,
-        * which is no longer required or ever used.
-        */
        printf("START array\n");
-       printf("# numRow numCol numSpare\n");
-       printf("%d %d %d\n", 1, device_config.cols,
-           device_config.nspares);
+       printf("# numCol numSpare\n");
+       printf("%d %d\n", device_config.cols, device_config.nspares);
        printf("\n");
 
        printf("START disks\n");
diff -r c5f27a54540d -r 7c310cf5ccf2 sbin/raidctl/rf_configure.c
--- a/sbin/raidctl/rf_configure.c       Tue Jun 14 08:06:01 2022 +0000
+++ b/sbin/raidctl/rf_configure.c       Tue Jun 14 08:06:07 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_configure.c,v 1.34 2020/09/06 05:31:46 mrg Exp $ */
+/*     $NetBSD: rf_configure.c,v 1.35 2022/06/14 08:06:07 kre Exp $ */
 
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
@@ -49,7 +49,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: rf_configure.c,v 1.34 2020/09/06 05:31:46 mrg Exp $");
+__RCSID("$NetBSD: rf_configure.c,v 1.35 2022/06/14 08:06:07 kre Exp $");
 #endif
 
 
@@ -250,8 +250,8 @@
 
                if (rf_get_next_nonblank_line(
                    buf, sizeof(buf), fp, NULL)) {
-                       warnx("Config file error: unable to get device "
-                           "file for disk at row %d col %d", 0, c);
+                       warnx("Config file error: unable to find device "
+                           "file name for disk at col %d", c);
                        retcode = -1;
                        goto out;
                }
@@ -259,8 +259,8 @@
                b = getfsspecname(b1, sizeof(b1), buf);
                if (b == NULL) {
                        warnx("Config file error: warning: unable to "
-                           "get device file for disk at row %d col "
-                           "%d: %s", 0, c, b1);
+                           "get device file for disk at col %d: %s",
+                           c, b1);
                        b = buf;
                }
 



Home | Main Index | Thread Index | Old Index