aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* sd-device: reduce the number of implementations of device_read_db() we keep ↵Zbigniew Jędrzejewski-Szmek2018-12-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | around We had two very similar functions: device_read_db_aux and device_read_db, and a number of wrappers for them: device_read_db_aux ← device_read_db (in sd-device.c) ← all functions in sd-device.c, including sd_device_is_initialized ← device_read_db_force ← event_execute_rules_on_remove (in udev-event.c) device_read_db (in device-private.c) ← functions in device_private.c (but not device_read_db_force): device_get_devnode_{mode,uid,gid} device_get_devlink_priority device_get_watch_handle device_clone_with_db ← called from udevadm, udev-{node,event,watch}.c Before 7141e4f62c3f220872df3114c42d9e4b9525e43e (sd-device: don't retry loading uevent/db files more than once), the two implementations were the same. In that commit, device_read_db_aux was changed. Those changes were reverted in the parent commit, so the two implementations are now again the same except for superficial differences. This commit removes device_read_db (in sd-device.c), and renames device_read_db_aux to device_read_db_internal and makes everyone use this one implementation. There should be no functional change.
* sd-device: introduce device_new_from_stat_rdev()Yu Watanabe2018-08-231-0/+2
|
* tree-wide: drop double newlineYu Watanabe2018-06-291-1/+0
|
* tree-wide: drop copyright headers from frequent contributorsZbigniew Jędrzejewski-Szmek2018-06-201-3/+0
| | | | | | | | Fixes #9320. for p in Shapovalov Chevalier Rozhkov Sievers Mack Herrmann Schmidt Rudenberg Sahani Landden Andersen Watanabe; do git grep -e 'Copyright.*'$p -l|xargs perl -i -0pe 's|/([*][*])?[*]\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\s*[*]([*][*])?/\n*|\n|gms; s|\s+([*#]\s+)?Copyright[^\n]*'$p'[^\n]*\n*|\n|gms' done
* tree-wide: beautify remaining copyright statementsLennart Poettering2018-06-141-1/+1
| | | | | | Let's unify an beautify our remaining copyright statements, with a unicode ©. This means our copyright statements are now always formatted the same way. Yay.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering2015-10-241-0/+6
| | | | | | | | | | | | | | 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.
* udevd: fix REMOVE handlingTom Gundersen2015-04-231-0/+1
| | | | | | | | 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>.
* sd-device: fix typoZbigniew Jędrzejewski-Szmek2015-04-141-1/+1
|
* libsystemd: add sd-device libraryTom Gundersen2015-04-021-0/+63
This provides equivalent functionality to libudev-device, but in the systemd style. The public API only caters to creating sd_device objects from for devices that already exist in /sys, there is no support for listening for monitoring events or creating devices received over the udev netlink protocol. The private API contains the necessary functionality to make sd-device a drop-in replacement for libudev-device, but which we would not otherwise want to export.