From cacf6fb20ce803e5ac9cc64d594f505dea6c1eed Mon Sep 17 00:00:00 2001 From: dufuhang Date: Thu, 16 May 2024 15:03:22 +0800 Subject: [PATCH] main: pass the right error variable --- main-pass-the-right-error-variable.patch | 25 ++++++++++++++++++++++++ systemd.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 main-pass-the-right-error-variable.patch diff --git a/main-pass-the-right-error-variable.patch b/main-pass-the-right-error-variable.patch new file mode 100644 index 0000000..a2fd8a3 --- /dev/null +++ b/main-pass-the-right-error-variable.patch @@ -0,0 +1,25 @@ +From fbca21057d0a8c8c1f45d8767753b964f7173510 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Thu, 16 May 2024 14:47:23 +0800 +Subject: [PATCH] main: pass the right error variable + +--- + src/core/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/main.c b/src/core/main.c +index 534c14a..a63e954 100644 +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -2517,7 +2517,7 @@ static void setenv_manager_environment(void) { + + r = putenv_dup(*p, true); + if (r < 0) +- log_warning_errno(errno, "Failed to setenv \"%s\", ignoring: %m", *p); ++ log_warning_errno(r, "Failed to setenv \"%s\", ignoring: %m", *p); + } + } + +-- +2.27.0 + diff --git a/systemd.spec b/systemd.spec index bb91a9f..76e99b0 100644 --- a/systemd.spec +++ b/systemd.spec @@ -25,7 +25,7 @@ Name: systemd Url: https://systemd.io/ Version: 255 -Release: 15 +Release: 16 License: MIT and LGPLv2+ and GPLv2+ Summary: System and Service Manager @@ -119,6 +119,7 @@ Patch9057: add-a-new-switch-to-control-whether-udev-complies-wi.patch Patch9058: journal-don-t-enable-systemd-journald-audit.socket.patch Patch9801: Systemd-Add-sw64-architecture.patch +Patch9802: main-pass-the-right-error-variable.patch BuildRequires: gcc, gcc-c++ BuildRequires: libcap-devel, libmount-devel, pam-devel, libselinux-devel @@ -1644,6 +1645,9 @@ fi %{_libdir}/security/pam_systemd_loadkey.so %changelog +* Thu May 16 2024 dufuhang - 255-16 +- main: pass the right error variable + * Thu May 9 2024 Han Jinpeng - 255-15 - Add bash completion for systemctl service-log-level/target -- Gitee