Age | Commit message (Collapse) | Author |
|
Properties should only be saved to the db when added to the udev_device by udevd, and only if
the property does not start with a '.'. Make this implicit rather than expose the marking of
properties.
|
|
This should be internal to the library as it is only about reflecting the sysfs state in the udev_device.
|
|
This essentially replaces
open("/run/udev/queue", O_WRONLY|O_CREAT|O_CLOEXEC|O_TRUNC|O_NOFOLLOW, 0444)
with
open("/run/udev/queue", O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, 0644),
which is ok for our purposes.
|
|
|
|
|
|
|
|
The udev-settle guarantees that udevd is no longer processing any of the
events casued by udev-trigger. The way this works is that it sends a
synchronous PING to udevd after udev-trigger has ran, and when that returns
it knows that udevd has started processing the events from udev-trigger.
udev-settle will then wait for the event queue to empty before returning.
However, there was a race here, as we would only update the /run state at
the beginning of the event loop, before reading out new events and before
processing the ping.
That means that if the first uevent arrived in the same event-loop iteration
as the PING, we would return the ping before updating the queue state in /run
(which would happen on the next iteration).
The race window here is tiny (as the /run state would probably get updated
before udev-settle got a chance to read /run), but still a possibility.
Fix the problem by updating the /run state as the last step before returning
the PING.
We must still update it at the beginning of the loop as well, otherwise we
risk being stuck in poll() with a stale state in /run.
Reported-by: Daniel Drake <drake@endlessm.com>
|
|
Not terribly important, but the loop wasn't an actual loop,
making coverity unhappy.
CID #1261725.
|
|
Everything that is generated can be assumed to belong to CLEANFILES,
which means that the original file has to be in EXTRA_DIST. Simplify
the rules by generating as in $subject.
We have less lists to adjust manually, and 'make clean' actually
removes more stuff that before.
|
|
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use.
|
|
The call iterates through cmsg list and closes all fds passed via
SCM_RIGHTS.
This patch also ensures the call is used wherever appropriate, where we
might get spurious fds sent and we should better close them, then leave
them lying around.
|
|
include-what-you-use automatically does this and it makes finding
unnecessary harder to spot. The only content of poll.h is a include
of sys/poll.h so should be harmless.
|
|
This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656.
It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw
sockets.
|
|
Signed-off-by: Robert Milasan <rmilasan@suse.com>
|
|
Match{Name,OrginalName,Type,Driver,Path} can now take a space-separated glob of matches.
|
|
|
|
|
|
After all it is now much more like strjoin() than strappend(). At the
same time, add support for NULL sentinels, even if they are normally not
necessary.
|
|
Stay uniform and use 'dev' rather than 'event->dev', as these are aliases (and event->dev looks
like it may be a typo for event->dev_db).
|
|
|
|
This is not exposed in the public API. We want to simplify the internal libudev-device API as much as possible
so that it will be simpler to rip the whole thing out in the future.
|
|
|
|
Types used for pids and uids in various interfaces are unpredictable.
Too bad.
|
|
There is no reason to keep both separated. We want to avoid API specific
tools and instead keep generic terms like 'input'.
|
|
Make sure we properly validate the return value of
udev_device_get_sysattr_value(). It might be NULL for several reasons.
|
|
|
|
Not all of the link_config struct was getting freed.
|
|
This rule is only run on tablet/touchscreen devices, and extracts their size
in millimeters, as it can be found out through their struct input_absinfo.
The first usecase is exporting device size from tablets/touchscreens. This
may be useful to separate policy and application at the time of mapping
these devices to the available outputs in windowing environments that don't
offer that information as readily (eg. Wayland). This way the compositor can
stay deterministic, and the mix-and-match heuristics are performed outside.
Conceivably, size/resolution information can be changed through EVIOCSABS
anywhere else, but we're only interested in values prior to any calibration,
this rule is thus only run on "add", and no tracking of changes is performed.
This should only remain a problem if calibration were automatically applied
by an earlier udev rule (read: don't).
v2: Folded rationale into commit log, made a builtin, set properties
on device nodes themselves
v3: Use inline function instead of macro for mm. size calculation,
use DECIMAL_STR_MAX, other code style issues
v4: Made rule more selective
v5: Minor style issues, renamed to a more generic builtin, refined
rule further.
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1178051
|
|
|
|
various other tools
|
|
|
|
|
|
|
|
|
|
src/udev/ata_id/ata_id.c:503:24: warning: assignment from incompatible pointer type
identify_words = &identify.wyde;
^
|
|
|
|
|
|
There is alot of cleanup that will have to happen to turn on
-fstrict-aliasing, but I think our code should be "correct" to the rule.
|
|
This pulls out the hwdb managment from udevadm into an independent tool.
The old code is left in place for backwards compatibility, and easy of
testing, but all documentation is dropped to encourage use of the new
tool instead.
|
|
|
|
|
|
|
|
Bump libblkid requirement from 2.20 to 2.24.
util-linux 2.25 is actually required since fdbbad981cc5da8bb4ed7e9b6646e7a114745ec5
|
|
|
|
|
|
|
|
|
|
Let's add some syntactic sugar for iterating through inotify events, and
use it everywhere.
|
|
|