| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
In the Xen case, it's the hypervisor which manages kexec. We thus
have to ask it whether a kernel is loaded, instead of relying on
/sys/kernel/kexec_loaded.
|
|
|
|
|
|
|
|
|
|
| |
See parent commit for explanation.
git blame shows Martin Pitt is the author of the code.
(I was considering whether we should instead drop this file, but it's still
useful for *distributions*. Eveen if we discourage people from using sysv
scripts, distributions will have to deal with them for a while yet.)
|
|
|
|
| |
And make verb_set_default() return zero on success.
|
|\
| |
| | |
Remove usage of "noun(s)" in messages and docs
|
| |
| |
| |
| |
| |
| |
| |
| | |
(s) is just ugly with a vibe of DOS. In most cases just using the normal plural
form is more natural and gramatically correct.
There are some log_debug() statements left, and texts in foreign licenses or
headers. Those are not touched on purpose.
|
| |
| |
| |
| |
| |
| | |
Typically the _MAX and _INVALID special enum values use the full type as
prefix, even if the actual values of the enum might not. Let's follow
this rule here too.
|
|/
|
|
|
|
|
| |
We can just make this an enum, as long as we ensure it has enough range,
which we can do by adding -ERRNO_MAX as one possible value (at least on
GNU C). We already do that at multiple other places, so let's do this
here too.
|
|
|
|
|
|
| |
We had an anonymous enum with values called UNIT_FILE_…, which could easily be
confused with UNIT_FILE_… from UnitFileFlags enum. This commit renames the enum
values and also the variables which refer to them.
|
|
|
|
|
| |
It's shorter and more generic. The struct can contain info about changes to
unit files, but also symlinks and errors.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
errno + %m
strerror() is not thread safe and calling it just isn't worth the effort
required to justify why it would be safe in those cases. It's easier to just
use %m which is thread-safe out of the box. I don't think that any of the
changes in the patch cause any functional difference. This is just about
getting rid of calls to strerror() in general.
When we print an error message and fail to format the string, using something
like "(null)" is good enough. This is very very unlikely to happen anyway.
|
|
|
|
|
|
|
|
|
|
| |
If the executable path is prefixed with "-", an exit code of the command
normally considered a failure (i.e. non-zero exit status or abnormal exit
due to signal) is recorded, but has no further effect and is considered
equivalent to success.
Let's honor this with `systemctl status`, and color ignored exit status
in yellow, not red.
|
|
|
|
|
| |
All tools that support --root= should also learn --image=
so that they can operate on disk images directly.
|
|\
| |
| | |
shared/logs-show: add new --output= format "short-delta"
|
| |
| |
| |
| |
| |
| |
| | |
This new output formatting option is similar to "short-monotonic" but
also shows the time delta between two messages.
This fixes #24641.
|
|\ \
| | |
| | | |
systemctl: Remove check that linked unit files must contain a "/"
|
| | | |
|
| |/
| |
| |
| | |
Let's suggest users try ./<filename> when they encounter this error.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
All users were setting this to some static string (usually "-"), so let's
simplify things by not doing strdup, but instead limiting callers to a fixed
set of values. In preparation for the next commit, the function is renamed from
"empty" to "replacement", because it'll be used for more than empty fields. I
didn't do the whole string-table setup, because it's all used internally in one
file and this way we can immediately assert if an invalid value is passed in.
Some callers were (void)ing the error, others were ignoring it, and others
propagating. It's nicer to remove the boilerplate.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
getopt allows non-ambiguous abbreviations, so backwards-compat is maintained, and
people can use --kill-who (or even shorter abbreviations). English is flexible,
so in common speach people would use both forms, even if "whom" is technically
more correct. The advantage of using the longer form in the code is that we
effectively allow both forms, so we stop punishing people who DTGCT¹, but still
allow people to use the spoken form if they prefer.
1. Do the gramatically correct thing
|
| |
|
|\
| |
| | |
Don't do daemon-reload in the initrd
|
| | |
|
| |
| |
| |
| | |
Fixes: #6056
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We always should use size_t for sizes of arrays (and any size of memory,
in fact), unless there's a strong reason to use something else. Hence,
let's fix these cases where we sloppily used "unsigned" or "int"
instead.
No change in behaviour, this is just to make things less surprising for
the random reader.
|
|/
|
|
| |
Fixes: #22706
|
|\
| |
| | |
bootctl: add --root and --image
|
| |
| |
| |
| | |
Operate on image/directory, and also take files to install from it
|
| |
| |
| |
| | |
`log_warning()` colorize the message gracefully.
|
|/ |
|
|\
| |
| | |
manager: optionally, do a full preset on first boot
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have vendor presets, and local admin presets, and runtime presets
(under /usr/lib, /usr/local/lib and /etc, /run, respectively). When we
display preset state, it can be configured in any of those places, so
we shouldn't say anything about the origin.
(Another nice advantage is that it improves alignment:
[root@f36 ~]# systemctl list-unit-files multipathd.service
UNIT FILE STATE VENDOR PRESET
multipathd.service enabled enabled
^ this looks we have a "PRESET" column that is empty.)
|
| | |
|
| |
| |
| |
| |
| | |
The arguments `--global`, `--runtime` and `--root` also affect the
`edit` verb.
|
| |
| |
| |
| |
| | |
gcc insists that bus may be used unitialized here, but I don't see any
possibility of that.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We had yet-another table of descriptive strings to use in error messages.
I started thinking how to synchronize them with the strings in logind, but
ultimately I think it's better to remove those altogether. Those strings
should almost never be used: normally if the call fails, logind will provide
an error message itself, which is probably more detailed than what we can
figure out on the client side. And the most important part that we want to
show here is what exactly we called, in particular RebootWithFlags vs. Reboot,
etc. By using the "descriptive strings" we were obfuscating this. So let's just
simplify our code and print the actual method name, since this is more useful
as an error statement that is googlable and unique.
While at it, let's print the correct method name ;)
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This makes the interface more flexible, by allowing the same filtering
for show and status as is done for list-units.
Fixes #23207.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
oss-fuzz reports timeouts which are created by appending to a very long strv.
The code is indeed not very efficient, but it's designed for normal
command-line use, where we don't expect more than a dozen of entries. The fact
that it is slow with ~100k entries is not particularly interesting.
In the future we could rework the code to have better algorithmic complexity.
But let's at least stop oss-fuzz from wasting more time on such examples.
(My first approach was to set max_len in .options, but apparently this doesn't
work for hongfuzz and and AFL.)
oss-fuzz-34527: https://oss-fuzz.com/issue/5722283944574976
|
|
|
|
|
|
|
|
|
| |
"enabled" state is highlighted in green and "disabled" state is
highlighted in yellow because I felt that white and grey colors were not
so distinguishable. Other states are not highlighted. Any other coloring
suggestions are welcome!
Closes #16932.
|
| |
|
|\
| |
| |
| |
| | |
keszybz/symlink-enablement-yet-again-punish-me-harder
Fixups to the unit enablement logic
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As suggested in
https://github.com/systemd/systemd/pull/22649/commits/8b3ad3983f5440eef812b34e5ed862ca59fdf7f7#r837345892
The define is generalized and moved to path-lookup.h, where it seems to fit
better. This allows a recursive include to be removed and in general makes
things simpler.
|