mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
Merge pull request #29502 from keszybz/sd-boot-config-tweaks
Tweaks to sd-boot UX
This commit is contained in:
3
NEWS
3
NEWS
@@ -5764,7 +5764,8 @@ CHANGES WITH 246:
|
||||
started automatically as part of the desktop session.
|
||||
|
||||
* "bootctl" gained a new verb "reboot-to-firmware" that may be used
|
||||
to query and change the firmware's 'reboot into firmware' setup flag.
|
||||
to query and change the firmware's 'Reboot Into Firmware Interface'
|
||||
setup flag.
|
||||
|
||||
* systemd-firstboot gained a new switch --kernel-command-line= that may
|
||||
be used to initialize the /etc/kernel/cmdline file of the image. It
|
||||
|
||||
@@ -243,9 +243,9 @@
|
||||
<varlistentry>
|
||||
<term>auto-firmware</term>
|
||||
|
||||
<listitem><para>A boolean controlling the presence of the "Reboot into firmware" entry
|
||||
(enabled by default). If this is disabled, the firmware interface may still be reached
|
||||
by using the <keycap>f</keycap> key.</para>
|
||||
<listitem><para>A boolean controlling the presence of the <literal>Reboot Into Firmware
|
||||
Interface</literal> entry (enabled by default). If this is disabled, the firmware interface may still
|
||||
be reached by using the <keycap>f</keycap> key.</para>
|
||||
|
||||
<xi:include href="version-info.xml" xpointer="v239"/></listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -54,7 +54,8 @@
|
||||
|
||||
<listitem><para>The EFI Shell binary, if installed.</para></listitem>
|
||||
|
||||
<listitem><para>A reboot into the UEFI firmware setup option, if supported by the firmware.</para></listitem>
|
||||
<listitem><para>A <literal>Reboot Into Firmware Interface option</literal>, if supported by the UEFI
|
||||
firmware.</para></listitem>
|
||||
|
||||
<listitem><para>Secure Boot variables enrollment if the UEFI firmware is in setup-mode and files are provided
|
||||
on the ESP.</para></listitem>
|
||||
|
||||
@@ -30,31 +30,6 @@
|
||||
#define _function_no_sanitize_float_cast_overflow_
|
||||
#endif
|
||||
|
||||
/* Temporarily disable some warnings */
|
||||
#define DISABLE_WARNING_DEPRECATED_DECLARATIONS \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||
|
||||
#define DISABLE_WARNING_FORMAT_NONLITERAL \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"")
|
||||
|
||||
#define DISABLE_WARNING_MISSING_PROTOTYPES \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wmissing-prototypes\"")
|
||||
|
||||
#define DISABLE_WARNING_NONNULL \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wnonnull\"")
|
||||
|
||||
#define DISABLE_WARNING_SHADOW \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wshadow\"")
|
||||
|
||||
#define DISABLE_WARNING_INCOMPATIBLE_POINTER_TYPES \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wincompatible-pointer-types\"")
|
||||
|
||||
#if HAVE_WSTRINGOP_TRUNCATION
|
||||
# define DISABLE_WARNING_STRINGOP_TRUNCATION \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
@@ -64,18 +39,7 @@
|
||||
_Pragma("GCC diagnostic push")
|
||||
#endif
|
||||
|
||||
#define DISABLE_WARNING_TYPE_LIMITS \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wtype-limits\"")
|
||||
|
||||
#define DISABLE_WARNING_ADDRESS \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Waddress\"")
|
||||
|
||||
#define REENABLE_WARNING \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
|
||||
/* automake test harness */
|
||||
/* test harness */
|
||||
#define EXIT_TEST_SKIP 77
|
||||
|
||||
/* builtins */
|
||||
@@ -310,42 +274,6 @@ static inline int __coverity_check_and_return__(int condition) {
|
||||
#define FOREACH_ARRAY(i, array, num) \
|
||||
_FOREACH_ARRAY(i, array, num, UNIQ_T(m, UNIQ), UNIQ_T(end, UNIQ))
|
||||
|
||||
/* A wrapper for 'func' to return void.
|
||||
* Only useful when a void-returning function is required by some API. */
|
||||
#define DEFINE_TRIVIAL_DESTRUCTOR(name, type, func) \
|
||||
static inline void name(type *p) { \
|
||||
func(p); \
|
||||
}
|
||||
|
||||
/* When func() returns the void value (NULL, -1, …) of the appropriate type */
|
||||
#define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \
|
||||
static inline void func##p(type *p) { \
|
||||
if (*p) \
|
||||
*p = func(*p); \
|
||||
}
|
||||
|
||||
/* When func() doesn't return the appropriate type, set variable to empty afterwards.
|
||||
* The func() may be provided by a dynamically loaded shared library, hence add an assertion. */
|
||||
#define DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(type, func, empty) \
|
||||
static inline void func##p(type *p) { \
|
||||
if (*p != (empty)) { \
|
||||
DISABLE_WARNING_ADDRESS; \
|
||||
assert(func); \
|
||||
REENABLE_WARNING; \
|
||||
func(*p); \
|
||||
*p = (empty); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* When func() doesn't return the appropriate type, and is also a macro, set variable to empty afterwards. */
|
||||
#define DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_MACRO(type, func, empty) \
|
||||
static inline void func##p(type *p) { \
|
||||
if (*p != (empty)) { \
|
||||
func(*p); \
|
||||
*p = (empty); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define _DEFINE_TRIVIAL_REF_FUNC(type, name, scope) \
|
||||
scope type *name##_ref(type *p) { \
|
||||
if (!p) \
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,42 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* Temporarily disable some warnings */
|
||||
#define DISABLE_WARNING_DEPRECATED_DECLARATIONS \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
|
||||
|
||||
#define DISABLE_WARNING_FORMAT_NONLITERAL \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"")
|
||||
|
||||
#define DISABLE_WARNING_MISSING_PROTOTYPES \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wmissing-prototypes\"")
|
||||
|
||||
#define DISABLE_WARNING_NONNULL \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wnonnull\"")
|
||||
|
||||
#define DISABLE_WARNING_SHADOW \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wshadow\"")
|
||||
|
||||
#define DISABLE_WARNING_INCOMPATIBLE_POINTER_TYPES \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wincompatible-pointer-types\"")
|
||||
|
||||
#define DISABLE_WARNING_TYPE_LIMITS \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Wtype-limits\"")
|
||||
|
||||
#define DISABLE_WARNING_ADDRESS \
|
||||
_Pragma("GCC diagnostic push"); \
|
||||
_Pragma("GCC diagnostic ignored \"-Waddress\"")
|
||||
|
||||
#define REENABLE_WARNING \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
|
||||
#define _align_(x) __attribute__((__aligned__(x)))
|
||||
#define _alignas_(x) __attribute__((__aligned__(alignof(x))))
|
||||
#define _alignptr_ __attribute__((__aligned__(sizeof(void *))))
|
||||
@@ -384,6 +420,42 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
|
||||
#define FLAGS_SET(v, flags) \
|
||||
((~(v) & (flags)) == 0)
|
||||
|
||||
/* A wrapper for 'func' to return void.
|
||||
* Only useful when a void-returning function is required by some API. */
|
||||
#define DEFINE_TRIVIAL_DESTRUCTOR(name, type, func) \
|
||||
static inline void name(type *p) { \
|
||||
func(p); \
|
||||
}
|
||||
|
||||
/* When func() returns the void value (NULL, -1, …) of the appropriate type */
|
||||
#define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \
|
||||
static inline void func##p(type *p) { \
|
||||
if (*p) \
|
||||
*p = func(*p); \
|
||||
}
|
||||
|
||||
/* When func() doesn't return the appropriate type, set variable to empty afterwards.
|
||||
* The func() may be provided by a dynamically loaded shared library, hence add an assertion. */
|
||||
#define DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(type, func, empty) \
|
||||
static inline void func##p(type *p) { \
|
||||
if (*p != (empty)) { \
|
||||
DISABLE_WARNING_ADDRESS; \
|
||||
assert(func); \
|
||||
REENABLE_WARNING; \
|
||||
func(*p); \
|
||||
*p = (empty); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* When func() doesn't return the appropriate type, and is also a macro, set variable to empty afterwards. */
|
||||
#define DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_MACRO(type, func, empty) \
|
||||
static inline void func##p(type *p) { \
|
||||
if (*p != (empty)) { \
|
||||
func(*p); \
|
||||
*p = (empty); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Declare a flexible array usable in a union.
|
||||
* This is essentially a work-around for a pointless constraint in C99
|
||||
* and might go away in some future version of the standard.
|
||||
|
||||
Reference in New Issue
Block a user