norflash: do not accept any device as a valid 'norflash'
Seems the original code was a little *too* simple ;-)
This commit is contained in:
committed by
Rene Gollent
parent
ba06f07660
commit
102ce4652a
@@ -165,8 +165,16 @@ nor_write(void *_cookie, off_t position, const void *data, size_t *numbytes)
|
|||||||
static float
|
static float
|
||||||
nor_supports_device(device_node *parent)
|
nor_supports_device(device_node *parent)
|
||||||
{
|
{
|
||||||
|
const char *bus;
|
||||||
TRACE("supports_device\n");
|
TRACE("supports_device\n");
|
||||||
return 0.6;
|
|
||||||
|
if (sDeviceManager->get_attr_string(parent, B_DEVICE_BUS, &bus, false))
|
||||||
|
return B_ERROR;
|
||||||
|
|
||||||
|
if (strcmp(bus, "generic"))
|
||||||
|
return 0.0;
|
||||||
|
|
||||||
|
return 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user