diff options
author | Luca Boccassi <bluca@debian.org> | 2023-03-23 11:47:06 +0100 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2023-03-28 11:36:01 +0200 |
commit | 6255bbe2624caa1e656c4f8a1b88721b62c2e16e (patch) | |
tree | 975abf78724b286c21487c936794633de628c862 /src/portable/portable.c | |
parent | Merge pull request #27013 from fbuihuu/test-fixlets (diff) | |
download | systemd-6255bbe2624caa1e656c4f8a1b88721b62c2e16e.tar.xz systemd-6255bbe2624caa1e656c4f8a1b88721b62c2e16e.zip |
env: add load_env_file_pairs_fd()
Diffstat (limited to 'src/portable/portable.c')
-rw-r--r-- | src/portable/portable.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/portable/portable.c b/src/portable/portable.c index 8a3211166e..770cac9e1f 100644 --- a/src/portable/portable.c +++ b/src/portable/portable.c @@ -594,7 +594,6 @@ static int extract_image_and_extensions( _cleanup_(portable_metadata_unrefp) PortableMetadata *extension_release_meta = NULL; _cleanup_hashmap_free_ Hashmap *extra_unit_files = NULL; _cleanup_strv_free_ char **extension_release = NULL; - _cleanup_fclose_ FILE *f = NULL; const char *e; r = portable_extract_by_path(ext->path, /* path_is_extension= */ true, relax_extension_release_check, matches, &extension_release_meta, &extra_unit_files, error); @@ -608,12 +607,7 @@ static int extract_image_and_extensions( if (!validate_sysext && !ret_valid_prefixes && !ret_extension_releases) continue; - /* We need to keep the fd valid, to return the PortableMetadata to the caller. */ - r = fdopen_independent(extension_release_meta->fd, "re", &f); - if (r < 0) - return r; - - r = load_env_file_pairs(f, extension_release_meta->name, &extension_release); + r = load_env_file_pairs_fd(extension_release_meta->fd, extension_release_meta->name, &extension_release); if (r < 0) return r; |