summaryrefslogtreecommitdiffstats
path: root/uevent
Commit message (Collapse)AuthorAgeFilesLines
* uevent: Allow multiple uevent listeners from the same processDiogo Ferreira2015-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The netlink socket created by uevent_init sets the nl_pid to the current PID. nl_pid must be unique per-process, however it does not have to do with the PID. From the documentation: " For a user-space process, nl_pid is usually the PID of the process owning the destination socket. However, nl_pid identifies a netlink socket, not a process. If a process owns several netlink sockets, then nl_pid can be equal to the process ID only for at most one socket. " In use cases where a single process calls uevent_init more than one time, the second one will always fail. This patch sets the nl_pid to 0, which lets the kernel pick its own unique identifier as per the documentation: " If the application sets it to 0, the kernel takes care of assigning it. The kernel assigns the process ID to the first netlink socket the process opens and assigns a unique nl_pid to every netlink socket that the process subsequently creates. " The behavior stays the same for the first socket but will also succeed in subsequent calls. Change-Id: I6fa74adc9d5835ff39b86187799998111fc12001 (cherry picked from commit 6dcd02055aaa2ce1e7132d5886557a7a5be6571f)
* Add missing <malloc.h> include.Elliott Hughes2015-01-291-0/+1
| | | | Change-Id: Ia5c6a5f00ed67488746b2ca85aa21f2ebfee510e
* fix a typo in uevent_next_eventiMathias Agopian2012-10-011-1/+1
| | | | | Bug: 7114973 Change-Id: I15a4c714b59aeb1d02db00517d70b5f0e5ab22c2
* uevent: add helper to get uevent FDErik Gilling2011-09-081-0/+5
| | | | | | | This allows users of the library to handle thier own poll loop. Change-Id: Id3fe2be442c0ca29c74253f9f36e9377278780e4 Signed-off-by: Erik Gilling <konkers@android.com>
* Remove the simulator target from all makefiles.Jeff Brown2011-07-112-37/+0
| | | | | | Bug: 5010576 Change-Id: I77e0620f7543926b5def7666c02d99565f6487ed
* add native uevent handlingErik Gilling2010-10-201-0/+53
| | | | Change-Id: I2315f5638668ab802a4b3c723afd97b7edf0c695
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-033-0/+118
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-033-118/+0
|
* auto import from //branches/cupcake/...@126645The Android Open Source Project2009-01-153-0/+118