| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-1 was used everywhere, but -EBADF or -EBADFD started being used in various
places. Let's make things consistent in the new style.
Note that there are two candidates:
EBADF 9 Bad file descriptor
EBADFD 77 File descriptor in bad state
Since we're initializating the fd, we're just assigning a value that means
"no fd yet", so it's just a bad file descriptor, and the first errno fits
better. If instead we had a valid file descriptor that became invalid because
of some operation or state change, the other errno would fit better.
In some places, initialization is dropped if unnecessary.
|
|
|
|
| |
homed LUKS directories
|
|
|
|
|
|
| |
RUN_WITH_UMASK was initially conceived for spawning externals progs with the
umask set. But nowadays we use it various syscalls and stuff that doesn't "run"
anything, so the "RUN_" prefix has outlived its usefulness.
|
| |
|
| |
|
|
|
|
|
|
| |
libblkid really should define an enum for this on its own, but it
currently doesn't and returns literal numeric values. Lets make this
more readable by adding our own symbolic names via an enum.
|
| |
|
|
|
|
| |
just some refactoring to make things simpler.
|
|
|
|
|
| |
We do the same thing over and over again and it's a bit ugly, hence
let's unify the code for it at one common place.
|
| |
|
|
|
|
|
|
|
| |
Instead of having fopen_temporary() create the file either next
to an existing file or in tmp/, let's split this up clearly into
two different functions, one for creating temporary files next to
existing files, and one for creating a temporary file in a directory.
|
| |
|
| |
|
|
|
|
|
|
| |
The name "def.h" originates from before the rule of "no needless abbreviations"
was established. Let's rename the file to clarify that it contains a collection
of various semi-related constants.
|
| |
|
| |
|
|\
| |
| | |
Erradicate strerror
|
| |
| |
| |
| |
| |
| |
| | |
The message in acquire_home() was looking at the wrong variable
('r' instead of 'acquired_fd').
Apart from that, no change in behaviour is intended.
|
| |
| |
| |
| | |
Like in the previous commit, the return code on error might be changed.
|
| | |
|
| |
| |
| |
| |
| | |
We check the same list of error codes on various xattr operations, and
we should on some more. Add a common helper for this purpose.
|
|/ |
|
|\
| |
| | |
blockdev-util: introduce block_device_new_from_fd() and _path()
|
| |
| |
| |
| | |
No functional changes, just preparation for later commits.
|
|/
|
|
|
|
|
|
|
|
|
| |
This is useful for systems which don't have any fsck.
We already skip emitting the fsck dependency when the fsck.$fstype helper
is missing, but fstab-generator doesn't necessarily know the fstype when
handling the root= parameter.
Previously, systemd-fsck was started for these mounts and then exited
immediately because it couldn't find the fsck.$fstype helper.
|
|\
| |
| | |
Expose various GPT UUIDs as public contants and link them up in docs
|
| |
| |
| |
| |
| |
| | |
I think those constants are generally useful. It's quite easy to make a mistake
when copying things from the docs, so let's make them easy and convenient to
access.
|
| |
| |
| |
| |
| | |
The caveat is that the caller has to provide a source directory
to initialize the squashfs filesystem from.
|
|/
|
|
|
|
|
|
| |
We have free_and_replace() and friends, they are all named with lower
letters, even they are macros, not functions.
For consistency, let's rename CLOSE_AND_REPLACE() with lower letters.
This also mekes the macro used more places.
|
| |
|
|
|
|
|
|
| |
Let's put some time-limit on it.
Fixes: #22901
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let's rework how we lock loopback block devices in two ways:
1. Lock a separate fd, instead of the main block device fd. We already
did that for our internal locking when allocating loopback block
devices, but do so for the exposed locking (i.e.
loop_device_flock()), too, so that the lock is independent of the
main fd we actually use of IO.
2. Instead of locking the device during allocation of the loopback
device, then unlocking it (which will make udev run), and then
re-locking things if we need, let's instead just keep the lock the
whole time, to make things a bit safer and faster, and not have to
wait for udev at all. This is done by adding a "lock_op" parameter to
loop device allocation functions that declares the initial state of
the lock, and is one of LOCK_UN/LOCK_SH/LOCK_EX. This change also
shortens a lot of code, since we allocate + immediately lock loopback
devices pretty much everywhere.
|
|
|
|
| |
gcc will complain about all these with -Wformat-signedness.
|
|
|
|
|
| |
This doesn't really change anything, since we know the stat data used
here also contains S_IFBLK, but it's frickin' confusing.
|
|
|
|
| |
Fixes #24465.
|
| |
|
|
|
|
| |
Fixes #24117.
|
|
|
|
| |
Fixes #24114.
|
|
|
|
|
|
|
| |
https://www.kernel.org/ links to https://docs.kernel.org/ for the documentation.
See https://git.kernel.org/pub/scm/docs/kernel/website.git/commit/?id=ebc1c372850f249dd143c6d942e66c88ec610520
These URLs are shorter and nicer looking.
|
|\
| |
| | |
tree-wide: use html links for kernel docs
|
| |
| |
| |
| | |
Instead of using "*.txt" as reference name, use the actual destination title.
|
|\ \
| |/
|/| |
sd-id128: avoid an unnecessary function call in inline helper
|
| |
| |
| |
| |
| |
| | |
gcc was warning that found_fs_uuid was used unitialized. The issue stemmed from
the call to open(), where gcc seemingly didn't know that errno must be negative.
When that is set, we can drop some unnecessary initializations without warnings.
|
| |
| |
| |
| |
| |
| |
| |
| | |
We find this function useful in our code, so no reason not to export it.
I changed the order of last two words in the name to match the arguments.
(With "equal_string" I expected sd_id128_t first, string second, but in
actual use, the second argument is usually a long constant so it's nice
to keep this order of arguments.)
|
|\ \
| | |
| | | |
Allow ASCII fallback for Unicode characters in logs
|
| | | |
|
| |/ |
|
|/
|
|
| |
grep -l -r http:// | xargs sed -E -i s'#http://(.*).freedesktop.org#https://\1.freedesktop.org#'
|
|
|
|
|
|
|
| |
Fixes: CID#1469711
CID 1469711 (#1 of 1): Uninitialized scalar variable (UNINIT)
14. uninit_use: Using uninitialized value we_detached.
|