Function report |
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 activity | Download SCCT | Chinese |
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:
| Type | Parameter | Name |
|---|---|---|
| char * | buf | |
| char * | end | |
| struct device_node * | dn | |
| struct printf_spec | spec | |
| const char * | fmt |
| 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, } |
| 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. |
| 1966 | fmt++ |
| 1972 | If pass Then |
| 1975 | buf++ |
| 1979 | Case fmt == 'f' |
| 1980 | buf = fwnode_full_name_string(of_fwnode_handle(dn), buf, end) |
| 1982 | Break |
| 1983 | Case fmt == 'n' |
| 1984 | p = fwnode_get_name(of_fwnode_handle(dn)) |
| 1985 | precision = # of digits/chars |
| 1988 | # of digits/chars = precision |
| 1989 | Break |
| 1990 | Case fmt == 'p' |
| 1993 | Case fmt == 'P' |
| 1994 | p = fwnode_get_name(of_fwnode_handle(dn)) |
| 1998 | Break |
| 1999 | Case fmt == 'F' |
| 2000 | tbuf[0] = If of_node_check_flag(dn, (and properties) allocated via kmalloc ) Then 'D' Else '-' |
| 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) |
| 2011 | Break |
| 2012 | Case fmt == 'C' |
| 2013 | has_mult = false |
| 2015 | If has_mult Then buf = Handle string from a well known address. |
| 2021 | has_mult = true |
| 2023 | Break |
| 2024 | Default |
| 2025 | Break |
| Name | Describe |
|---|---|
| pointer | Show 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 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |