函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:la_strdup - Copy string attribute payload into a newly allocated buffer*@nla: attribute to copy the string from*@flags: the type of memory to allocate (see kmalloc).* Returns a pointer to the allocated buffer or NULL on error.

函数原型:char *nla_strdup(const struct nlattr *nla, gfp_t flags)

返回类型:char

参数:

类型参数名称
const struct nlattr *nla
gfp_tflags
544  srclen等于有效载荷的长度
545  src等于有效载荷的头部
547  如果srclen大于0且src[srclen - 1]恒等于'\0'则srclen自减
550  dst等于kmalloc(srclen + 1, flags)
551  如果(dst != NULL)则
552  内存复制(dst, src, srclen)
553  dst[srclen]等于'\0'
555  返回:dst