Age | Commit message (Collapse) | Author |
|
|
|
the other log functions
|
|
|
|
|
|
This should not be used for any new code, as we don't set errno in new code,
but there are several legacy users, so let's keep it in shared.
|
|
|
|
This is like bus_label_unescape() but takes a maximum length instead of
relying on NULL-terminated strings. This is highly useful to unescape
labels that are not at the end of a path.
|
|
We _always_ return NULL from destructors to allow direct assignments to
the variable holding the object. Especially on hashmaps, which treat NULL
as empty hashmap, this is pretty neat.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
No need to ifdef out efi code as the functions are always defined.
|
|
systemctl and logind were unconditionally using functions that were not compiled
on non-EFI systems. Add stubs returning -EOPNOTSUPP to fix compile again.
|
|
There was a bug where is_efi_*() could return a negative error value, which would be treated as 'true',
just make this a bool in the helper library to avoid the problem.
|
|
|
|
|
|
|
|
path was used for 2 purposes but it was not freed before being reused.
|
|
|
|
|
|
literals
We simply recode them in utf8.
|
|
|
|
|
|
inclusion
If necessary the passed string is enclosed in "", and all special
characters escapes.
This also ports over usage in bus-util.c and job.c to use this, instead
of a incorrect local implementation that forgets to properly escape.
|
|
|
|
OrderedSet implements a Set-like structure, but maintains insertion
ordered. It is hence to Set what OrderedHashmap is for Hashmap.
Internally, this is only a wrapper around OrderedHashmap for now, but
this could one day be improved and be added to hashmap.c natively.
|
|
Fixes second systemd compilation problem against Linux 3.12 uapi
headers.
IFA_F_NOPREFIXROUTE is a usual #define appeared in Linux 3.14, so
AC_CHECK_DECLS is not necessary.
|
|
|
|
|
|
|
|
|
|
Change cunescape() to return a normal error code, so that we can
distuingish OOM errors from parse errors.
This also adds a flags parameter to control whether "relaxed" or normal
parsing shall be done. If set no parse failures are generated, and the
only reason why cunescape() can fail is OOM.
|
|
input_id already (tries to) tag accelerometers as such, but this only works
for absolute accelerometers. Recent kernels mark accelerometers through an
input prop. Trust that prop and always tag devices with it with
ID_INPUT_ACCELEROMETER.
Note that detection by the prop bit works the same as the existing detection
and will ensure that no other tags get set on the device.
|
|
Also referred to as trackpoint, trackstick. These are marked by recent kernels
through an input prop. Forward that prop as udev property so userspace can
easily determine whether there is a pointing stick present.
These devices were previously marked as ID_INPUT_MOUSE, for backwards
compatibility we keep that in place, the new property is an addition.
|
|
|
|
|
|
|
|
|
|
|
|
There's no reason to eat up ENOENT, it should be OK to simply report the
error back.
|
|
|
|
|
|
mount point
|
|
|
|
- Move to its own file rm-rf.c
- Change parameters into a single flags parameter
- Remove "honour sticky" logic, it's unused these days
|
|
|
|
QEMU/KVM guests do not have hypervisor nodes, but they do have
fw-cfg nodes (since qemu v2.3.0-rc0). fw-cfg nodes are documented,
see kernel doc Documentation/devicetree/bindings/arm/fw-cfg.txt,
and therefore we should be able to rely on it in this detection.
Unfortunately, we currently don't have enough information in the
DT, or elsewhere, to determine if we're using KVM acceleration
with QEMU or not, so we can only report 'qemu' at this time, even
if KVM is in use. This shouldn't really matter in practice though,
because if detect-virt is used interactively it will be clear to
the user whether or not KVM acceleration is present by the overall
speed of the guest. If used by a script, then the script's behavior
should not change whether it's 'qemu' or 'kvm'. QEMU emulated
guests and QEMU/KVM guests of the same type should behave
identically, only the speed at which they run should differ.
|