函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:fdt_get_path

函数原型:int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen)

返回类型:int

参数:

类型参数名称
const void *fdt
intnodeoffset
char *buf
intbuflen
522  pdepth等于0, p等于0
528  如果buflen小于2则返回:负FDT_ERR_EXISTS: Attempted to create a node or property which* already exists
531 offset大于等于0且offset小于等于nodeoffset循环
534 pdepth大于depth循环
535  循环
536  p自减
537 buf[p - 1]不等于'/'循环
538  pdepth自减
541  如果pdepth大于等于depth
542  name等于fdt_get_name(fdt, offset, & namelen)
543  如果非name则返回:namelen
545  如果pnamelen加1小于等于buflen
547  p加等于namelen
548  buf[p++]等于'/'
549  pdepth自加
553  如果offset恒等于nodeoffset
557  如果p大于1则p自减
559  buf[p]等于'\0'
560  返回:0
564  如果offset恒等于负Error codes: informative error codes offset大于等于0则返回:负Error codes: codes for bad parameters
566  否则如果offset恒等于负Error codes: codes for bad parameters 则返回:负FDT_ERR_BADVERSION: Given device tree has a version which* can't be handled by the requested operation. For* read-write functions, this may mean that fdt_open_into() is* required to convert the tree to the expected version.
569  返回:offset