Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/oea when looking for SCSI disks in canonica...



details:   https://anonhg.NetBSD.org/src/rev/8ee34c931f47
branches:  trunk
changeset: 326798:8ee34c931f47
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Feb 18 12:27:15 2014 +0000

description:
when looking for SCSI disks in canonicalize_bootpath() also match 'disk@'
since that's what at least some Adaptec firmware uses

diffstat:

 sys/arch/powerpc/oea/ofw_autoconf.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r ea72c3590742 -r 8ee34c931f47 sys/arch/powerpc/oea/ofw_autoconf.c
--- a/sys/arch/powerpc/oea/ofw_autoconf.c       Tue Feb 18 12:23:07 2014 +0000
+++ b/sys/arch/powerpc/oea/ofw_autoconf.c       Tue Feb 18 12:27:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_autoconf.c,v 1.19 2013/05/12 13:23:08 macallan Exp $ */
+/* $NetBSD: ofw_autoconf.c,v 1.20 2014/02/18 12:27:15 macallan Exp $ */
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
  * Copyright (C) 1995, 1996 TooLs GmbH.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.19 2013/05/12 13:23:08 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.20 2014/02/18 12:27:15 macallan Exp $");
 
 #ifdef ofppc
 #include "gtpci.h"
@@ -168,12 +168,15 @@
        /*
         * OF_1.x (at least) always returns addr == 0 for
         * SCSI disks (i.e. "/bandit@.../.../sd@0,0").
+        * also check for .../disk@ which some Adaptec firmware uses
         */
        lastp = strrchr(cbootpath, '/');
        if (lastp != NULL) {
                lastp++;
-               if (strncmp(lastp, "sd@", 3) == 0
-                   && strncmp(last, "sd@", 3) == 0)
+               if ((strncmp(lastp, "sd@", 3) == 0
+                    && strncmp(last, "sd@", 3) == 0) ||
+                   (strncmp(lastp, "disk@", 5) == 0
+                    && strncmp(last, "disk@", 5) == 0))
                        strcpy(lastp, last);
        } else {
                lastp = cbootpath;



Home | Main Index | Thread Index | Old Index