Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:device_node_string

Proto:static __attribute__((__noinline__)) char *device_node_string(char *buf, char *end, struct device_node *dn, struct printf_spec spec, const char *fmt)

Type:char

Parameter:

TypeParameterName
char *buf
char *end
struct device_node *dn
struct printf_specspec
const char *fmt
1943  buf_start = buf
1946  static const struct printf_spec num_spec = { flags to number() = use lowercase in hex (must be 32 == 0x20) , width of output field = - 1, # of digits/chars = - 1, number base, 8, 10 or 16 only = 10, }
1953  str_spec = spec
1954  width of output field = -1
1956  If fmt[0] != 'F' Then Return Be careful: error messages must fit into the given buffer.
1959  If Not IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_OF) Then Return Be careful: error messages must fit into the given buffer.
1962  If check_pointer( & buf, end, dn, spec) Then Return buf
1966  fmt++
1967  If fmt[0] == '\0' || strcspn - Calculate the length of the initial substring of @s which does not contain letters in @reject*@s: The string to be searched*@reject: The string to avoid > 0 Then fmt = "f"
1970  When strspn - Calculate the length of the initial substring of @s which only contain letters in @accept*@s: The string to be searched*@accept: The string to search for cycle
1972  If pass Then
1973  If buf < end Then buf = ':'
1975  buf++
1979  Case fmt == 'f'
1983  Case fmt == 'n'
1990  Case fmt == 'p'
1991  buf = number(buf, end, (unsignedint)phandle, num_spec)
1992  Break
1993  Case fmt == 'P'
1995  If Not p[1] Then p = "/"
1997  buf = string(buf, end, p, str_spec)
1998  Break
1999  Case fmt == 'F'
2001  tbuf[1] = If of_node_check_flag(dn, detached from the device tree ) Then 'd' Else '-'
2002  tbuf[2] = If of_node_check_flag(dn, device already created ) Then 'P' Else '-'
2003  tbuf[3] = If of_node_check_flag(dn, platform bus created for children ) Then 'B' Else '-'
2004  tbuf[4] = 0
2006  Break
2007  Case fmt == 'c'
2008  ret = of_property_read_string(dn, "compatible", & p)
2009  If Not ret Then buf = string(buf, end, p, str_spec)
2011  Break
2012  Case fmt == 'C'
2023  Break
2024  Default
2025  Break
2029  Return Handle field width padding for a string.*@buf: current buffer position*@n: length of string*@end: end of output buffer*@spec: for field width and flags* Returns: new buffer position after padding.
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