Skip to main content

fdt_appendprop_addrrange

Function fdt_appendprop_addrrange 

Source
pub unsafe extern "C" fn fdt_appendprop_addrrange(
    fdt: *mut c_void,
    parent: c_int,
    nodeoffset: c_int,
    name: *const c_char,
    addr: u64,
    size: u64,
) -> c_int
Expand description

fdt_appendprop_addrrange - append a address range property @fdt: pointer to the device tree blob @parent: offset of the parent node @nodeoffset: offset of the node to add a property at @name: name of property @addr: start address of a given range @size: size of a given range

fdt_appendprop_addrrange() appends an address range value (start address and size) to the value of the named property in the given node, or creates a new property with that value if it does not already exist.

Cell sizes are determined by parent’s #address-cells and #size-cells.

This function may insert data into the blob, and will therefore change the offsets of some existing nodes.

returns: 0, on success -FDT_ERR_BADLAYOUT, -FDT_ERR_BADMAGIC, -FDT_ERR_BADNCELLS, if the node has a badly formatted or invalid #address-cells property -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag -FDT_ERR_BADSTATE, -FDT_ERR_BADSTRUCTURE, -FDT_ERR_BADVERSION, -FDT_ERR_BADVALUE, addr or size doesn’t fit to respective cells size -FDT_ERR_NOSPACE, there is insufficient free space in the blob to contain a new property -FDT_ERR_TRUNCATED, standard meanings