Age | Commit message (Collapse) | Author |
|
Boolean arithmetic is great, use it!
if (a && !b)
return 1;
if (!a && b)
return -1,
is equivalent to
if (a != b)
return a - b;
Furthermore:
r = false;
if (condition)
r = true;
is equivalent to:
r = condition;
|
|
sd_device_new_from_* now returns -ENODEV when the device does not exist, and the enumerator
silently drops these errors as missing devices is exepected.
|
|
It is still possible to include uninitialized ones, but now that is opt-in. In most
cases people only want initialized devices. Exception is if you want to work without
udev running.
Suggested by David Herrmann.
|
|
This is rarely, if ever, used. Drop it from the new public API and only keep it for
the legacy API.
Suggested by David Herrmann.
|
|
|
|
|
|
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.
|
|
|
|
The key was parsed properly, but the warning was still generated.
|
|
Fix for 4beac74e69.
Thanks, Ronny!
|
|
When selinux calls our callback with a log message, it specifies the
type as AVC or INFO/WARNING/ERROR. The question is how to map this to
audit types and/or log priorities. SELINUX_AVC maps to AUDIT_USER_AVC
reasonably, but for the other messages we have no idea, hence we use
AUDIT_USER_AVC for everything. When not using audit logging, we can
map those selinux levels to LOG_INFO/WARNING/ERROR etc.
Also update comment which was not valid anymore in light of journald
sucking in audit logs, and was actually wrong from the beginning —
libselinux uses the callback for everything, not just avcs.
This stemmed out of https://bugzilla.redhat.com/show_bug.cgi?id=1195330,
but does not solve it.
|
|
We actually only use the journal when showing status. Move setrlimit call
so it is only called for status.
https://bugzilla.redhat.com/show_bug.cgi?id=1184712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=89885
|
|
The Trust TB7300 (relabelled Waltop?) tablet has a scrollwheel which shows
up as a /dev/input/event# node all by itself. Currently input_id does not
set any ID_INPUT_FOO attr on this causing it it to not be recognized by
Xorg / libinput.
This commit fixes this by marking it with ID_INPUT_KEY.
Reported-by: Sjoerd Timmer <themba@randomdata.nl>
|
|
Make test_pointer / test_keys return a boolean indicating whether or not
they've set any properties on the device.
|
|
Remove whitespaces before opening parentheses, mostly before test_bit.
|
|
shuts up valgrind/sanitizers
|
|
Add the +C file attribute (NOCOW) to the journal directories, so that
the flag is inherited automatically for new journal files created in
them. The journal write pattern is problematic on btrfs file systems as
it results in badly fragmented files when copy-on-write (COW) is used:
the performances decreases substantially over time.
To avoid this issue, this tmpfile.d snippet sets the NOCOW attribute to
the journal files directories, so newly created journal files inherit
the NCOOW attribute that disables copy-on-write.
Be aware that the NOCOW file attribute also disables btrfs checksumming
for these files, and thus prevents btrfs from rebuilding corrupted files
on a RAID filesystem.
In a single disk filesystems (or filesystems without redundancy) it is
safe to use the NOCOW flags without drawbacks, since the journal files
contain their own checksumming.
|
|
|
|
|
|
|
|
|
|
Generally, we will not follow symlinks, except for "w".
Avoid documentation for now for fifo, device node, directory lines,
which currently follow symlinks but better shouldn't.
|
|
access modes or ownership
|
|
It does not generate a release event.
https://launchpad.net/bugs/1441849
|
|
CID #996297.
|
|
This shouldn't really fail and anyway not much we can do about it.
CID #996292, #996294, #996295.
|
|
CID #996284.
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=89989
|
|
|
|
|
|
This code appears to follow the following convention:
- all errors are logged at point of origin
- oom errors abort execution, non-oom errors are logged but
execution continues.
Make sure all ooms result in a log message, and remove warning which could
not be reached. Downgrade non-fatal errors to warnings.
|
|
No functional change intended. Just splitting this out to make
it easier to edit in the future.
|
|
compuler figure that out...
|
|
|
|
A stateless system has a tmpfs as root file system. That obviously
does not have any block device associated with it. So try falling back
to the device of the /usr filesystem if the root filesystem fails.
|
|
Just a couple of trivial oversights.
|
|
/boot does not exist on a stateless system, so do not get
confused by that.
|
|
We are talking about one member of a group of things (resource limits, signals,
timeouts), without specifying which one. An indenfinite article is in order.
When we are talking about the control process, it's a specific one, so the
definite article is used.
|
|
Followup for 7a03974a6f.
|
|
- No need to add "Error, " prefix, we already have that as metadata.
- Also use double quotes for path names, as in most other places.
- Remove stray newline at end of message.
- Downgrade error messages after which we continue to warnings.
|
|
Fixup for 51c0c2869845a058268d54c3111d55d0dd485704.
|