Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:resource_string

Proto:static __attribute__((__noinline__)) char *resource_string(char *buf, char *end, struct resource *res, struct printf_spec spec, const char *fmt)

Type:char

Parameter:

TypeParameterName
char *buf
char *end
struct resource *res
struct printf_specspec
const char *fmt
1012  static const struct printf_spec io_spec = { number base, 8, 10 or 16 only = 16, width of output field = IO_RSRC_PRINTK_SIZE, # of digits/chars = - 1, flags to number() = prefix hex with "0x", octal with "0" | use lowercase in hex (must be 32 == 0x20) | pad with zero, must be 16 == '0' - ' ' , }
1018  static const struct printf_spec mem_spec = { number base, 8, 10 or 16 only = 16, width of output field = MEM_RSRC_PRINTK_SIZE, # of digits/chars = - 1, flags to number() = prefix hex with "0x", octal with "0" | use lowercase in hex (must be 32 == 0x20) | pad with zero, must be 16 == '0' - ' ' , }
1024  static const struct printf_spec bus_spec = { number base, 8, 10 or 16 only = 16, width of output field = 2, # of digits/chars = - 1, flags to number() = use lowercase in hex (must be 32 == 0x20) | pad with zero, must be 16 == '0' - ' ' , }
1030  static const struct printf_spec str_spec = { width of output field = - 1, # of digits/chars = 10, flags to number() = left justified , }
1045  p = sym , pend = sym + size of sym
1046  decode = If fmt[0] == 'R' Then 1 Else 0
1049  If check_pointer( & buf, end, res, spec) Then Return buf
1052  p++ = '['
1053  If flags & PCI/ISA I/O ports Then
1054  p = Handle string from a well known address.
1055  specp = io_spec
1056  Else if flags & IORESOURCE_MEM Then
1057  p = Handle string from a well known address.
1058  specp = mem_spec
1059  Else if flags & IORESOURCE_IRQ Then
1060  p = Handle string from a well known address.
1061  specp = default_dec_spec
1062  Else if flags & IORESOURCE_DMA Then
1063  p = Handle string from a well known address.
1064  specp = default_dec_spec
1065  Else if flags & IORESOURCE_BUS Then
1066  p = Handle string from a well known address.
1067  specp = bus_spec
1068  Else
1069  p = Handle string from a well known address.
1070  specp = mem_spec
1071  decode = 0
1073  If decode && flags & No address assigned yet Then
1074  p = Handle string from a well known address.
1075  p = number(p, pend, resource_size(res), * specp)
1076  Else
1077  p = number(p, pend, start, * specp)
1078  If start != end Then
1079  p++ = '-'
1080  p = number(p, pend, end, * specp)
1083  If decode Then
1084  If flags & IORESOURCE_MEM_64 Then p = Handle string from a well known address.
1086  If flags & No side effects Then p = Handle string from a well known address.
1088  If flags & rwarded by bridge Then p = Handle string from a well known address.
1090  If flags & IORESOURCE_DISABLED Then p = Handle string from a well known address.
1092  Else
1093  p = Handle string from a well known address.
1094  p = number(p, pend, flags, default_flag_spec)
1096  p++ = ']'
1097  p = '\0'
1099  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