Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:test_hexdump_prepare_test

Proto:static void __init test_hexdump_prepare_test(size_t len, int rowsize, int groupsize, char *test, size_t testlen, bool ascii)

Type:void

Parameter:

TypeParameterName
size_tlen
introwsize
intgroupsize
char *test
size_ttestlen
boolascii
73  l = len
74  gs = groupsize , rs = rowsize
76  is_be = IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_CPU_BIG_ENDIAN)
78  If rs != 16 && rs != 32 Then rs = 16
81  If l > rs Then l = rs
84  If Not s_power_of_2() - check if a value is a power of two*@n: the value to check* Determine whether some value is a power of two, where zero is* *not* considered a power of two.* Return: true if @n is a power of 2, otherwise false. || gs > 8 || len % gs != 0 Then gs = 1
87  If gs == 8 Then result = If is_be Then test_data_8_be Else test_data_8_le
89  Else if gs == 4 Then result = If is_be Then test_data_4_be Else test_data_4_le
91  Else if gs == 2 Then result = If is_be Then test_data_2_be Else test_data_2_le
93  Else result = test_data_1
97  p = test
98  When i < l / gs cycle
99  q = result++
100  amount = strlen(q)
102  No 3D Now!(p, q, amount)
103  p += amount
105  p++ = ' '
107  If i Then p--
111  If ascii Then
112  Do
113  p++ = ' '
114  When p < test + rs * 2 + rs / gs + 1 cycle
116  strncpy(p, data_a, l)
117  p += l
120  p = '\0'
Caller
NameDescribe
test_hexdump
test_hexdump_overflow