| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Apparently if the new "F" flag is used they might pin files, which
blocks us from unmounting things. Let's hence clear this up explicitly.
Before entering our umount loop.
Fixes: #14981
|
|\
| |
| | |
log: add support for prefixing console log messages with current timestamp
|
| | |
|
|/
|
|
|
|
| |
This may be not a popular setup, but in case kexec resides somewhere different
than the default location for KEXEC (`/usr/sbin/kexec`), don't just reboot and
try doing `reboot(RB_KEXEC)` instead, just like what `kexec -e` normally does.
|
|
|
|
|
| |
We might get lucky and this cleans up things later on automatically for
us.
|
|
|
|
|
| |
Fixes: #14410
Replaces: #14386
|
|
|
|
|
|
|
| |
get_block_device() is just the nicer way to do it (since it also odes
btrfs). Also, let's already collect the dev_t of the loopback device
when we enumerate things, that allows us to do the checks simpler
without constantly stat()ing things over and over again.
|
|
|
|
|
|
|
| |
We fucked up errno vs. r two times, let's correct that.
While we are at it, let's handle the error first, like we usually do,
and the clean case without indentation.
|
| |
|
|
|
|
|
| |
break them like we usually do, taking our intended line width into
account.
|
| |
|
|
|
|
|
|
| |
Kernels work without swap just fine.
Fixes: #13993
|
|
|
|
| |
Makes the error output seen in #13993 more readable.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This way less stuff needs to be in basic. Initially, I wanted to move all the
parts of cgroup-utils.[ch] that depend on efivars.[ch] to shared, because
efivars.[ch] is in shared/. Later on, I decide to split efivars.[ch], so the
move done in this patch is not necessary anymore. Nevertheless, it is still
valid on its own. If at some point we want to expose libbasic, it is better to
to not have stuff that belong in libshared there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If logging disappears issues are hard to debug, hence let's give
journald a slight edge over other services when the OOM killer hits.
Here are the special adjustments we now make:
systemd-coredump@.service.in OOMScoreAdjust=500
systemd-journald.service.in OOMScoreAdjust=-250
systemd-udevd.service.in OOMScoreAdjust=-1000
(i.e. the coredump processing is made more likely to be killed on OOM,
and udevd and journald are less likely to be killed)
|
| |
|
|
|
|
| |
Fixes: #12337
|
| |
|
|
|
|
|
|
|
|
| |
Let's remove some unnecessary confusion around signed/unsigned types for
log levels. Let's just stick to signed, because that is what glibc
generally appears to use.
While we are at it, add explicit logging for all error causes.
|
| |
|
|\
| |
| | |
Use libmount more
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This wraps a few common steps. It is defined as inline function instead of in a
.c file to avoid having a .c file. With a .c file, we would have three choices:
- either link it into libshared, but then then libshared would have to be
linked to libmount.
- or compile the .c file into each target separately. This has the disdvantage
that configuration of every target has to be updated and stuff will be compiled
multiple times anyway, which is not too different from keeping this in the
header file.
- or create a new convenience library just for this. This also has the disadvantage
that the every target would have to be updated, and a separate library for a
10 line function seems overkill.
By keeping everything in a header file, we compile this a few times, but
otherwise it's the least painful option. The compiler can optimize most of the
function away, because it knows if 'source' is set or not.
|
| |
| |
| |
| |
| |
| |
| | |
It seems better to use just a single parsing algorithm for /proc/self/mountinfo.
Also, unify the naming of variables in all places that use mnt_table_next_fs().
It makes it easier to compare the different call sites.
|
|/ |
|
| |
|
|\
| |
| | |
shutdown/killall: Show in the console the processes not yet killed
|
| | |
|
| |
| |
| |
| |
| | |
The test added in previous commit shows that libmount does the unescaping
internally.
|
|/
|
|
|
|
|
|
| |
Use a trivial header file to share mnt_free_tablep and mnt_free_iterp.
It would be nicer put this in mount-util.h, but libmount.h is not in the
default include path, and the build system would have to be adjusted to pass
pkg-config include path in various places, and it's just not worth the trouble.
A separate header file works nicely.
|
|
|
|
|
| |
This means we need to include many more headers in various files that simply
included util.h before, but it seems cleaner to do it this way.
|
|
Let's move the shutdown binary into its own subdirectory in
src/shutdown, after all it is relatively isolated from the normal PID 1
sources, being a different binary and all.
Unfortunately it's not possible to move some of the code, since it is
shared with PID 1, that I wished we could move, but I still think it's
worth it.
|