Age | Commit message (Collapse) | Author |
|
Initialisers for anonymous unions are unknown to gcc-4.5, which is still
quite widely used.
See the following build failure, reported by the Buildroot autobuilders:
http://autobuild.buildroot.org/results/11e/11ebb926b891862e270b9cb39fd2ed4344b736a8/build-end.log
This reverts commit 5cb98078479d93e25099c1cb73fa9c46aa9ccf29.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Tom Gundersen <teg@jklm.no>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
... and make path_equal() a simple wrapper around it.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This allows set_action(), read_uevent_file() and read_db() to be made internal to libudev.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
If you've got SELinux policy loaded, label_hnd is your labeling handle.
When systemd is shutting down, we free that handle via mac_selinux_finish().
But: switch_root() calls mkdir_p_label(), which tries to look up a label
using that freed handle, and so we get a bunch of garbage and eventually
SEGV in libselinux.
(This doesn't happen in the switch-root from initramfs to real root because
there's no SELinux policy loaded in initramfs, so label_hnd is NULL and we
never attempt any lookups.)
So: make sure that mac_selinux_finish() actually sets label_hnd to NULL, so
nobody tries to use it after it becomes invalid.
https://bugzilla.redhat.com/show_bug.cgi?id=1185604
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
It certainly is everywhere on Linux, but as a courtesy
to people doing some strange cross-compilation, check
that the assumption holds.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
it is ironic that
"The only purpose of this structure is to cast the structure pointer
passed in addr in order to avoid compiler warnings. See EXAMPLE below."
from bind(2)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Udev debug messages have to be significantly overhauled... For now
just downgrade those two. They are responsible for approximately 25%
of debug output during boot and are rather useless.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
The data comes from the kernel, so chances of it being
garbled are low, but for correctness' sake, add the check.
CID #996458.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Instead introduce ensure_usec_initialized(), which copies the timestamp if possible otherwise
sets it to now(CLOCK_MONOTONIC).
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
path_is_mount_point() compares the mount_id of a directory and the
mount_id of the parent directory. When following symlinks, the function
to get the parent directory does not take the symlink into account.
/bin -> /usr/bin with /usr being a mountpoint:
mount_id of /bin with AT_SYMLINK_FOLLOW != mount_id of /
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
The information in the db is stale, so it does not make sense to
expose it any longer. Also, don't drop the kernel event, but simply
pass it on to userspace without ammending it.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This will allow us to clean up the device when we are notified about the worker being killed.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This allows us to move the db reading from udevd to libudev.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Return -errno rather than -1 in case sendmsg() fails.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
We were explicitly eagerly loading the db, then deletenig the backing file and then processing the
rules/symlinks. Instead we delete the backnig db file as the last step and let the db loading be
lazy as everywhere else.
This may save us a bit of work in casese where the db is not needed, but more importantly it hides
some implementation details of libudev-device form udevd.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
To copy properties from one device to another. Drop the equivalent functionality from udevd.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This should have been committed with
udev_device_add_property - implicitly mark properties for saving to db
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Note: We also ported touch() and touch_file() from upstream. -AGB.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This should be internal to the library as it is only about reflecting the sysfs state in the udev_device.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Not terribly important, but the loop wasn't an actual loop,
making coverity unhappy.
CID #1261725.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
|
|
|
|
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
|
|
Hide the details a bit.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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).
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Build would fail when assert was used on the same line in
different files #included together.
https://bugs.freedesktop.org/show_bug.cgi?id=87339
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|