mirror of
https://github.com/opnsense/src.git
synced 2026-06-16 20:19:27 -04:00
ofw: Fix inverted bcmp in ofw_bus_node_status_okay
Otherwise this matches any two-character status except for ok.
Fixes: e5e94d2de9 ("Expand OpenFirmware API with ofw_bus_node_status_okay method")
MFC after: 1 week
This commit is contained in:
parent
f25d7ff303
commit
e1060f6dfd
1 changed files with 1 additions and 1 deletions
|
|
@ -210,7 +210,7 @@ ofw_bus_node_status_okay(phandle_t node)
|
|||
|
||||
OF_getprop(node, "status", status, OFW_STATUS_LEN);
|
||||
if ((len == 5 && (bcmp(status, "okay", len) == 0)) ||
|
||||
(len == 3 && (bcmp(status, "ok", len))))
|
||||
(len == 3 && (bcmp(status, "ok", len) == 0)))
|
||||
return (1);
|
||||
|
||||
return (0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue