Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\gcov\fs.c Create Date:2022-07-28 11:31:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Given a string <path> representing a file path of format:* path/to/file.gcda* construct and return a new string:* <dir/>path/to/file.<ext>

Proto:static char *link_target(const char *dir, const char *path, const char *ext)

Type:char

Parameter:

TypeParameterName
const char *dir
const char *path
const char *ext
309  copy = kstrdup(path, GFP_KERNEL)
310  If Not copy Then Return NULL
312  old_ext = strrchr - Find the last occurrence of a character in a string*@s: The string to be searched*@c: The character to search for
313  If old_ext Then old_ext = '\0'
315  If dir Then target = kasprintf(GFP_KERNEL, "%s/%s.%s", dir, copy, ext)
317  Else target = kasprintf(GFP_KERNEL, "%s.%s", copy, ext)
319  kfree(copy)
321  Return target
Caller
NameDescribe
get_link_targetConstruct a string representing the symbolic link target for the given* gcov data file name and link type. Depending on the link type and the* location of the data file, the link target can either point to a