From: Michael Biebl Date: Tue, 12 Oct 2021 11:16:59 +0000 (+0200) Subject: Remove unused initialize_coredump() function X-Git-Tag: debian/252.11-1_deb12u1~396 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=dfebac008879dfe1135ff07c22e789b8ddb25046;p=systemd.git Remove unused initialize_coredump() function This patch removes the call to initialize_coredump() which currently triggers the following warning: ../src/core/main.c:1641:13: warning: ‘initialize_coredump’ defined but not used [-Wunused-function] 1641 | static void initialize_coredump(bool skip_setup) { | ^~~~~~~~~~~~~~~~~~~ With upstream commit https://github.com/systemd/systemd/commit/702d40270a2984dda9f457febcba805ea458b4ad this will become an error, so remove the unused function as well. Gbp-Dch: Short --- diff --git a/debian/patches/debian/Revert-core-set-RLIMIT_CORE-to-unlimited-by-default.patch b/debian/patches/debian/Revert-core-set-RLIMIT_CORE-to-unlimited-by-default.patch index 8ce1c35ff..ff45ff672 100644 --- a/debian/patches/debian/Revert-core-set-RLIMIT_CORE-to-unlimited-by-default.patch +++ b/debian/patches/debian/Revert-core-set-RLIMIT_CORE-to-unlimited-by-default.patch @@ -14,15 +14,41 @@ isn't what RLIMIT_CORE is supposed to do (it limits the size of the core Bug-Debian: https://bugs.debian.org/815020 --- - src/core/main.c | 2 -- - sysctl.d/50-coredump.conf.in | 2 +- - 2 files changed, 1 insertion(+), 3 deletions(-) + src/core/main.c | 21 --------------------- + sysctl.d/50-coredump.conf.in | 2 +- + 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/core/main.c b/src/core/main.c -index b32a19a..f418166 100644 +index b32a19a..7038171 100644 --- a/src/core/main.c +++ b/src/core/main.c -@@ -2732,8 +2732,6 @@ int main(int argc, char *argv[]) { +@@ -1651,25 +1651,6 @@ static void cmdline_take_random_seed(void) { + "Note that the seed provided this way is accessible to unprivileged programs. This functionality should not be used outside of testing environments."); + } + +-static void initialize_coredump(bool skip_setup) { +-#if ENABLE_COREDUMP +- if (getpid_cached() != 1) +- return; +- +- /* Don't limit the core dump size, so that coredump handlers such as systemd-coredump (which honour the limit) +- * will process core dumps for system services by default. */ +- if (setrlimit(RLIMIT_CORE, &RLIMIT_MAKE_CONST(RLIM_INFINITY)) < 0) +- log_warning_errno(errno, "Failed to set RLIMIT_CORE: %m"); +- +- /* But at the same time, turn off the core_pattern logic by default, so that no +- * coredumps are stored until the systemd-coredump tool is enabled via +- * sysctl. However it can be changed via the kernel command line later so core +- * dumps can still be generated during early startup and in initramfs. */ +- if (!skip_setup) +- disable_coredumps(); +-#endif +-} +- + static void initialize_core_pattern(bool skip_setup) { + int r; + +@@ -2732,8 +2713,6 @@ int main(int argc, char *argv[]) { kernel_timestamp = DUAL_TIMESTAMP_NULL; }