Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\apparmor\apparmorfs.c Create Date:2022-07-28 19:50:03
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:gen_symlink_name

Proto:static char *gen_symlink_name(int depth, const char *dirname, const char *fname)

Type:char

Parameter:

TypeParameterName
intdepth
const char *dirname
const char *fname
1608  size = depth * 6 + strlen - Find the length of a string*@s: The string to be sized + strlen - Find the length of a string*@s: The string to be sized + 11
1610  s = buffer = Allocation memory
1611  If Not buffer Then Return ERR_PTR( - ENOMEM)
1614  When depth > 0 cycle
1615  strcpy(s, "../../")
1616  s += 6
1617  size -= 6
1620  error = snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
1621  If error >= size || error < 0 Then
1622  kfree(buffer)
1623  Return ERR_PTR( - ENAMETOOLONG)
1626  Return buffer
Caller
NameDescribe
rawdata_get_link_base