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

Function ofw_node_is_fail

components/drivers/ofw/base.c:392–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390 */
391
392static rt_bool_t ofw_node_is_fail(const struct rt_ofw_node *np)
393{
394 rt_bool_t res = RT_FALSE;
395 const char *status = rt_ofw_prop_read_raw(np, "status", RT_NULL);
396
397 if (status)
398 {
399 res = !rt_strcmp(status, "fail") || !rt_strncmp(status, "fail-", 5);
400 }
401
402 return res;
403}
404
405static rt_bool_t ofw_node_is_available(const struct rt_ofw_node *np)
406{

Callers 1

rt_ofw_get_next_cpu_nodeFunction · 0.85

Calls 3

rt_ofw_prop_read_rawFunction · 0.85
rt_strcmpFunction · 0.85
rt_strncmpFunction · 0.85

Tested by

no test coverage detected