Skip to main content

fdt_node_check_compatible

Function fdt_node_check_compatible 

Source
pub unsafe extern "C" fn fdt_node_check_compatible(
    fdt: *const c_void,
    nodeoffset: c_int,
    compatible: *const c_char,
) -> c_int
Expand description

fdt_node_check_compatible - check a node’s compatible property @fdt: pointer to the device tree blob @nodeoffset: offset of a tree node @compatible: string to match against

fdt_node_check_compatible() returns 0 if the given node contains a @compatible property with the given string as one of its elements, it returns non-zero otherwise, or on error.

returns: 0, if the node has a ‘compatible’ property listing the given string 1, if the node has a ‘compatible’ property, but it does not list the given string -FDT_ERR_NOTFOUND, if the given node has no ‘compatible’ property -FDT_ERR_BADOFFSET, if nodeoffset does not refer to a BEGIN_NODE tag -FDT_ERR_BADMAGIC, -FDT_ERR_BADVERSION, -FDT_ERR_BADSTATE, -FDT_ERR_BADSTRUCTURE, standard meanings