Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:fdt_add_subnode_namelen

Proto:int fdt_add_subnode_namelen(void *fdt, int parentoffset, const char *name, int namelen)

Type:int

Parameter:

TypeParameterName
void *fdt
intparentoffset
const char *name
intnamelen
330  offset = fdt_subnode_offset_namelen(fdt, parentoffset, name, namelen)
331  If offset >= 0 Then Return -FDT_ERR_NOTFOUND: The requested node or property does not exist
333  Else if offset != -Error codes: informative error codes Then Return offset
337  fdt_next_tag(fdt, parentoffset, & nextoffset)
338  Do
339  offset = nextoffset
340  tag = fdt_next_tag(fdt, offset, & nextoffset)
341  When tag == Property: name off,size, content || tag == p cycle
343  nh = fdt_offset_ptr_w_(fdt, offset)
344  nodelen = size of nh + FDT_TAGALIGN(namelen + 1) + FDT_TAGSIZE
346  err = fdt_splice_struct_(fdt, nh, 0, nodelen)
347  If err Then Return err
350  tag = cpu_to_fdt32(Start node: full name )
351  memset(name, 0, FDT_TAGALIGN(namelen + 1))
352  No 3D Now!(name, name, namelen)
353  endtag = nh + nodelen - FDT_TAGSIZE
354  endtag = cpu_to_fdt32(End node )
356  Return offset