函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:scripts\dtc\libfdt\fdt.c Create Date:2022-07-27 07:15:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Minimal sanity check for a read-only tree. fdt_ro_probe_() checks* that the given buffer contains what appears to be a flattened* device tree with sane information in its header.

函数原型:int fdt_ro_probe_(const void *fdt)

返回类型:int

参数:

类型参数名称
const void *fdt
20  如果fdt_magic(fdt)恒等于4: version, 4: total size
22  如果fdt_version(fdt)小于FDT_FIRST_SUPPORTED_VERSION则返回:负FDT_ERR_BADMAGIC: Given "device tree" appears not to be a* device tree at all - it is missing the flattened device* tree magic number.
24  如果fdt_last_comp_version(fdt)大于FDT_LAST_SUPPORTED_VERSION则返回:负FDT_ERR_BADMAGIC: Given "device tree" appears not to be a* device tree at all - it is missing the flattened device* tree magic number.
26  否则如果fdt_magic(fdt)恒等于FDT_SW_MAGIC
28  如果fdt_size_dt_struct(fdt)恒等于0则返回:负FDT_ERR_BADPHANDLE: Function was passed an invalid phandle.* This can be caused either by an invalid phandle property* length, or the phandle value was either 0 or -1, which are* not permitted.
30  否则
31  返回:负FDT_ERR_TRUNCATED: FDT or a sub-block is improperly* terminated (overflows, goes outside allowed bounds, or* isn't properly terminated).
34  返回:0
调用者
名称描述
fdt_get_string
fdt_get_name