mirror of
https://github.com/systemd/systemd.git
synced 2025-03-25 18:50:18 +03:00
boot: introduce _cleanup_strv_free_
This commit is contained in:
parent
6ea99fd2cf
commit
7eabb5ca61
@ -683,7 +683,7 @@ static bool menu_run(
|
||||
bool new_mode = true, clear = true;
|
||||
bool refresh = true, highlight = false;
|
||||
size_t x_start = 0, y_start = 0, y_status = 0, x_max, y_max;
|
||||
_cleanup_(strv_freep) char16_t **lines = NULL;
|
||||
_cleanup_strv_free_ char16_t **lines = NULL;
|
||||
_cleanup_free_ char16_t *clearline = NULL, *separator = NULL, *status = NULL;
|
||||
uint64_t timeout_efivar_saved = config->timeout_sec_efivar;
|
||||
uint32_t timeout_remain = config->timeout_sec == TIMEOUT_MENU_FORCE ? 0 : config->timeout_sec;
|
||||
|
@ -318,7 +318,7 @@ EFI_STATUS pack_cpio(
|
||||
size_t dirent_size = 0, buffer_size = 0, n_items = 0, n_allocated = 0;
|
||||
_cleanup_free_ char16_t *rel_dropin_dir = NULL;
|
||||
_cleanup_free_ EFI_FILE_INFO *dirent = NULL;
|
||||
_cleanup_(strv_freep) char16_t **items = NULL;
|
||||
_cleanup_strv_free_ char16_t **items = NULL;
|
||||
_cleanup_free_ void *buffer = NULL;
|
||||
uint32_t inode = 1; /* inode counter, so that each item gets a new inode */
|
||||
EFI_STATUS err;
|
||||
|
@ -547,7 +547,7 @@ static EFI_STATUS load_addons(
|
||||
NamedAddon **ucode_addons, /* Ditto */
|
||||
size_t *n_ucode_addons) {
|
||||
|
||||
_cleanup_(strv_freep) char16_t **items = NULL;
|
||||
_cleanup_strv_free_ char16_t **items = NULL;
|
||||
_cleanup_file_close_ EFI_FILE *root = NULL;
|
||||
size_t n_items = 0, n_allocated = 0;
|
||||
EFI_STATUS err;
|
||||
|
@ -169,6 +169,8 @@ static inline void strv_freep(char16_t ***p) {
|
||||
strv_free(*p);
|
||||
}
|
||||
|
||||
#define _cleanup_strv_free_ _cleanup_(strv_freep)
|
||||
|
||||
EFI_STATUS open_directory(EFI_FILE *root_dir, const char16_t *path, EFI_FILE **ret);
|
||||
|
||||
/* Conversion between EFI_PHYSICAL_ADDRESS and pointers is not obvious. The former is always 64-bit, even on
|
||||
|
Loading…
x
Reference in New Issue
Block a user