mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
machinectl: several trivial cleanups and man page fix (#37812)
Fixes #27481.
This commit is contained in:
@@ -778,8 +778,7 @@
|
||||
non-empty label strings, separated by dots. No leading or trailing
|
||||
dots are allowed. No sequences of multiple dots are allowed. The
|
||||
label strings may only consist of alphanumeric characters as well
|
||||
as the dash and underscore. The maximum length of a machine name
|
||||
is 64 characters.</para>
|
||||
as the dash. The maximum length of a machine name is 64 characters.</para>
|
||||
|
||||
<para>A special machine with the name <literal>.host</literal>
|
||||
refers to the running host system itself. This is useful for execution
|
||||
|
||||
@@ -68,14 +68,14 @@ typedef enum MachineRunner {
|
||||
} MachineRunner;
|
||||
|
||||
static const char* const machine_runner_table[_RUNNER_MAX] = {
|
||||
[RUNNER_NSPAWN] = "nspawn",
|
||||
[RUNNER_NSPAWN] = "nspawn",
|
||||
[RUNNER_VMSPAWN] = "vmspawn",
|
||||
};
|
||||
|
||||
DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(machine_runner, MachineRunner);
|
||||
|
||||
static const char* const machine_runner_unit_prefix_table[_RUNNER_MAX] = {
|
||||
[RUNNER_NSPAWN] = "systemd-nspawn",
|
||||
[RUNNER_NSPAWN] = "systemd-nspawn",
|
||||
[RUNNER_VMSPAWN] = "systemd-vmspawn",
|
||||
};
|
||||
|
||||
@@ -1694,7 +1694,7 @@ static int make_service_name(const char *name, char **ret) {
|
||||
|
||||
assert(name);
|
||||
assert(ret);
|
||||
assert(arg_runner >= 0 && arg_runner < (MachineRunner) ELEMENTSOF(machine_runner_unit_prefix_table));
|
||||
assert(arg_runner >= 0 && arg_runner < _RUNNER_MAX);
|
||||
|
||||
if (!hostname_is_valid(name, 0))
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
|
||||
Reference in New Issue
Block a user