• Home
  • Raw
  • Download

Lines Matching refs:fmt

843 		  const char *fmt)  in dentry_name()  argument
850 switch (fmt[1]) { in dentry_name()
852 depth = fmt[1] - '0'; in dentry_name()
892 struct printf_spec spec, const char *fmt) in file_dentry_name() argument
897 return dentry_name(buf, end, f->f_path.dentry, spec, fmt); in file_dentry_name()
902 struct printf_spec spec, const char *fmt) in bdev_name() argument
925 struct printf_spec spec, const char *fmt) in symbol_string() argument
932 if (fmt[1] == 'R') in symbol_string()
937 if (*fmt == 'B') in symbol_string()
939 else if (*fmt != 'f' && *fmt != 's') in symbol_string()
982 struct printf_spec spec, const char *fmt) in resource_string() argument
1025 int decode = (fmt[0] == 'R') ? 1 : 0; in resource_string()
1083 const char *fmt) in hex_string() argument
1096 switch (fmt[1]) { in hex_string()
1134 struct printf_spec spec, const char *fmt) in bitmap_string() argument
1178 struct printf_spec spec, const char *fmt) in bitmap_list_string() argument
1218 struct printf_spec spec, const char *fmt) in mac_address_string() argument
1229 switch (fmt[1]) { in mac_address_string()
1249 if (fmt[0] == 'M' && i != 5) in mac_address_string()
1258 char *ip4_string(char *p, const u8 *addr, const char *fmt) in ip4_string() argument
1261 bool leading_zeros = (fmt[0] == 'i'); in ip4_string()
1265 switch (fmt[2]) { in ip4_string()
1391 char *ip6_string(char *p, const char *addr, const char *fmt) in ip6_string() argument
1398 if (fmt[0] == 'I' && i != 7) in ip6_string()
1408 struct printf_spec spec, const char *fmt) in ip6_addr_string() argument
1412 if (fmt[0] == 'I' && fmt[2] == 'c') in ip6_addr_string()
1415 ip6_string(ip6_addr, addr, fmt); in ip6_addr_string()
1422 struct printf_spec spec, const char *fmt) in ip4_addr_string() argument
1426 ip4_string(ip4_addr, addr, fmt); in ip4_addr_string()
1433 struct printf_spec spec, const char *fmt) in ip6_addr_string_sa() argument
1441 char fmt6[2] = { fmt[0], '6' }; in ip6_addr_string_sa()
1444 fmt++; in ip6_addr_string_sa()
1445 while (isalpha(*++fmt)) { in ip6_addr_string_sa()
1446 switch (*fmt) { in ip6_addr_string_sa()
1495 struct printf_spec spec, const char *fmt) in ip4_addr_string_sa() argument
1501 char fmt4[3] = { fmt[0], '4', 0 }; in ip4_addr_string_sa()
1503 fmt++; in ip4_addr_string_sa()
1504 while (isalpha(*++fmt)) { in ip4_addr_string_sa()
1505 switch (*fmt) { in ip4_addr_string_sa()
1513 fmt4[2] = *fmt; in ip4_addr_string_sa()
1530 struct printf_spec spec, const char *fmt) in ip_addr_string() argument
1537 switch (fmt[1]) { in ip_addr_string()
1539 return ip6_addr_string(buf, end, ptr, spec, fmt); in ip_addr_string()
1541 return ip4_addr_string(buf, end, ptr, spec, fmt); in ip_addr_string()
1551 return ip4_addr_string_sa(buf, end, &sa->v4, spec, fmt); in ip_addr_string()
1553 return ip6_addr_string_sa(buf, end, &sa->v6, spec, fmt); in ip_addr_string()
1559 err_fmt_msg = fmt[0] == 'i' ? "(%pi?)" : "(%pI?)"; in ip_addr_string()
1565 const char *fmt) in escaped_string() argument
1579 switch (fmt[count++]) { in escaped_string()
1623 struct printf_spec spec, const char *fmt) in va_format() argument
1631 buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va); in va_format()
1639 struct printf_spec spec, const char *fmt) in uuid_string() argument
1650 switch (*(++fmt)) { in uuid_string()
1683 struct printf_spec spec, const char *fmt) in netdev_bits() argument
1691 switch (fmt[1]) { in netdev_bits()
1705 struct printf_spec spec, const char *fmt) in address_val() argument
1713 switch (fmt[1]) { in address_val()
1765 struct printf_spec spec, const char *fmt) in rtc_str() argument
1774 switch (fmt[count]) { in rtc_str()
1785 raw = fmt[count] == 'r'; in rtc_str()
1803 const char *fmt) in time_and_date() argument
1805 switch (fmt[1]) { in time_and_date()
1807 return rtc_str(buf, end, (const struct rtc_time *)ptr, spec, fmt); in time_and_date()
1815 const char *fmt) in clock() argument
1823 switch (fmt[1]) { in clock()
1863 struct printf_spec spec, const char *fmt) in flags_string() argument
1871 switch (fmt[1]) { in flags_string()
1924 struct printf_spec spec, const char *fmt) in device_node_string() argument
1949 fmt++; in device_node_string()
1950 if (fmt[0] == '\0' || strcspn(fmt,"fnpPFcC") > 0) in device_node_string()
1951 fmt = "f"; in device_node_string()
1953 for (pass = false; strspn(fmt,"fnpPFcC"); fmt++, pass = true) { in device_node_string()
1961 switch (*fmt) { in device_node_string()
2015 struct printf_spec spec, const char *fmt) in kobject_string() argument
2017 switch (fmt[1]) { in kobject_string()
2019 return device_node_string(buf, end, ptr, spec, fmt + 1); in kobject_string()
2138 char *pointer(const char *fmt, char *buf, char *end, void *ptr, in pointer() argument
2141 switch (*fmt) { in pointer()
2149 return symbol_string(buf, end, ptr, spec, fmt); in pointer()
2152 return resource_string(buf, end, ptr, spec, fmt); in pointer()
2154 return hex_string(buf, end, ptr, spec, fmt); in pointer()
2156 switch (fmt[1]) { in pointer()
2158 return bitmap_list_string(buf, end, ptr, spec, fmt); in pointer()
2160 return bitmap_string(buf, end, ptr, spec, fmt); in pointer()
2166 return mac_address_string(buf, end, ptr, spec, fmt); in pointer()
2176 return ip_addr_string(buf, end, ptr, spec, fmt); in pointer()
2178 return escaped_string(buf, end, ptr, spec, fmt); in pointer()
2180 return uuid_string(buf, end, ptr, spec, fmt); in pointer()
2182 return va_format(buf, end, ptr, spec, fmt); in pointer()
2186 return netdev_bits(buf, end, ptr, spec, fmt); in pointer()
2188 return address_val(buf, end, ptr, spec, fmt); in pointer()
2190 return dentry_name(buf, end, ptr, spec, fmt); in pointer()
2192 return time_and_date(buf, end, ptr, spec, fmt); in pointer()
2194 return clock(buf, end, ptr, spec, fmt); in pointer()
2196 return file_dentry_name(buf, end, ptr, spec, fmt); in pointer()
2199 return bdev_name(buf, end, ptr, spec, fmt); in pointer()
2203 return flags_string(buf, end, ptr, spec, fmt); in pointer()
2205 return kobject_string(buf, end, ptr, spec, fmt); in pointer()
2236 int format_decode(const char *fmt, struct printf_spec *spec) in format_decode() argument
2238 const char *start = fmt; in format_decode()
2263 for (; *fmt ; ++fmt) { in format_decode()
2264 if (*fmt == '%') in format_decode()
2269 if (fmt != start || !*fmt) in format_decode()
2270 return fmt - start; in format_decode()
2278 ++fmt; in format_decode()
2280 switch (*fmt) { in format_decode()
2296 if (isdigit(*fmt)) in format_decode()
2297 spec->field_width = skip_atoi(&fmt); in format_decode()
2298 else if (*fmt == '*') { in format_decode()
2301 return ++fmt - start; in format_decode()
2307 if (*fmt == '.') { in format_decode()
2308 ++fmt; in format_decode()
2309 if (isdigit(*fmt)) { in format_decode()
2310 spec->precision = skip_atoi(&fmt); in format_decode()
2313 } else if (*fmt == '*') { in format_decode()
2316 return ++fmt - start; in format_decode()
2323 if (*fmt == 'h' || _tolower(*fmt) == 'l' || in format_decode()
2324 *fmt == 'z' || *fmt == 't') { in format_decode()
2325 qualifier = *fmt++; in format_decode()
2326 if (unlikely(qualifier == *fmt)) { in format_decode()
2329 ++fmt; in format_decode()
2332 ++fmt; in format_decode()
2339 switch (*fmt) { in format_decode()
2342 return ++fmt - start; in format_decode()
2346 return ++fmt - start; in format_decode()
2350 return ++fmt - start; in format_decode()
2354 return ++fmt - start; in format_decode()
2384 WARN_ONCE(1, "Please remove unsupported %%%c in format string\n", *fmt); in format_decode()
2386 return fmt - start; in format_decode()
2409 return ++fmt - start; in format_decode()
2458 int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) in vsnprintf() argument
2478 while (*fmt) { in vsnprintf()
2479 const char *old_fmt = fmt; in vsnprintf()
2480 int read = format_decode(fmt, &spec); in vsnprintf()
2482 fmt += read; in vsnprintf()
2532 str = pointer(fmt, str, end, va_arg(args, void *), in vsnprintf()
2534 while (isalnum(*fmt)) in vsnprintf()
2535 fmt++; in vsnprintf()
2627 int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) in vscnprintf() argument
2631 i = vsnprintf(buf, size, fmt, args); in vscnprintf()
2655 int snprintf(char *buf, size_t size, const char *fmt, ...) in snprintf() argument
2660 va_start(args, fmt); in snprintf()
2661 i = vsnprintf(buf, size, fmt, args); in snprintf()
2679 int scnprintf(char *buf, size_t size, const char *fmt, ...) in scnprintf() argument
2684 va_start(args, fmt); in scnprintf()
2685 i = vscnprintf(buf, size, fmt, args); in scnprintf()
2706 int vsprintf(char *buf, const char *fmt, va_list args) in vsprintf() argument
2708 return vsnprintf(buf, INT_MAX, fmt, args); in vsprintf()
2724 int sprintf(char *buf, const char *fmt, ...) in sprintf() argument
2729 va_start(args, fmt); in sprintf()
2730 i = vsnprintf(buf, INT_MAX, fmt, args); in sprintf()
2761 int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args) in vbin_printf() argument
2794 while (*fmt) { in vbin_printf()
2795 int read = format_decode(fmt, &spec); in vbin_printf()
2797 fmt += read; in vbin_printf()
2810 if (*fmt == 'p') in vbin_printf()
2836 switch (*fmt) { in vbin_printf()
2847 if (!isalnum(*fmt)) { in vbin_printf()
2851 str = pointer(fmt, str, end, va_arg(args, void *), in vbin_printf()
2859 while (isalnum(*fmt)) in vbin_printf()
2860 fmt++; in vbin_printf()
2921 int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf) in bstr_printf() argument
2954 while (*fmt) { in bstr_printf()
2955 const char *old_fmt = fmt; in bstr_printf()
2956 int read = format_decode(fmt, &spec); in bstr_printf()
2958 fmt += read; in bstr_printf()
3013 switch (*fmt) { in bstr_printf()
3023 if (!isalnum(*fmt)) { in bstr_printf()
3038 str = pointer(fmt, str, end, get_arg(void *), spec); in bstr_printf()
3040 while (isalnum(*fmt)) in bstr_printf()
3041 fmt++; in bstr_printf()
3121 int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) in bprintf() argument
3126 va_start(args, fmt); in bprintf()
3127 ret = vbin_printf(bin_buf, size, fmt, args); in bprintf()
3142 int vsscanf(const char *buf, const char *fmt, va_list args) in vsscanf() argument
3157 while (*fmt) { in vsscanf()
3162 if (isspace(*fmt)) { in vsscanf()
3163 fmt = skip_spaces(++fmt); in vsscanf()
3168 if (*fmt != '%' && *fmt) { in vsscanf()
3169 if (*fmt++ != *str++) in vsscanf()
3174 if (!*fmt) in vsscanf()
3176 ++fmt; in vsscanf()
3181 if (*fmt == '*') { in vsscanf()
3184 while (!isspace(*fmt) && *fmt != '%' && *fmt) { in vsscanf()
3186 if (*fmt == '[') in vsscanf()
3188 fmt++; in vsscanf()
3197 if (isdigit(*fmt)) { in vsscanf()
3198 field_width = skip_atoi(&fmt); in vsscanf()
3205 if (*fmt == 'h' || _tolower(*fmt) == 'l' || in vsscanf()
3206 *fmt == 'z') { in vsscanf()
3207 qualifier = *fmt++; in vsscanf()
3208 if (unlikely(qualifier == *fmt)) { in vsscanf()
3211 fmt++; in vsscanf()
3214 fmt++; in vsscanf()
3219 if (!*fmt) in vsscanf()
3222 if (*fmt == 'n') { in vsscanf()
3225 ++fmt; in vsscanf()
3235 switch (*fmt++) { in vsscanf()
3282 bool negate = (*fmt == '^'); in vsscanf()
3289 ++fmt; in vsscanf()
3291 for ( ; *fmt && *fmt != ']'; ++fmt, ++len) in vsscanf()
3292 set_bit((u8)*fmt, set); in vsscanf()
3295 if (!*fmt || !len) in vsscanf()
3297 ++fmt; in vsscanf()
3429 int sscanf(const char *buf, const char *fmt, ...) in sscanf() argument
3434 va_start(args, fmt); in sscanf()
3435 i = vsscanf(buf, fmt, args); in sscanf()