MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / ofw_node_is_available

Function ofw_node_is_available

components/drivers/ofw/base.c:405–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403}
404
405static rt_bool_t ofw_node_is_available(const struct rt_ofw_node *np)
406{
407 rt_bool_t res = RT_TRUE;
408 const char *status = rt_ofw_prop_read_raw(np, "status", RT_NULL);
409
410 if (status)
411 {
412 res = !rt_strcmp(status, "okay") || !rt_strcmp(status, "ok");
413 }
414
415 return res;
416}
417
418rt_bool_t rt_ofw_node_is_available(const struct rt_ofw_node *np)
419{

Callers 2

rt_ofw_node_is_availableFunction · 0.85

Calls 2

rt_ofw_prop_read_rawFunction · 0.85
rt_strcmpFunction · 0.85

Tested by

no test coverage detected