summaryrefslogtreecommitdiff
path: root/src/libudev
AgeCommit message (Collapse)Author
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)
2014-12-25libudev: fix strict aliasing violationShawn Paul Landden
2014-12-15udev: builtin-hwdb - port to sd-hwdbTom Gundersen
2014-12-12hwdb: FOREACH_HWDB_PROPERTY -> SD_HWDB_FOREACH_PROPERTYDavid Herrmann
Lets not pollute the global namespace. Prefix all our exported names and macros with SD_HWDB_*.
2014-12-11use correct format typesThomas Hindoe Paaboel Andersen
2014-12-11libudev: make libudev-hwdb a wrapper around sd-hwdbTom Gundersen
2014-12-03libudev: set errno properly in all error conditions of ↵Lennart Poettering
udev_device_new_from_syspath()
2014-11-28treewide: another round of simplificationsMichal Schmidt
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno + return simplifications".
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: move global property handling from libudev to udevdKay Sievers
2014-11-13udev: switch to systemd logging functionsKay Sievers
2014-11-13libudev: we do not log errors from librariesKay Sievers
2014-11-12udev: use the systemd logging functions in udev toolsKay Sievers
2014-11-05udev hwdb: Change error message regarding missing hwdb.bin back to debug.Colin Guthrie
When used in an initramfs, it's expected that the hwdb.bin file is not present (it makes for a very large initramfs otherwise). While it's nice to tell the user about this, as it's not strictly speaking an error we really shouldn't be so forceful in our reporting.
2014-11-01libudev: Use correct free functionColin Walters
FILE * wants cleanup_fclose(). Spotted by udev hwdb segfaulting in gnome-continuous' buildroot construction.
2014-11-01Use log "level" instead of "priority"Zbigniew Jędrzejewski-Szmek
The term "priority" is misleading because higher levels have lower priority. "Level" is clearer and shorter. This commit touches only the textual descriptions, not function and variable names themselves. "Priority" is used in various command-line switches and protocol constants, so completly getting rid of "priority" is hard. I also left "priority" in various places where the clarity suffered when it was removed.
2014-11-01libudev: do not accept invalid log levelsZbigniew Jędrzejewski-Szmek
Invalid log levels lead to a assert failure later on. https://bugs.freedesktop.org/show_bug.cgi?id=85657
2014-11-01libudev: modernizationZbigniew Jędrzejewski-Szmek
This brings udev logging style a bit closer to normal systemd convention.
2014-10-28udev hwdb: Support shipping pre-compiled database in system imagesMartin Pitt
In some cases it is preferable to ship system images with a pre-generated binary hwdb database, to avoid having to build it at runtime, avoid shipping the source hwdb files, or avoid storing large binary files in /etc. So if hwdb.bin does not exist in /etc/udev/, fall back to looking for it in UDEVLIBEXECDIR. This keeps the possibility to add files to /etc/udev/hwdb.d/ and re-generating the database which trumps the one in /usr/lib. Add a new --usr flag to "udevadm hwdb --update" which puts the database into UDEVLIBEXECDIR. Adjust systemd-udev-hwdb-update.service to not generate the file in /etc if we already have it in /usr.
2014-09-18udev: fix path for database names on 'change' eventRobert Milasan
If a device does not have a major/minor number attached, we use different database names than if it does. On "change" events, we didn't copy the devnum over, therefore, we used different paths than on 'add' or 'remove' events (where devnum was properly copied). Fix this by always copying the devnum into the udev-device. (David: added commit-log from email)
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-09-16udev: util - use log_level_from_string()Tom Gundersen
2014-09-16libudev: util - drop util_delete_path()Tom Gundersen
Use rmdir_parents() from src/shared instead.
2014-09-16libudev: drop util_lookup_{user,group}Tom Gundersen
Use shared versions instead. Difference is with overwriting of repeated user/group name, and lack of logging.