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:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:fdt_add_property_

Proto:static int fdt_add_property_(void *fdt, int nodeoffset, const char *name, int len, struct fdt_property **prop)

Type:int

Parameter:

TypeParameterName
void *fdt
intnodeoffset
const char *name
intlen
struct fdt_property **prop
197  If (nextoffset = fdt_check_node_offset_(fdt, nodeoffset)) < 0 Then Return nextoffset
200  namestroff = fdt_find_add_string_(fdt, name, & allocated)
201  If namestroff < 0 Then Return namestroff
204  prop = fdt_offset_ptr_w_(fdt, nextoffset)
205  proplen = size of prop + FDT_TAGALIGN(len)
207  err = fdt_splice_struct_(fdt, * prop, 0, proplen)
208  If err Then
209  If allocated Then Must only be used to roll back in case of error
211  Return err
214  tag = cpu_to_fdt32(Property: name off,size, content )
215  nameoff = cpu_to_fdt32(namestroff)
216  len = cpu_to_fdt32(len)
217  Return 0