mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 22:50:29 +00:00
Coding style followups (#36476)
This commit is contained in:
@@ -1239,14 +1239,14 @@ int strv_rebreak_lines(char **l, size_t width, char ***ret) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
char** strv_filter_prefix(char *const*l, const char *prefix) {
|
char** strv_filter_prefix(char * const *l, const char *prefix) {
|
||||||
_cleanup_strv_free_ char **f = NULL;
|
|
||||||
|
|
||||||
/* Allocates a copy of 'l', but only copies over entries starting with 'prefix' */
|
/* Allocates a copy of 'l', but only copies over entries starting with 'prefix' */
|
||||||
|
|
||||||
if (isempty(prefix))
|
if (isempty(prefix))
|
||||||
return strv_copy(l);
|
return strv_copy(l);
|
||||||
|
|
||||||
|
_cleanup_strv_free_ char **f = NULL;
|
||||||
size_t sz = 0;
|
size_t sz = 0;
|
||||||
|
|
||||||
STRV_FOREACH(i, l) {
|
STRV_FOREACH(i, l) {
|
||||||
|
|||||||
@@ -269,4 +269,4 @@ int _string_strv_ordered_hashmap_put(OrderedHashmap **h, const char *key, const
|
|||||||
|
|
||||||
int strv_rebreak_lines(char **l, size_t width, char ***ret);
|
int strv_rebreak_lines(char **l, size_t width, char ***ret);
|
||||||
|
|
||||||
char** strv_filter_prefix(char *const*l, const char *prefix);
|
char** strv_filter_prefix(char * const *l, const char *prefix);
|
||||||
|
|||||||
@@ -613,6 +613,8 @@ size_t utf8_console_width(const char *str) {
|
|||||||
size_t utf8_last_length(const char *s, size_t n) {
|
size_t utf8_last_length(const char *s, size_t n) {
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
assert(s);
|
||||||
|
|
||||||
if (n == SIZE_MAX)
|
if (n == SIZE_MAX)
|
||||||
n = strlen(s);
|
n = strlen(s);
|
||||||
|
|
||||||
|
|||||||
@@ -129,10 +129,9 @@ static int find_gpt_root(UdevEvent *event, blkid_probe pr, const char *loop_back
|
|||||||
|
|
||||||
#if defined(SD_GPT_ROOT_NATIVE) && ENABLE_EFI
|
#if defined(SD_GPT_ROOT_NATIVE) && ENABLE_EFI
|
||||||
sd_device *dev = ASSERT_PTR(ASSERT_PTR(event)->dev);
|
sd_device *dev = ASSERT_PTR(ASSERT_PTR(event)->dev);
|
||||||
sd_id128_t esp_or_xbootldr = SD_ID128_NULL;
|
|
||||||
_cleanup_free_ char *root_label = NULL;
|
_cleanup_free_ char *root_label = NULL;
|
||||||
bool found_esp_or_xbootldr = false, need_esp_or_xbootldr;
|
bool found_esp_or_xbootldr = false, need_esp_or_xbootldr;
|
||||||
sd_id128_t root_id = SD_ID128_NULL;
|
sd_id128_t root_id = SD_ID128_NULL, esp_or_xbootldr = SD_ID128_NULL;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
assert(event);
|
assert(event);
|
||||||
@@ -154,7 +153,7 @@ static int find_gpt_root(UdevEvent *event, blkid_probe pr, const char *loop_back
|
|||||||
if (r != -ENOENT && !ERRNO_IS_NOT_SUPPORTED(r))
|
if (r != -ENOENT && !ERRNO_IS_NOT_SUPPORTED(r))
|
||||||
return log_debug_errno(r, "Unable to determine loader partition UUID: %m");
|
return log_debug_errno(r, "Unable to determine loader partition UUID: %m");
|
||||||
|
|
||||||
log_device_debug(dev, "No loader partition UUID EFI variable set, not using partition data for search for default root block device.");
|
log_device_debug(dev, "No loader partition UUID EFI variable set, not using partition data to search for default root block device.");
|
||||||
|
|
||||||
/* NB: if an ESP/xbootldr field is set, we always use that. We do this in order to guarantee
|
/* NB: if an ESP/xbootldr field is set, we always use that. We do this in order to guarantee
|
||||||
* systematic behaviour. */
|
* systematic behaviour. */
|
||||||
|
|||||||
Reference in New Issue
Block a user