summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-hwdb.c
Commit message (Collapse)AuthorAgeFilesLines
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* libudev: hide definition of struct udev_list from other libudev componentsYu Watanabe2019-06-121-7/+11
| | | | | In the later commit, udev_list will be just a wrapper of hashmap or LIST. So, allocating udev_list does not increase much cost.
* libudev: introduce return_with_errno() and use it where applicableYu Watanabe2018-11-221-15/+8
|
* libudev-list: drop unused udev argument from udev_list_init()Yu Watanabe2018-11-221-1/+1
|
* libudev: coding style fixesYu Watanabe2018-11-201-1/+1
|
* libudev-list: move libudev-list related definitions to libudev-list-internal.hYu Watanabe2018-11-201-1/+3
| | | | | This also rename libudev-private.h to libudev-util.h, and cleanups several unnecessary headers from udev.h and libudev-util.h
* tree-wide: replace 'unsigned int' with 'unsigned'Yu Watanabe2018-10-191-1/+1
|
* libudev-hwdb: use assert_return_errno()Yu Watanabe2018-09-111-4/+2
|
* libudev-hwdb: use structured initializerYu Watanabe2018-09-111-3/+5
|
* libudev-hwdb: drop unused 'struct udev *udev' in udev_hwdb structYu Watanabe2018-09-111-4/+1
|
* libudev: use DEFINE_PUBLIC_TRIVIAL_REF_UNREF_FUNC() macro where applicableYu Watanabe2018-09-111-18/+11
|
* libudev: accept NULL as the argument 'struct udev*' for udev_monitor_new() ↵Yu Watanabe2018-08-231-2/+0
| | | | | | | or friends As udev_monitor struct or friends are now almost independent of udev struct. So, generating these objects without udev struct is reasonable.
* 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: 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.
* tree-wide: use TAKE_PTR() and TAKE_FD() macrosYu Watanabe2018-04-051-2/+1
|
* Replace free and return NULL with return mfreeDaniel Lockyer2017-11-241-2/+1
|
* 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.
* libudev: add missing errno initialization/error propagation (#6781)Lennart Poettering2017-09-091-4/+13
| | | | | | | | | In libudev (which es much older code than the rest of systemd), we propagate errors in functions not returning an int, via (positive) errno (i.e. libc-style), and as negative Exyz values in those returning an int (much preferred, i.e. Linux kernel style). Let's fix up a few place, where this was incorrectly done, or not done at all. Fixes: #6613
* tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easyLennart Poettering2015-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLIB has recently started to officially support the gcc cleanup attribute in its public API, hence let's do the same for our APIs. With this patch we'll define an xyz_unrefp() call for each public xyz_unref() call, to make it easy to use inside a __attribute__((cleanup())) expression. Then, all code is ported over to make use of this. The new calls are also documented in the man pages, with examples how to use them (well, I only added docs where the _unref() call itself already had docs, and the examples, only cover sd_bus_unrefp() and sd_event_unrefp()). This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we tend to call our destructors these days. Note that this defines no public macro that wraps gcc's attribute and makes it easier to use. While I think it's our duty in the library to make our stuff easy to use, I figure it's not our duty to make gcc's own features easy to use on its own. Most likely, client code which wants to make use of this should define its own: #define _cleanup_(function) __attribute__((cleanup(function))) Or similar, to make the gcc feature easier to use. Making this logic public has the benefit that we can remove three header files whose only purpose was to define these functions internally. See #2008.
* util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering2015-10-271-0/+1
|
* util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering2015-10-241-1/+2
| | | | | | | | | | | | | | 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.
* udev: builtin-hwdb - port to sd-hwdbTom Gundersen2014-12-151-7/+0
|
* hwdb: FOREACH_HWDB_PROPERTY -> SD_HWDB_FOREACH_PROPERTYDavid Herrmann2014-12-121-1/+1
| | | | | Lets not pollute the global namespace. Prefix all our exported names and macros with SD_HWDB_*.
* libudev: make libudev-hwdb a wrapper around sd-hwdbTom Gundersen2014-12-111-301/+26
|
* treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt2014-11-281-3/+3
| | | | | | | | | | | 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.
* treewide: drop unnecessary trailing \n in log_*() callsMichal Schmidt2014-11-281-5/+5
|
* udev: switch to systemd logging functionsKay Sievers2014-11-131-11/+11
|
* udev hwdb: Change error message regarding missing hwdb.bin back to debug.Colin Guthrie2014-11-051-1/+1
| | | | | | | | | 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.
* udev hwdb: Support shipping pre-compiled database in system imagesMartin Pitt2014-10-281-6/+36
| | | | | | | | | | | | | | | | 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.
* Fix misuse of uint64_t as size_tZbigniew Jędrzejewski-Szmek2014-08-031-1/+1
| | | | They have different size on 32 bit, so they are really not interchangable.
* Remove unnecessary casts in printfsZbigniew Jędrzejewski-Szmek2014-05-151-1/+1
| | | | No functional change expected :)
* libudev: hwdb - use libudev not systemd loggingKay Sievers2013-12-101-10/+10
|
* libudev: always return NULL in _unref() APIsLennart Poettering2013-11-201-2/+2
| | | | | | | | | | | | | 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.
* libudev: fix hwdb validation to look for the *new* fileKay Sievers2013-08-151-1/+1
|
* hwdb: remove support for (not fully implemented) conditional propertiesKay Sievers2013-07-011-1/+5
|
* Use stdint.h macros instead of casts to print uint64_t valuesZbigniew Jędrzejewski-Szmek2013-06-101-5/+5
| | | | Casts are visually heavy, and can obscure unwanted truncations.
* udev: remove HWDB_BINKay Sievers2013-02-071-5/+5
|
* libudev: hwdb: add missing endianess conversionEric Benoit2012-12-111-3/+3
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=58067
* hwdb: use $(localstatedir)/lib/udev/hwdb.bin for the binary databaseZbigniew Jędrzejewski-Szmek2012-11-161-5/+5
| | | | | | It's not configuration, so it doesn't belong in udev. Also, remove the catalog when uninstalling udev.
* udev: hwdb - properly handle a missing databaseKay Sievers2012-11-151-1/+1
| | | | | | | | | | | | | | | | On Thu, Nov 15, 2012 at 5:05 PM, Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> wrote: > Something like this appeared with latest git: > > Nov 15 16:55:46 fedora-15 systemd-udevd[334]: worker [364] terminated by signal 11 (Segmentation fault) > Nov 15 16:55:46 fedora-15 [387]: Process 364 (systemd-udevd) dumped core. > Nov 15 16:55:46 fedora-15 systemd-udevd[334]: worker [364] failed while handling '/devices/virtual/net/lo' > Nov 15 16:55:46 fedora-15 systemd-udevd[334]: worker [360] terminated by signal 11 (Segmentation fault) > Nov 15 16:55:46 fedora-15 systemd-udevd[334]: worker [360] failed while handling '/devices/pci0000:00/0000:00:03.0/virtio0/net > Nov 15 16:55:46 fedora-15 [389]: Process 360 (systemd-udevd) dumped core. > > Core was generated by usr/lib/systemd/systemd-udevd'. > Program terminated with signal 11, Segmentation fault. > #0 0x0000000000423c87 in udev_hwdb_get_properties_list_entry (hwdb=0x0, modalias=0x7fffbcd155f0
* libudev: update copyright headersKay Sievers2012-11-121-1/+1
|
* udev: use usec_t and now()Kay Sievers2012-11-121-1/+1
|
* libudev: hwdb - cleanup list before getting new propertiesKay Sievers2012-10-281-2/+3
|
* Tweak TODOZbigniew Jędrzejewski-Szmek2012-10-281-1/+1
|
* libudev: import hwdb and export lookup interfaceKay Sievers2012-10-271-0/+391