From a2ea44b7dbc49c36a6b48778b2702bd57163d969 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 3 Nov 2022 09:10:59 +0900 Subject: [PATCH 1/3] meson: sort libraries Except for 'threads'. Follow-up for ede5a78f50ed2d5f86dc7a117de2a51b397d52d4. --- src/shared/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/meson.build b/src/shared/meson.build index 97e52c2335..e5879d046b 100644 --- a/src/shared/meson.build +++ b/src/shared/meson.build @@ -464,9 +464,9 @@ libshared_deps = [threads, librt, libseccomp, libselinux, - libzstd, + libxenctrl, libxz, - libxenctrl] + libzstd] libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir()) From 3f33bfddeb7ee8b626a1c0698ba65c52a6541980 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 3 Nov 2022 09:16:43 +0900 Subject: [PATCH 2/3] reboot-util: drop redundant headers Follow-up for ede5a78f50ed2d5f86dc7a117de2a51b397d52d4. --- src/shared/reboot-util.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/shared/reboot-util.c b/src/shared/reboot-util.c index e761bc25a4..10d49ba63a 100644 --- a/src/shared/reboot-util.c +++ b/src/shared/reboot-util.c @@ -1,11 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include -#include -#include #include -#include -#include #include #include #include @@ -22,7 +18,6 @@ #include "fd-util.h" #include "fileio.h" #include "log.h" -#include "memory-util.h" #include "proc-cmdline.h" #include "raw-reboot.h" #include "reboot-util.h" From 6564918c6cc1753df906966289689fd98eb8ebcd Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 3 Nov 2022 09:19:07 +0900 Subject: [PATCH 3/3] reboot-util: drop unnecessary cast Follow-up for ede5a78f50ed2d5f86dc7a117de2a51b397d52d4. --- src/shared/reboot-util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shared/reboot-util.c b/src/shared/reboot-util.c index 10d49ba63a..7fa3ff98b6 100644 --- a/src/shared/reboot-util.c +++ b/src/shared/reboot-util.c @@ -122,9 +122,9 @@ int shall_restore_state(void) { static int xen_kexec_loaded(void) { #if HAVE_XENCTRL - size_t size; _cleanup_close_ int privcmd_fd = -1, buf_fd = -1; - void *buffer; + xen_kexec_status_t *buffer; + size_t size; int r; if (access("/proc/xen", F_OK) < 0) { @@ -149,7 +149,7 @@ static int xen_kexec_loaded(void) { if (buffer == MAP_FAILED) return log_debug_errno(errno, "Cannot allocate buffer for hypercall: %m"); - *(xen_kexec_status_t*) buffer = (xen_kexec_status_t) { + *buffer = (xen_kexec_status_t) { .type = KEXEC_TYPE_DEFAULT, };