Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mac_address_string

Proto:static __attribute__((__noinline__)) char *mac_address_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
1242  p = mac_addr
1245  bool reversed = false
1247  If check_pointer( & buf, end, addr, spec) Then Return buf
1251  Case fmt[1] == 'F'
1252  separator = '-'
1253  Break
1255  Case fmt[1] == 'R'
1256  reversed = true
1259  Default
1260  separator = ':'
1261  Break
1264  When i < 6 cycle
1265  If reversed Then p = hex_byte_pack(p, addr[5 - i])
1267  Else p = hex_byte_pack(p, addr[i])
1270  If fmt[0] == 'M' && i != 5 Then p++ = separator
1273  p = '\0'
1275  Return Handle string from a well known address.
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