mirror of
https://github.com/systemd/systemd.git
synced 2025-02-09 13:57:42 +03:00
Merge pull request #32717 from keszybz/very-important-fixes
Whitespace adjustments and comments
This commit is contained in:
commit
d2fa7f1310
@ -80,8 +80,8 @@ static int help(int argc, char *argv[], void *userdata) {
|
||||
" --tpm2-device=PATH Use specified TPM2 device\n"
|
||||
" --private-key=KEY Private key (PEM) to sign with\n"
|
||||
" --private-key-source=file|provider:PROVIDER|engine:ENGINE\n"
|
||||
" Specify how to use the --private-key=. Allows one to use\n"
|
||||
" an OpenSSL engine/provider when signing\n"
|
||||
" Specify how to use KEY for --private-key=. Allows\n"
|
||||
" an OpenSSL engine/provider to be used for signing\n"
|
||||
" --public-key=KEY Public key (PEM) to validate against\n"
|
||||
" --certificate=PATH PEM certificate to use when signing with a URI\n"
|
||||
" --json=MODE Output as JSON\n"
|
||||
|
@ -409,18 +409,18 @@ static int oci_user(const char *name, JsonVariant *v, JsonDispatchFlags flags, v
|
||||
static int oci_process(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userdata) {
|
||||
|
||||
static const JsonDispatch table[] = {
|
||||
{ "terminal", JSON_VARIANT_BOOLEAN, oci_terminal, 0, 0 },
|
||||
{ "consoleSize", JSON_VARIANT_OBJECT, oci_console_size, 0, 0 },
|
||||
{ "cwd", JSON_VARIANT_STRING, oci_absolute_path, offsetof(Settings, working_directory), 0 },
|
||||
{ "env", JSON_VARIANT_ARRAY, oci_env, offsetof(Settings, environment), 0 },
|
||||
{ "args", JSON_VARIANT_ARRAY, oci_args, offsetof(Settings, parameters), 0 },
|
||||
{ "rlimits", JSON_VARIANT_ARRAY, oci_rlimits, 0, 0 },
|
||||
{ "apparmorProfile", JSON_VARIANT_STRING, oci_unsupported, 0, JSON_PERMISSIVE },
|
||||
{ "capabilities", JSON_VARIANT_OBJECT, oci_capabilities, 0, 0 },
|
||||
{ "noNewPrivileges", JSON_VARIANT_BOOLEAN, json_dispatch_tristate,offsetof(Settings, no_new_privileges), 0 },
|
||||
{ "oomScoreAdj", JSON_VARIANT_INTEGER, oci_oom_score_adj, 0, 0 },
|
||||
{ "selinuxLabel", JSON_VARIANT_STRING, oci_unsupported, 0, JSON_PERMISSIVE },
|
||||
{ "user", JSON_VARIANT_OBJECT, oci_user, 0, 0 },
|
||||
{ "terminal", JSON_VARIANT_BOOLEAN, oci_terminal, 0, 0 },
|
||||
{ "consoleSize", JSON_VARIANT_OBJECT, oci_console_size, 0, 0 },
|
||||
{ "cwd", JSON_VARIANT_STRING, oci_absolute_path, offsetof(Settings, working_directory), 0 },
|
||||
{ "env", JSON_VARIANT_ARRAY, oci_env, offsetof(Settings, environment), 0 },
|
||||
{ "args", JSON_VARIANT_ARRAY, oci_args, offsetof(Settings, parameters), 0 },
|
||||
{ "rlimits", JSON_VARIANT_ARRAY, oci_rlimits, 0, 0 },
|
||||
{ "apparmorProfile", JSON_VARIANT_STRING, oci_unsupported, 0, JSON_PERMISSIVE },
|
||||
{ "capabilities", JSON_VARIANT_OBJECT, oci_capabilities, 0, 0 },
|
||||
{ "noNewPrivileges", JSON_VARIANT_BOOLEAN, json_dispatch_tristate, offsetof(Settings, no_new_privileges), 0 },
|
||||
{ "oomScoreAdj", JSON_VARIANT_INTEGER, oci_oom_score_adj, 0, 0 },
|
||||
{ "selinuxLabel", JSON_VARIANT_STRING, oci_unsupported, 0, JSON_PERMISSIVE },
|
||||
{ "user", JSON_VARIANT_OBJECT, oci_user, 0, 0 },
|
||||
{}
|
||||
};
|
||||
|
||||
@ -432,8 +432,8 @@ static int oci_root(const char *name, JsonVariant *v, JsonDispatchFlags flags, v
|
||||
int r;
|
||||
|
||||
static const JsonDispatch table[] = {
|
||||
{ "path", JSON_VARIANT_STRING, json_dispatch_string, offsetof(Settings, root) },
|
||||
{ "readonly", JSON_VARIANT_BOOLEAN, json_dispatch_tristate,offsetof(Settings, read_only) },
|
||||
{ "path", JSON_VARIANT_STRING, json_dispatch_string, offsetof(Settings, root) },
|
||||
{ "readonly", JSON_VARIANT_BOOLEAN, json_dispatch_tristate, offsetof(Settings, read_only) },
|
||||
{}
|
||||
};
|
||||
|
||||
|
@ -6918,11 +6918,11 @@ static int help(void) {
|
||||
" --private-key=PATH|URI\n"
|
||||
" Private key to use when generating verity roothash\n"
|
||||
" signatures, or an engine or provider specific\n"
|
||||
" designation if --private-key-source= is used.\n"
|
||||
" designation if --private-key-source= is used\n"
|
||||
" --private-key-source=file|provider:PROVIDER|engine:ENGINE\n"
|
||||
" Specify how to use the --private-key=. Allows one to\n"
|
||||
" use an OpenSSL engine/provider when generating\n"
|
||||
" verity roothash signatures\n"
|
||||
" Specify how to use KEY for --private-key=. Allows\n"
|
||||
" an OpenSSL engine/provider to be used for when\n"
|
||||
" generating verity roothash signatures\n"
|
||||
" --certificate=PATH PEM certificate to use when generating verity\n"
|
||||
" roothash signatures\n"
|
||||
" --tpm2-device=PATH Path to TPM2 device node to use\n"
|
||||
|
@ -919,8 +919,8 @@ int bus_message_read_id128(sd_bus_message *m, sd_id128_t *ret) {
|
||||
case sizeof(sd_id128_t):
|
||||
if (ret)
|
||||
memcpy(ret, a, sz);
|
||||
return !memeqzero(a, sz); /* This intends to sd_id128_is_null(), but ret may be NULL, so
|
||||
* let'suse memeqzero() here. */
|
||||
return !memeqzero(a, sz); /* This mimics sd_id128_is_null(), but ret may be NULL,
|
||||
* and a may be misaligned, so use memeqzero() here. */
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
@ -492,11 +492,11 @@ char* escape_qemu_value(const char *s) {
|
||||
|
||||
assert(s);
|
||||
|
||||
/* QEMU requires that commas in arguments be escaped by doubling up the commas.
|
||||
* See https://www.qemu.org/docs/master/system/qemu-manpage.html#options
|
||||
* for more information.
|
||||
/* QEMU requires that commas in arguments to be escaped by doubling up the commas. See
|
||||
* https://www.qemu.org/docs/master/system/qemu-manpage.html#options for more information.
|
||||
*
|
||||
* This function performs this escaping, returning an allocated string with the escaped value, or NULL if allocation failed. */
|
||||
* This function performs this escaping, returning an allocated string with the escaped value, or
|
||||
* NULL if allocation failed. */
|
||||
|
||||
n = strlen(s);
|
||||
|
||||
|
@ -5,43 +5,43 @@
|
||||
#include "macro.h"
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__)
|
||||
#define ARCHITECTURE_SUPPORTS_SMBIOS 1
|
||||
# define ARCHITECTURE_SUPPORTS_SMBIOS 1
|
||||
#else
|
||||
#define ARCHITECTURE_SUPPORTS_SMBIOS 0
|
||||
# define ARCHITECTURE_SUPPORTS_SMBIOS 0
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
|
||||
#define ARCHITECTURE_SUPPORTS_TPM 1
|
||||
# define ARCHITECTURE_SUPPORTS_TPM 1
|
||||
#else
|
||||
#define ARCHITECTURE_SUPPORTS_TPM 0
|
||||
# define ARCHITECTURE_SUPPORTS_TPM 0
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
#define ARCHITECTURE_SUPPORTS_SMM 1
|
||||
# define ARCHITECTURE_SUPPORTS_SMM 1
|
||||
#else
|
||||
#define ARCHITECTURE_SUPPORTS_SMM 0
|
||||
# define ARCHITECTURE_SUPPORTS_SMM 0
|
||||
#endif
|
||||
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
#define DEFAULT_SERIAL_TTY "ttyAMA0"
|
||||
# define DEFAULT_SERIAL_TTY "ttyAMA0"
|
||||
#elif defined(__s390__) || defined(__s390x__)
|
||||
#define DEFAULT_SERIAL_TTY "ttysclp0"
|
||||
# define DEFAULT_SERIAL_TTY "ttysclp0"
|
||||
#elif defined(__powerpc__) || defined(__powerpc64__)
|
||||
#define DEFAULT_SERIAL_TTY "hvc0"
|
||||
# define DEFAULT_SERIAL_TTY "hvc0"
|
||||
#else
|
||||
#define DEFAULT_SERIAL_TTY "ttyS0"
|
||||
# define DEFAULT_SERIAL_TTY "ttyS0"
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
#define QEMU_MACHINE_TYPE "q35"
|
||||
# define QEMU_MACHINE_TYPE "q35"
|
||||
#elif defined(__arm__) || defined(__aarch64__)
|
||||
#define QEMU_MACHINE_TYPE "virt"
|
||||
# define QEMU_MACHINE_TYPE "virt"
|
||||
#elif defined(__s390__) || defined(__s390x__)
|
||||
#define QEMU_MACHINE_TYPE "s390-ccw-virtio"
|
||||
# define QEMU_MACHINE_TYPE "s390-ccw-virtio"
|
||||
#elif defined(__powerpc__) || defined(__powerpc64__)
|
||||
#define QEMU_MACHINE_TYPE "pseries"
|
||||
# define QEMU_MACHINE_TYPE "pseries"
|
||||
#else
|
||||
#error "No qemu machine defined for this architecture"
|
||||
# error "No qemu machine defined for this architecture"
|
||||
#endif
|
||||
|
||||
typedef struct OvmfConfig {
|
||||
|
Loading…
x
Reference in New Issue
Block a user