Merge pull request #27199 from yuwata/find-esp

path-util: introduce path_prefix_root_cwd(), and use it in find_esp() and friends
This commit is contained in:
Yu Watanabe
2023-04-11 12:36:13 +09:00
committed by GitHub
4 changed files with 74 additions and 10 deletions
+6 -10
View File
@@ -540,11 +540,9 @@ int find_esp_and_warn(
return r;
if (ret_path) {
char *q = path_join(empty_to_root(root), p);
if (!q)
return -ENOMEM;
*ret_path = TAKE_PTR(q);
r = path_prefix_root_cwd(p, root, ret_path);
if (r < 0)
return r;
}
if (ret_part)
*ret_part = part;
@@ -861,11 +859,9 @@ int find_xbootldr_and_warn(
return r;
if (ret_path) {
char *q = path_join(empty_to_root(root), p);
if (!q)
return -ENOMEM;
*ret_path = TAKE_PTR(q);
r = path_prefix_root_cwd(p, root, ret_path);
if (r < 0)
return r;
}
if (ret_uuid)
*ret_uuid = uuid;