when looking for SCSI disks in canonicalize_bootpath() also match 'disk@'
since that's what at least some Adaptec firmware uses
This commit is contained in:
parent
7925d62af9
commit
a5d06cef1b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user