mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-22 22:03:43 +03:00
portable: do not use SYNTHETIC_ERRNO for sd_bus_error_set_errno()
The concept of synthetic errnos is about logging, which is irrelevant irt bus error and we don't do any special treatment in sd-bus for them, meaning the value propagated would be spurious. (cherry picked from commit 2f2058da0b88535cb3a95fc98e7b2f1ae4d35601) (cherry picked from commit 018c7fb18ae8aff5414d5e74cb41fb98b72c0554) (cherry picked from commit 39c2b7fd58d4b96fc4f5fe0d5ebbfcc3cf1c3f80) (cherry picked from commit 06be1bfc838edc803096321e403021c005404283)
This commit is contained in:
parent
57778c6f22
commit
bddd7a10ad
@ -595,7 +595,7 @@ static int extract_image_and_extensions(
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
if (isempty(id))
|
if (isempty(id))
|
||||||
return sd_bus_error_set_errnof(error, SYNTHETIC_ERRNO(ESTALE), "Image %s os-release metadata lacks the ID field", name_or_path);
|
return sd_bus_error_set_errnof(error, ESTALE, "Image %s os-release metadata lacks the ID field", name_or_path);
|
||||||
|
|
||||||
if (prefixes) {
|
if (prefixes) {
|
||||||
valid_prefixes = strv_split(prefixes, WHITESPACE);
|
valid_prefixes = strv_split(prefixes, WHITESPACE);
|
||||||
@ -639,7 +639,7 @@ static int extract_image_and_extensions(
|
|||||||
if (validate_sysext) {
|
if (validate_sysext) {
|
||||||
r = extension_release_validate(ext->path, id, version_id, sysext_level, "portable", extension_release);
|
r = extension_release_validate(ext->path, id, version_id, sysext_level, "portable", extension_release);
|
||||||
if (r == 0)
|
if (r == 0)
|
||||||
return sd_bus_error_set_errnof(error, SYNTHETIC_ERRNO(ESTALE), "Image %s extension-release metadata does not match the root's", ext->path);
|
return sd_bus_error_set_errnof(error, ESTALE, "Image %s extension-release metadata does not match the root's", ext->path);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return sd_bus_error_set_errnof(error, r, "Failed to compare image %s extension-release metadata with the root's os-release: %m", ext->path);
|
return sd_bus_error_set_errnof(error, r, "Failed to compare image %s extension-release metadata with the root's os-release: %m", ext->path);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user