Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Simplified asprintf.

Proto:char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap)

Type:char

Parameter:

TypeParameterName
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  If Not p Then Return 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  Return p
Caller
NameDescribe
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