函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Simplified asprintf.

函数原型:char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap)

返回类型:char

参数:

类型参数名称
gfp_tgfp
const char *fmt
va_listap
21  va_copy(aq, ap)
22  first等于vsnprintf - 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*@args: Arguments for the format string* This function generally
23  va_end(aq)
25  p等于kmalloc_track_caller(first + 1, gfp)
26  如果非p则返回:NULL
29  second等于vsnprintf - 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*@args: Arguments for the format string* This function generally
30  WARN(first != second, "different return values (%u and %u) from vsnprintf(\"%s\", ...)", first, second, fmt)
33  返回:p
调用者
名称描述
kvasprintf_constIf fmt contains no % (or is exactly %s), use kstrdup_const. If fmt* (or the sole vararg) points to rodata, we will then save a memory* allocation and string copy. In any case, the return value should be* freed using kfree_const().
kasprintf
__test
logfclogfc - Log a message to a filesystem context*@fc: The filesystem context to log to.*@fmt: The format of the buffer.