函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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>

函数原型:static char *link_target(const char *dir, const char *path, const char *ext)

返回类型:char

参数:

类型参数名称
const char *dir
const char *path
const char *ext
309  copy等于kstrdup(path, GFP_KERNEL)
310  如果非copy则返回: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  如果old_extold_ext等于'\0'
315  如果dirtarget等于kasprintf(GFP_KERNEL, "%s/%s.%s", dir, copy, ext)
317  否则target等于kasprintf(GFP_KERNEL, "%s.%s", copy, ext)
319  kfree(copy)
321  返回:target
调用者
名称描述
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