iPXE
|
Go to the source code of this file.
Data Structures | |
struct | printf_context |
A printf context. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
size_t | vcprintf (struct printf_context *ctx, const char *fmt, va_list args) |
Write a formatted string to a printf context. More... | |
int | vssnprintf (char *buf, ssize_t ssize, const char *fmt, va_list args) |
Version of vsnprintf() that accepts a signed buffer size. More... | |
int | __attribute__ ((format(printf, 3, 4))) ssnprintf(char *buf |
Variables | |
int ssize_t | ssize |
int ssize_t const char * | fmt |
printf() and friends
Etherboot's printf() functions understand the following subset of the standard C printf()'s format specifiers:
- Flag characters - '#' - Alternate form (i.e. "0x" prefix) - '0' - Zero-pad - Field widths - Length modifiers - 'hh' - Signed / unsigned char - 'h' - Signed / unsigned short - 'l' - Signed / unsigned long - 'll' - Signed / unsigned long long - 'z' - Signed / unsigned size_t - Conversion specifiers - 'd' - Signed decimal - 'x','X' - Unsigned hexadecimal - 'c' - Character - 's' - String - 'p' - Pointer
Hexadecimal numbers are always zero-padded to the specified field width (if any); decimal numbers are always space-padded. Decimal long longs are not supported.
Definition in file vsprintf.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
size_t vcprintf | ( | struct printf_context * | ctx, |
const char * | fmt, | ||
va_list | args | ||
) |
Write a formatted string to a printf context.
ctx | Context |
fmt | Format string |
args | Arguments corresponding to the format string |
len | Length of formatted string |
Definition at line 187 of file vsprintf.c.
References ALT_FORM, cputchar(), ctx, flags, fmt, format_decimal(), format_hex(), hex, INT_LEN, LCASE, len, length, LONG_LEN, NULL, SIZE_T_LEN, type_sizes, va_arg, wc, and ZPAD.
Referenced by efi_vsnprintf(), vprintf(), vsnprintf(), and vw_printw().
Version of vsnprintf() that accepts a signed buffer size.
buf | Buffer into which to write the string |
size | Size of buffer |
fmt | Format string |
args | Arguments corresponding to the format string |
len | Length of formatted string |
Definition at line 401 of file vsprintf.c.
References sputc_context::buf, fmt, ssize, and vsnprintf().
Referenced by ssnprintf().
int __attribute__ | ( | (format(printf, 3, 4)) | ) |
int ssize_t ssize |
Definition at line 72 of file vsprintf.h.
Referenced by ssnprintf(), and vssnprintf().
int int size_t const char int const char * fmt |
Definition at line 72 of file vsprintf.h.
Referenced by alert(), asprintf(), dbg_printf(), efi_asprintf(), efi_ifr_string(), efi_snprintf(), efi_ssnprintf(), efi_vasprintf(), efi_vsnprintf(), efi_vsprintf(), efi_vssnprintf(), ipair_tx(), log_printf(), log_vprintf(), msg(), printf(), slk_init(), slk_set(), snprintf(), snprintf_okx(), ssnprintf(), valert(), vasprintf(), vcprintf(), vmsg(), vprintf(), vsnprintf(), vssnprintf(), vw_printw(), vwprintw(), and wprintw().