iPXE
|
EFI strings. More...
Go to the source code of this file.
Macros | |
#define | efi_sprintf(buf, fmt, ...) efi_snprintf ( (buf), ~( ( size_t ) 0 ), (fmt), ## __VA_ARGS__ ) |
Write a formatted string to a buffer. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
int | efi_vsnprintf (wchar_t *wbuf, size_t wsize, const char *fmt, va_list args) |
Write a formatted string to a wide-character buffer. More... | |
int | efi_snprintf (wchar_t *wbuf, size_t wsize, const char *fmt,...) |
Write a formatted string to a buffer. More... | |
int | efi_vssnprintf (wchar_t *wbuf, ssize_t swsize, const char *fmt, va_list args) |
Version of efi_vsnprintf() that accepts a signed buffer size. More... | |
int | efi_ssnprintf (wchar_t *wbuf, ssize_t swsize, const char *fmt,...) |
Version of efi_vsnprintf() that accepts a signed buffer size. More... | |
int | efi_vasprintf (wchar_t **strp, const char *fmt, va_list args) |
Write a formatted string to newly allocated memory. More... | |
int | efi_asprintf (wchar_t **strp, const char *fmt,...) |
Write a formatted string to newly allocated memory. More... | |
static int | efi_vsprintf (wchar_t *buf, const char *fmt, va_list args) |
Write a formatted string to a wide-character buffer. More... | |
EFI strings.
Definition in file efi_strings.h.
#define efi_sprintf | ( | buf, | |
fmt, | |||
... | |||
) | efi_snprintf ( (buf), ~( ( size_t ) 0 ), (fmt), ## __VA_ARGS__ ) |
Write a formatted string to a buffer.
wbuf | Buffer into which to write the string |
fmt | Format string |
... | Arguments corresponding to the format string |
wlen | Length of formatted string (in wide characters) |
Definition at line 45 of file efi_strings.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
Write a formatted string to a wide-character buffer.
wbuf | Buffer into which to write the string |
wsize | Size of buffer (in wide characters) |
fmt | Format string |
args | Arguments corresponding to the format string |
wlen | Length of formatted string (in wide characters) |
If the buffer is too small to contain the string, the returned length is the length that would have been written had enough space been available.
Definition at line 74 of file efi_strings.c.
References efi_sputc_context::buf, efi_sputc_context::ctx, efi_printf_sputc(), fmt, printf_context::handler, efi_sputc_context::max_wlen, and vcprintf().
Referenced by efi_ifr_string(), efi_snprintf(), efi_vasprintf(), efi_vsprintf(), and efi_vssnprintf().
Write a formatted string to a buffer.
wbuf | Buffer into which to write the string |
wsize | Size of buffer (in wide characters) |
fmt | Format string |
... | Arguments corresponding to the format string |
wlen | Length of formatted string (in wide characters) |
Definition at line 106 of file efi_strings.c.
References efi_vsnprintf(), fmt, va_end, and va_start.
Referenced by efi_file_varlen(), efi_image_path(), efi_local_open_resolved(), efi_snp_hii_append(), and efi_snp_probe().
Version of efi_vsnprintf() that accepts a signed buffer size.
wbuf | Buffer into which to write the string |
swsize | Size of buffer (in wide characters) |
fmt | Format string |
args | Arguments corresponding to the format string |
wlen | Length of formatted string (in wide characters) |
Definition at line 125 of file efi_strings.c.
References efi_vsnprintf(), and fmt.
Referenced by efi_ssnprintf().
Version of efi_vsnprintf() that accepts a signed buffer size.
wbuf | Buffer into which to write the string |
swsize | Size of buffer (in wide characters) |
fmt | Format string |
... | Arguments corresponding to the format string |
wlen | Length of formatted string (in wide characters) |
Definition at line 145 of file efi_strings.c.
References efi_vssnprintf(), fmt, len, va_end, and va_start.
Write a formatted string to newly allocated memory.
wstrp | Pointer to hold allocated string |
fmt | Format string |
args | Arguments corresponding to the format string |
len | Length of formatted string (in wide characters) |
Definition at line 164 of file efi_strings.c.
References efi_vsnprintf(), ENOMEM, fmt, len, malloc(), NULL, va_copy, and va_end.
Referenced by efi_asprintf().
int efi_asprintf | ( | wchar_t ** | wstrp, |
const char * | fmt, | ||
... | |||
) |
Write a formatted string to newly allocated memory.
wstrp | Pointer to hold allocated string |
fmt | Format string |
... | Arguments corresponding to the format string |
len | Length of formatted string (in wide characters) |
Definition at line 188 of file efi_strings.c.
References efi_vasprintf(), fmt, len, va_end, and va_start.
Referenced by efi_image_cmdline(), and efi_shim_cmdline().
Write a formatted string to a wide-character buffer.
wbuf | Buffer into which to write the string |
fmt | Format string |
args | Arguments corresponding to the format string |
wlen | Length of formatted string (in wide characters) |
Definition at line 33 of file efi_strings.h.
References efi_vsnprintf(), and fmt.