Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\vsprintf.c Create Date:2022-07-28 06:12:09
Last Modify:2022-05-21 09:47:42 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:hex_string

Proto:static __attribute__((__noinline__)) char *hex_string(char *buf, char *end, u8 *addr, struct printf_spec spec, const char *fmt)

Type:char

Parameter:

TypeParameterName
char *buf
char *end
u8 *addr
struct printf_specspec
const char *fmt
1107  len = 1
1110  If width of output field == 0 Then Return buf
1114  If check_pointer( & buf, end, addr, spec) Then Return buf
1118  Case fmt[1] == 'C'
1119  separator = ':'
1120  Break
1121  Case fmt[1] == 'D'
1122  separator = '-'
1123  Break
1124  Case fmt[1] == 'N'
1125  separator = 0
1126  Break
1127  Default
1128  separator = ' '
1129  Break
1132  If width of output field > 0 Then len = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(int, width of output field , 64)
1135  When i < len cycle
1136  If buf < end Then buf = hex_asc_hi(addr[i])
1138  ++buf
1139  If buf < end Then buf = hex_asc_lo(addr[i])
1141  ++buf
1143  If separator && i != len - 1 Then
1144  If buf < end Then buf = separator
1146  ++buf
1150  Return buf
Caller
NameDescribe
pointerShow a '%p' thing. A kernel extension is that the '%p' is followed* by an extra set of alphanumeric characters that are extended format* specifiers.* Please update scripts/checkpatch.pl when adding/removing conversion* characters