Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:scripts\dtc\libfdt\fdt_ro.c Create Date:2022-07-28 06:18:26
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:fdt_path_offset_namelen

Proto:int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen)

Type:int

Parameter:

TypeParameterName
const void *fdt
const char *path
intnamelen
237  end = path + namelen
238  p = path
239  offset = 0
244  If path != '/' Then
245  q = memchr(path, '/', end - p)
247  If Not q Then q = end
250  p = fdt_get_alias_namelen(fdt, p, q - p)
251  If Not p Then Return -FDT_ERR_BADOFFSET: Function was passed a structure block* offset which is out-of-bounds, or which points to an* unsuitable part of the structure for the operation.
253  offset = fdt_path_offset(fdt, p)
255  p = q
258  When p < end cycle
261  When p == '/' cycle
262  p++
263  If p == end Then Return offset
266  q = memchr(p, '/', end - p)
267  If Not q Then q = end
270  offset = fdt_subnode_offset_namelen(fdt, offset, p, q - p)
271  If offset < 0 Then Return offset
274  p = q
277  Return offset