summaryrefslogtreecommitdiff
path: root/src/udev
AgeCommit message (Collapse)Author
2015-05-21nspawn: finish user namespace supportLennart Poettering
2015-05-21udev: link-config - fix corruptionTom Gundersen
The parser used for MTU and Speed expects them to be size_t, not unsigned int. This caused a corruption in the rest of the structure. Reported by David O Neill <david.m.oneill@intel.com>.
2015-05-18udevd: 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.
2015-05-18udevd: main - reshuffleTom Gundersen
First parse config, then sanitize environment before donig any further setup. No functional change.
2015-05-18udevd: rename on_reque_{exit,reload} to on_sig{term,chld}Tom Gundersen
No functional change.
2015-05-18udevd: introduce on_event_timeout{,_warning}Tom Gundersen
This uses kill_and_sigcont() instead of kill(), otherwise no functional change.
2015-05-18udevd: process all SIGCHLD events every time the handler is invokedTom Gundersen
We were returning rather than continuing in some cases. The intention was always to fully process all pending events before returning from the SIGCHLD handler. Restore this behaviour.
2015-05-18udevd: init/exit the builtins in manager_new/freeTom Gundersen
No functional change.
2015-05-18udevd: move file descriptors to ManagerTom Gundersen
No functional change.
2015-05-18ata_id: drop spurious spaceLennart Poettering
2015-05-16udevd: queue - update queue state when events are queued/freedTom Gundersen
This way it is more obvious that the queue flag file is always up-to-date. Moreover, we only have to touch/unlink it when the first/last event is allocated/freed.
2015-05-16udevd: 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.
2015-05-16udevd: 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.
2015-05-16udevd: net - fix leak in .link configTom Gundersen
Path, Driver and Type are now strv rather than strings, so free them properly.
2015-05-15udev-ctrl: make _unref() always return NULLTom Gundersen
Bring this in line with the rest of the codebase.
2015-05-12udevd: manager - move a few global variables into the Manager objectTom Gundersen
2015-05-12udevd: pass a Manager objcet to event handlersTom Gundersen
Stop relying on global variables in event handlers, and move them all to a Manager object instead.
2015-05-12udevd: remove stale commentTom Gundersen
2015-05-12udevd: 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.
2015-05-12udevd: explicitly read out uevents we create ourselvesTom Gundersen
Rather than skippling ctrl handling whenever we have handlede inotify events (and hence may have synthesized a 'change' event), just call the uevent handling explicitly from on_inotify() so that the event queue is up-to-date.
2015-05-12udevd: move to sd-event-style event handlersTom Gundersen
2015-05-12udevd: 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.
2015-05-11treewide: Correct typos and spell plural of bus consistentTorstein Husebø
2015-05-07udevd: remove unused functionThomas Hindoe Paaboel Andersen
2015-05-06udevd: don't explicitly count the number of workersTom Gundersen
Simply query the size of the hashmap keeping all the worker contexts instead.
2015-05-06udevd: keep workers in a hashmap rather than a listTom Gundersen
This makes the code somewhat more readable.
2015-05-06udevd: 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.
2015-05-06udev: fix weird coding-styleDavid Herrmann
Eeeew!
2015-05-06udevd: worker - allow passing NULL to worker_unref()Tom Gundersen
2015-05-06udevd: worker - use _exit() rather than exit()Tom Gundersen
Follow the coding style and avoid the exit handlers.
2015-05-06udevd: modernize error handlingTom Gundersen
We never return magic exit codes, but just EXIT_FAILUER or EXIT_SUCCESS.
2015-05-06udevd: use kernel cmdline parserTom Gundersen
2015-05-06udevd: worker - move some fields from the worker to the eventTom Gundersen
2015-05-06udevd: worker - introduce worker_attach_event()Tom Gundersen
2015-05-06udevd: worker - make refcounting clearerTom Gundersen
Take and drop explicit references where it makes sense.
2015-05-06udevd: worker - only allocate the worker struct in the main processTom Gundersen
This is not used in the worker, so avoid having to free it there.
2015-05-06udevd: rename worker_new() to worker_spawn()Tom Gundersen
2015-05-06udevd: don't track worker exitcodeTom Gundersen
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.
2015-05-06udev: fix coding styleSusant Sahani
2015-04-24udevd: worker - log if worker result cannot be sentTom Gundersen
If the main daemon is not notified about a worker finishing an event the refcounting of the worker struct will be wrong, and we will lose track of the number of children we have to wait for. This should not happen, but if it does we better complain loudly about it. Worst case udev will wait for 30 seconsd at shutdown waiting for nonexistent workers.
2015-04-24udevd: worker - warn if unknown worker returnsTom Gundersen
2015-04-24udevd: worker - let the kernel attach the sender pidTom Gundersen
No need to include this explicitly, just use SCM_CREDENTIALS.
2015-04-24udevd: don't unref worker objects on SIGSTOP/SIGCONTTom Gundersen
We should not be receiving these anyway, but let's be correct.
2015-04-24udevd: warn if we receive SIGCHLD from untracked workerTom Gundersen
2015-04-24udevd: improve logging in SIGCHLD handlingTom Gundersen
Remove some redundant logging, and reduce the log-level in most cases. The only case that is really critical is if a worker failed while hanlding an event, so keep that at error level.
2015-04-23udevd: fix REMOVE handlingTom Gundersen
This reverts b67f944. Lazy loading of device properties does not work for devices that are received over netlink, as these are sealed. Reinstate the unconditional loading of the device db. Reported by: Mantas Mikulėnas <grawity@gmail.com>.
2015-04-23udev: event - update tags before writing out dbTom Gundersen
The old tags are read from the db when deciding which tags to clear, make sure we don't write out the new db before the old one has been read.
2015-04-22udev: Fix ping timeout when settle timeout is 0Nir Soffer
When running udevadm settle --timeout=0, the ping always times out, and udevadm will return 0 without checking the queue state. (David: Use a reasonable timeout to still get the barrier provided by ctrl-ping)
2015-04-21udevadm: enclose invocation of unlinkat() with a (void) castLennart Poettering
Let's make Coverity happy about this one.
2015-04-21udev: keyboard-builtin: Add support for setting IBM trackpoint sensitivityHans de Goede
IBM / Lenovo trackpoints allow specifying a sensitivity setting through a ps/2 command, which changes the range of the deltas sent when using the trackpoint. On some models with normal usage only deltas of 1 or 2 are send, resulting in there only being 2 mouse cursor movement speeds, rather than the expected fluid scale. Changing the sensitivity to a higher level than the bootup default fixes this. This commit adds support for setting a POINTINGSTICK_SENSITIVITY value in hwdb to allow changing the sensitivity on boot through udev / hwdb.