Module Name: src
Committed By: macallan
Date: Tue Feb 18 12:27:15 UTC 2014
Modified Files:
src/sys/arch/powerpc/oea: ofw_autoconf.c
Log Message:
when looking for SCSI disks in canonicalize_bootpath() also match 'disk@'
since that's what at least some Adaptec firmware uses
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/powerpc/oea/ofw_autoconf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/powerpc/oea/ofw_autoconf.c
diff -u src/sys/arch/powerpc/oea/ofw_autoconf.c:1.19 src/sys/arch/powerpc/oea/ofw_autoconf.c:1.20
--- src/sys/arch/powerpc/oea/ofw_autoconf.c:1.19 Sun May 12 13:23:08 2013
+++ src/sys/arch/powerpc/oea/ofw_autoconf.c Tue Feb 18 12:27:15 2014
@@ -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 @@ canonicalize_bootpath(void)
/*
* 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;