Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
Update project URL in README
|
|
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>
|
|
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>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
builtins in manager_new/free'
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>
|
|
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>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
Bring this in line with the rest of the codebase.
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 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>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Simply query the size of the hashmap keeping all the worker contexts instead.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This makes the code somewhat more readable.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
Eeeew!
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Follow the coding style and avoid the exit handlers.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
We never return magic exit codes, but just EXIT_FAILUER or EXIT_SUCCESS.
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>
|
|
Take and drop explicit references where it makes sense.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This is not used in the worker, so avoid having to free it there.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
We used to use this to track failed events so they could be retriggered,
but that is no longer done, so the code can be dropped.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=90540
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|