summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-11-21src/libudev/libudev.h, src/udev/udev.h: include <sys/sysmacros.h>Anthony G. Basile
<sys/sysmacros.h> is no longer implicitly pulled in via <sys/types.h> in glibc 2.24 and above. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-08-06src/shared/missing.h: fix getrandom system call number on ARM64Thomas Petazzoni
The getrandom() system call number is indeed 384 on ARM, but it is not the same on ARM64. ARM64 uses the asm-generic headers, including for system call numbers, so the getrandom() system call number on ARM64 is 278. This fixes runtime issues of eudev on ARM64, such as: Populating /dev using udev: [ 6.186817] udevd[1204]: starting version 3.1.5 [ 6.191662] udevd[1204]: syscall 384 [ 6.195217] Code: aa0503e4 aa0603e5 aa0703e6 d4000001 (b13ffc1f) [ 6.201291] CPU: 4 PID: 1204 Comm: udevd Not tainted 4.7.0+ #1 [ 6.207079] Hardware name: ARM Juno development board (r2) (DT) [ 6.212954] task: ffff800976421900 task.stack: ffff800975610000 [ 6.218825] PC is at 0xffff97f12234 [ 6.222281] LR is at 0x41b15c [ 6.225214] pc : [<0000ffff97f12234>] lr : [<000000000041b15c>] pstate: 80000000 [ 6.232544] sp : 0000ffffcf9b3870 [ 6.235828] x29: 0000ffffcf9b3870 x28: 0000000000428218 [ 6.241110] x27: 0000000000000000 x26: 000000000042a7e3 [ 6.246395] x25: 0000ffffcf9b39c8 x24: 0000000000428000 [ 6.251670] x23: 0000000000449000 x22: 0000000000449678 [ 6.256946] x21: 0000000000000010 x20: 0000000000449000 [ 6.262233] x19: 0000000000449678 x18: 0000000000000000 [ 6.267507] x17: 0000ffff97f12210 x16: 0000000000449440 [ 6.272779] x15: 0000ffff97e4f730 x14: 0000ffff98050cb8 [ 6.278060] x13: 000000000000033c x12: 00000000000004b4 [ 6.283331] x11: 0000000000000000 x10: 0101010101010101 [ 6.288604] x9 : 0000000000001010 x8 : 0000000000000180 [ 6.293882] x7 : ffffffffffffffff x6 : ffffffffffffffff [ 6.299154] x5 : 00000000271e36c0 x4 : 0007061c00190d07 [ 6.304426] x3 : 00000000271e36d0 x2 : 0000000000000001 [ 6.309705] x1 : 0000000000000010 x0 : 0000000000449678 [ 6.314976] [ 6.398734] sky2 0000:08:00.0 enp8s0: renamed from eth0 Reported-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-05-31udevd: remove unnecessary cgroups handlingMurray Calavera
Signed-off-by: Murray Calavera <murray.calavera@gmail.com> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-04-24shared: remove unused file `exit-status`Murray Calavera
Signed-off-by: Murray Calavera <murray.calavera@gmail.com> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-04-24shared: remove unused function `execute_command`Murray Calavera
Signed-off-by: Murray Calavera <murray.calavera@gmail.com> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-03-21src/shared/util.c: fix typoAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-03-21src/shared/util.c: add fallback for ppoll(), issue #129.Anthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-11-22src/udev/udevd.c: add eudev startup message for kmsgRichard Narron
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-09-25Forward-ported network rule-generator code from eudev-1.10eudev/v3.1.4Ian Stakenvicius
2015-09-11Revert "udevd: warn if we receive SIGCHLD from untracked worker"eudev/v3.1.3Anthony G. Basile
This reverts commit 75e930ed64b62ac7e684cbe3493963371904d55b. This fixes issue #121. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-09-11Merge pull request #122 from RomainNaour/musl-fixesblueness
Musl fixes
2015-09-08Add missing space between filename and error messageRobert C. Sheets
2015-07-31build-sys: check for strndupaRomain Naour
strndupa is a GNU extension, therefore it's not available for all libc libraries (musl). This patch is based on the one proposed by Emil Renner Berthing for systemd [1]. [1] http://lists.freedesktop.org/archives/systemd-devel/2014-September/023190.html Signed-off-by: Romain Naour <romain.naour@openwide.fr>
2015-07-31build-sys: check for mallinfoRomain Naour
mallinfo is not specified by POSIX or the C standards, therefore it's not available for all libc libraries (musl). Add the ability to disable mallinfo statistics. Fixes: selinux-util.c: In function ‘mac_selinux_init’: selinux-util.c:70:25: error: storage size of ‘before_mallinfo’ isn’t known struct mallinfo before_mallinfo, after_mallinfo; Signed-off-by: Romain Naour <romain.naour@openwide.fr>
2015-07-20udevd: don't unref worker objects on SIGSTOP/SIGCONTTom Gundersen
We should not be receiving these anyway, but let's be correct. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20udevd: warn if we receive SIGCHLD from untracked workerTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20libudev: fix commit 3df6350Anthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20libudev: monitor - set nl_pid when reusing fd in ↵Tom Gundersen
udev_monitor_new_from_netlink_fd This allows a fd to be created and configured as part of one monitor, to be passed in to create a second monitor without having to redo any of the configuration. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20sd-device: get_subsystem - don't complain if a device does not have a subsystemTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20src/gudev: remove Gobject libudev support.Anthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20It's moved to the iio-sensor-proxy D-Bus service.Bastien Nocera
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-18Rename mkdir_p -> udev_mkdir_p to avoid symbol collisions.Anthony G. Basile
While usptream doesn't support a static libudev.a, we will try to do so. However, mkdir_p() is used in lvm2 and util-linux, so to avoid the collision, we rename it to udev_mkdir_p(). See: https://bugs.gentoo.org/show_bug.cgi?id=520450 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-18udevd: fix REMOVE handlingChris Clayton
The original upstream commit is at http://cgit.freedesktop.org/systemd/systemd/commit/?id=107f2e2526d476c6cc9b81a690391c111027d641 This was reworked by Chris Clayton for eudev. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-18Revert "udev: don't close std{in,out,err}"Anthony G. Basile
This reverts commit b2399d9b7222abe7db8ab4bc16e0efe3ccae4c42. This solves issue #108. While upstream also reverted this commit, they did so using functions in terminal-util.c. We could import that file and those functions but for such a small commit, its not worth it. We may do so at some future time if there are further gains. See: https://github.com/systemd/systemd/commit/40e749b59ba49fb97c1f45859debe2a82bc9c9ef Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-30configure.ac: bump udev to 220 and eudev to 3.1Anthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-29random-util.c: remove <sys/auxv.h> missing in uClibcAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-29src/shared/missing.h: O_PATH and AT_EMPTY_PATH missing in uClibc's <fcntl.h>Anthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27src/shared/util.h: update qsort_safe() for muslAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27udev/net_id: Only read the first 64 bytes of PCI config spaceJason S. McMullan
The original code used fread(), which on some libc implementions (ie glibc 2.17) would pre-read a full 4K (PAGE_SIZE) of the PCI config space, when only 64 bytes were requested. I have recently come across PCIe hardware which responds with Completion Timeouts when accesses above 256 bytes are attempted. This can cause server systems with GHES/AEPI support to cause and immediate kernel panic due to the failed PCI transaction. This change replaces the buffered fread() with an explict unbuffered read() of 64 bytes, which corrects this issue by only reading the guaranteed first 64 bytes of PCIe config space. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27src/shared/path-util.c: import prefix_root() from upstreamAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27nspawn: finish user namespace supportLennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27udevd: main - use _exit() when daemonizingTom Gundersen
Makes it a bit clearer what is going on, rather than jumping to the end of main(). No functional change. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27ata_id: drop spurious spaceLennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27udevd: on_worker - distinguish between EINTR and EAGAINTom Gundersen
EAGAIN means there are no more messages to read, so give up. EINTR means we got interrupted reading a message, so try again. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27src/shared/util.h: import loop_write() from upstreamAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27udevd: worker - use loop_write() rather than send()Tom Gundersen
When notifying the main daemon about event completion, make sure the message is sent successfully, and not interrupted. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27udev-ctrl: make _unref() always return NULLTom Gundersen
Bring this in line with the rest of the codebase. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26udevd: remove stale commentTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26udevd: explicitly update queue file before answering to pingTom Gundersen
This avoids updating the flag files twice for every loop, and also removes another dependency in the main-loop, so we are freer to reshufle it as we want. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26udevd: make udev_ctrl_connection globalTom Gundersen
This allows us to simplify the ctrl_msg handler. Eventually all this global state should move to a Manager object or so. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26treewide: Correct typos and spell plural of bus consistentTorstein Husebø
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26udevd: remove unused functionThomas Hindoe Paaboel Andersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26udevd: don't explicitly count the number of workersTom Gundersen
Simply query the size of the hashmap keeping all the worker contexts instead. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26udevd: keep workers in a hashmap rather than a listTom Gundersen
This makes the code somewhat more readable. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26udevd: worker - drop reference countingTom Gundersen
Make the worker context have the same life-span as the worker process. It is created on fork() and free'd on SIGCHLD. The change means that we can get worker_returned() for a worker context that is no longer around, this is not a problem and we can just drop the message. The only use for worker_returned() is to know to reschedule events to workers that are still around, so if the worker has already exited it is not important to keep track of. We still print a debug statement in this case to be on the safe side. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26udev: fix weird coding-styleDavid Herrmann
Eeeew! Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26udevd: worker - allow passing NULL to worker_unref()Tom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26udevd: worker - use _exit() rather than exit()Tom Gundersen
Follow the coding style and avoid the exit handlers. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26src/shared/util.[ch]: import functions from upstream for previous commitsAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26udevd: modernize error handlingTom Gundersen
We never return magic exit codes, but just EXIT_FAILUER or EXIT_SUCCESS. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>