summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-monitor.c
AgeCommit message (Collapse)Author
2015-04-01libudev: monitor - improve loggingTom Gundersen
2015-03-15libudev-monitor: use initializationZbigniew Jędrzejewski-Szmek
2015-03-12libudev: monitor - fix error path in send_deviceTom Gundersen
Return -errno rather than -1 in case sendmsg() fails.
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-02-12include <poll.h> instead of <sys/poll.h>Thomas Hindoe Paaboel Andersen
include-what-you-use automatically does this and it makes finding unnecessary harder to spot. The only content of poll.h is a include of sys/poll.h so should be harmless.
2015-02-12Revert "tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC"Lennart Poettering
This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656. It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw sockets.
2015-02-10tree-wide: Always use recvmsg with MSG_CMSG_CLOEXECCristian Rodríguez
2015-01-26libudev: monitor - move nulstr parsing to libudev-deviceTom Gundersen
Hide the details a bit.
2015-01-22Assorted format fixesZbigniew Jędrzejewski-Szmek
Types used for pids and uids in various interfaces are unpredictable. Too bad.
2015-01-18Add initialization helper for file_handle_unionZbigniew Jędrzejewski-Szmek
2015-01-18libudev: fix check for too long packetTopi Miettinen
Don't use recvmsg(2) return value to check for too long packets (it doesn't work) but MSG_TRUNC flag. (David: add parantheses around condition)
2014-12-25libudev: fix strict aliasing violationShawn Paul Landden
2014-11-28treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt
If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
2014-11-28treewide: drop unnecessary trailing \n in log_*() callsMichal Schmidt
2014-11-13udev: switch to systemd logging functionsKay Sievers
2014-11-13libudev: we do not log errors from librariesKay Sievers
2014-09-18libudev: monitor - warn if we fail to request SO_PASSCREDTom Gundersen
The function still succeeds, so there is no functional change. This fixes CID #996288.
2014-04-24udev: warn when name_to_handle_at is not implementedZbigniew Jędrzejewski-Szmek
We have a bunch of reports from people who have a custom kernel and are confused why udev is not running. Issue a warning on error. Barring an error in the code, the only error that is possible is ENOSYS. https://bugzilla.redhat.com/show_bug.cgi?id=1072966
2014-04-24util: make sure all our name_to_handle_at() code makes use of file_handle_unionLennart Poettering
2014-04-21implement a union to pad out file_handleDave Reisner
Cases where name_to_handle_at is used allocated the full struct to be MAX_HANDLE_SZ, and assigned this size to handle_bytes. This is wrong since handle_bytes should describe the length of the flexible array member and not the whole struct. Define a union type which includes sufficient padding to allow assignment of MAX_HANDLE_SZ to be correct.
2014-04-13udev: remove seqnum API and all assumptions about seqnumsKay Sievers
The way the kernel namespaces have been implemented breaks assumptions udev made regarding uevent sequence numbers. Creating devices in a namespace "steals" uevents and its sequence numbers from the host. It confuses the "udevadmin settle" logic, which might block until util a timeout is reached, even when no uevent is pending. Remove any assumptions about sequence numbers and deprecate libudev's API exposing these numbers; none of that can reliably be used anymore when namespaces are involved.
2014-02-13everywhere: make use of new0() and macro() macros, and stop using perror()Lennart Poettering
2014-01-31use memzero(foo, length); for all memset(foo, 0, length); callsGreg KH
In trying to track down a stupid linker bug, I noticed a bunch of memset() calls that should be using memzero() to make it more "obvious" that the options are correct (i.e. 0 is not the length, but the data to set). So fix up all current calls to memset(foo, 0, length) to memzero(foo, length).
2013-12-19remove unused variableThomas Hindoe Paaboel Andersen
2013-12-18libudev: monitor - only disallow "udev" type eventsKay Sievers
2013-12-18libudev: disable monitor inside a containerKay Sievers
Uevents are events of the host, which should not leak into a container. Containers do not support hotplug at the moment, and devices and uevents are not namespace aware.
2013-12-18bus: catch up with kdbus changesKay Sievers
2013-12-18libudev: devices received from udev are always initializedKay Sievers
2013-11-20libudev: always return NULL in _unref() APIsLennart Poettering
Returning anything else but NULL would suggest the caller's reference might still be valid, but it isn't, because the caller just invoked _unref() after all. This turns the return value into a typesafe shortcut that allows unreffing and resetting a reference in one line. In contrast to solutions for this which take a pointer to a pointer to accomplish the same this solution is just syntactic sugar the developer can make use of but doesn't have to, and this is particularly useful when immediately unreffing objects returned by function calls.
2013-11-20libudev: always return valid negative error codes on API functionsLennart Poettering
2013-02-13use streq instead of strcmpThomas Hindoe Paaboel Andersen
2012-11-12libudev: update copyright headersKay Sievers
2012-06-18libudev: clarify that udev_monitor_receive_device() is non-blockingKay Sievers
Based on a patch from: Sam Thursfield <ssssam@gmail.com> https://bugs.freedesktop.org/show_bug.cgi?id=51202
2012-05-25udev: silent gcc warningsKay Sievers
2012-05-15udev: update docs, NEWSKay Sievers
2012-05-15udev: libudev - bump soname, remove deprecated functions, introduce symbol ↵Kay Sievers
versions
2012-04-26libudev: prefix log macros with 'udev_'Kay Sievers
2012-04-16udev: replace ARRAY_SIZE() with ELEMENTSOF()Kay Sievers
2012-04-15udev: udev_monitor_new_from_socket() - log error and remove from public headerKay Sievers
2012-04-13udev: move libudev, gudev to src/; move gudev/docs/, udev/docs/ to to docs/Kay Sievers