summaryrefslogtreecommitdiff
path: root/src/libudev
AgeCommit message (Collapse)Author
2015-10-27util-lib: move more file I/O related calls into fileio.[ch]Lennart Poettering
2015-10-27util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]Lennart Poettering
2015-10-26util-lib: split out IO related calls to io-util.[ch]Lennart Poettering
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-10-19tree-wide: remove unused functionsThomas Hindoe Paaboel Andersen
2015-09-09tree-wide: use coccinelle to patch a lot of code to use mfree()Lennart Poettering
This replaces this: free(p); p = NULL; by this: p = mfree(p); Change generated using coccinelle. Semantic patch is added to the sources.
2015-06-17libudev: device - fix typo in udev_device_get_sysattr_list_entry()Tom Gundersen
We were adding the attributes to the wrong list.
2015-06-03libudev: enumerate - accept NULL parameters in add_match()Tom Gundersen
This was a regression introduced when moving to sd-device.
2015-06-03libudev: 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.
2015-06-02sd-device: get_subsystem - don't complain if a device does not have a subsystemTom Gundersen
2015-05-12udevd: manager - move a few global variables into the Manager objectTom Gundersen
2015-04-29libudev: monitor - fix typo in log messageTom Gundersen
2015-04-26libudev: monitor - clarify log messagesTom Gundersen
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-23libudev-device: fix lazy loading of devlinks, properties and tagsTom Gundersen
If the underlying device has not read in the properties yet, the generation will be 0, so make sure we trigger the reading at least once.
2015-04-17sd-device: enumerator - match only on initialized devices by defaultTom Gundersen
It is still possible to include uninitialized ones, but now that is opt-in. In most cases people only want initialized devices. Exception is if you want to work without udev running. Suggested by David Herrmann.
2015-04-17sd-device: enumerator - don't expose add_device()Tom Gundersen
This is rarely, if ever, used. Drop it from the new public API and only keep it for the legacy API. Suggested by David Herrmann.
2015-04-16libudev: make libudev-enumerate a thin wrapper around sd-deviceTom Gundersen
2015-04-16shared: move assert_return_errno() from libudevTom Gundersen
This should not be used for any new code, as we don't set errno in new code, but there are several legacy users, so let's keep it in shared.
2015-04-10shared: add formats-util.hRonny Chevalier
2015-04-05libudev-util: check length before accesing the arrayThomas Hindoe Paaboel Andersen
2015-04-02libudev: device - replace by a thin wrapper around sd-deviceTom Gundersen
2015-04-01libudev: monitor - improve loggingTom Gundersen
2015-03-18libudev: private - introduce udev_device_new_from_synthetic_event()Tom Gundersen
This allows set_action(), read_uevent_file() and read_db() to be made internal to libudev.
2015-03-15libudev-monitor: use initializationZbigniew Jędrzejewski-Szmek
2015-03-14udev: downgrade "has devpath" and "filled with db file" messagesZbigniew Jędrzejewski-Szmek
Udev debug messages have to be significantly overhauled... For now just downgrade those two. They are responsible for approximately 25% of debug output during boot and are rather useless.
2015-03-13udev: make set_usec_initialized() internal to libudevTom Gundersen
Instead introduce ensure_usec_initialized(), which copies the timestamp if possible otherwise sets it to now(CLOCK_MONOTONIC).
2015-03-12libudev: introduce clone_with_db()Tom Gundersen
This allows us to move the db reading from udevd to libudev.
2015-03-12libudev: monitor - fix error path in send_deviceTom Gundersen
Return -errno rather than -1 in case sendmsg() fails.
2015-03-12udevd: event - make db loading lazy in REMOVE event handlingTom Gundersen
We were explicitly eagerly loading the db, then deletenig the backing file and then processing the rules/symlinks. Instead we delete the backnig db file as the last step and let the db loading be lazy as everywhere else. This may save us a bit of work in casese where the db is not needed, but more importantly it hides some implementation details of libudev-device form udevd.
2015-03-12libudev: introduce udev_device_properties_copy()Tom Gundersen
To copy properties from one device to another. Drop the equivalent functionality from udevd.
2015-03-09libudev: udev_device_read_db - drop unused argumentTom Gundersen
2015-03-09libudev: udev_device_add_property - implicitly mark properties for saving to dbTom Gundersen
Properties should only be saved to the db when added to the udev_device by udevd, and only if the property does not start with a '.'. Make this implicit rather than expose the marking of properties.
2015-03-09udev/libudev: event - move {OLD_,}INTERFACE handling from udevd to libudevTom Gundersen
This should be internal to the library as it is only about reflecting the sysfs state in the udev_device.
2015-03-09libudev: private - make property_from_string_parse* staticTom Gundersen
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-16Revert "build-sys: re-add old symbols for abi compat"Michal Schmidt
This reverts commit 93a1e66efd4b0f4cda29c467d20d0f7510c0b3a8. It broke the builds for Walters. Kay hates it and "just knows" there are no actual users.
2015-02-16build-sys: re-add old symbols for abi compatZbigniew Jędrzejewski-Szmek
For two releases those exported with version 183 by mistake, and then they were fixed to have version 215 (015419c0df libudev: fix symbol version for udev_queue_flush() and udev_queue_get_fd()). But that breaks ABI compatibility for binaries compiled with udev from before that commit. There most likely very few such binaries, if any, but as a matter of principle we should export the old symbols too, in order to keep full compatibility.
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-02-03util: rework strappenda(), and rename it strjoina()Lennart Poettering
After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary.
2015-01-26libudev: private - drop some functions from the internal APITom Gundersen
2015-01-26libudev: monitor - move nulstr parsing to libudev-deviceTom Gundersen
Hide the details a bit.
2015-01-26udev: event - introduce and use internal udev_device_shallow_clone()Tom Gundersen
2015-01-26udev: event - move renaming of udev_device to libudevTom Gundersen
This is not exposed in the public API. We want to simplify the internal libudev-device API as much as possible so that it will be simpler to rip the whole thing out in the future.
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)