iPXE
|
#include <stddef.h>
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
#include <ipxe/vsprintf.h>
#include <ipxe/efi/efi_strings.h>
Go to the source code of this file.
Data Structures | |
struct | efi_sputc_context |
Context used by efi_vsnprintf() and friends. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | efi_printf_sputc (struct printf_context *ctx, unsigned int c) |
Write wide character to buffer. More... | |
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 **wstrp, const char *fmt, va_list args) |
Write a formatted string to newly allocated memory. More... | |
int | efi_asprintf (wchar_t **wstrp, const char *fmt,...) |
Write a formatted string to newly allocated memory. More... | |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Write wide character to buffer.
ctx | Context |
c | Character |
Definition at line 53 of file efi_strings.c.
References efi_sputc_context::buf, c, container_of, ctx, and efi_sputc_context::max_wlen.
Referenced by efi_vsnprintf().
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_block_filename(), efi_file_varlen(), efi_image_path(), efi_local_open_resolved(), efi_snp_hii_append(), efi_snp_probe(), and efivars_fetch().
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().