mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-22 16:44:32 +01:00
"nvram,flash" may not be the first in the compatible list property of the
nvram ofw node, so check all strings in the list. Approved by: nwhitehorn (mentor) MFC after: 3 days
This commit is contained in:
parent
801ff3b853
commit
c1d93092fd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=235678
@ -36,6 +36,7 @@
|
||||
|
||||
#include <dev/ofw/openfirm.h>
|
||||
#include <dev/ofw/ofw_bus.h>
|
||||
#include <dev/ofw/ofw_bus_subr.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/md_var.h>
|
||||
@ -118,7 +119,7 @@ powermac_nvram_probe(device_t dev)
|
||||
if (strcmp(type, "nvram") != 0)
|
||||
return ENXIO;
|
||||
if (strcmp(compatible, "amd-0137") != 0 &&
|
||||
strcmp(compatible, "nvram,flash") != 0)
|
||||
!ofw_bus_is_compatible(dev, "nvram,flash"))
|
||||
return ENXIO;
|
||||
|
||||
device_set_desc(dev, "Apple NVRAM");
|
||||
|
Loading…
Reference in New Issue
Block a user