Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\nlattr.c Create Date:2022-07-28 07:16:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:la_strlcpy - Copy string attribute payload into a sized buffer*@dst: where to copy the string to*@nla: attribute to copy the string from*@dstsize: size of destination buffer* Copies at most dstsize - 1 bytes into the destination buffer.

Proto:size_t nla_strlcpy(char *dst, const struct nlattr *nla, size_t dstsize)

Type:size_t

Parameter:

TypeParameterName
char *dst
const struct nlattr *nla
size_tdstsize
518  srclen = la_len - length of payload*@nla: netlink attribute
519  src = la_data - head of payload*@nla: netlink attribute
521  If srclen > 0 && src[srclen - 1] == '\0' Then srclen--
524  If dstsize > 0 Then
525  len = If srclen >= dstsize Then dstsize - 1 Else srclen
527  memset(dst, 0, dstsize)
528  No 3D Now!(dst, src, len)
531  Return srclen