summaryrefslogtreecommitdiff
path: root/src/udev/udevadm-hwdb.c
AgeCommit message (Collapse)Author
2014-09-18udevadm: hwdb - check return value of fseeko()Tom Gundersen
Fonud by Coverity. Fixes CID #996255. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-02-21udev: make sure we always return a valid error code in trie_store()Lennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-02-21everywhere: make use of new0() and macro() macros, and stop using perror()Lennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-02-09Update some message formatsZbigniew Jędrzejewski-Szmek
Use PID_FMT/USEC_FMT/... in more places. Also update logind error messages to print the full path to a file that failed. This should make debugging easier for people who do not know off the top of their head where logind stores it state. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-01-20udev/udevadm-hwdb.c: remove usage of qsort_rrofl0r
while theoretically a nice interface, qsort_r on GLIBC was implemented with a prototype that shuffles the argument order around when compared to the traditional BSD implementations, yielding in 2 separate incompatible implementations. even worse, the arguments are all of pointer type so one would not even notice that the order is wrong and so this would yield in crashes or silent memory corruption. thus musl does not implement it, because configure scripts would check for its existance and use it unconditionally, even when assuming the BSD version. a more portable solution is to use TLS via __thread, which any modern GCC should provide. (even 3.4.6 on x86/x86_64 does so). Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-01-13src/udev: bring up to date with upstream.Anthony G. Basile
These commits were authored by Zbigniew Jędrzejewski-Szmek Tom Gundersen Kay Sievers Lennart Poettering Shawn Landden Daniel Buch Martin Pitt Karel Zak Yang Zhiyong Note: udev_builtin_net_setup_link has *not* been imported. Also still missing from udev-builtin is udev_builtin_uaccess. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-01-09Fix write-only use of a few variablesZbigniew Jędrzejewski-Szmek
Since the invention of read-only memory, write-only memory has been considered deprecated. Where appropriate, either make use of the value, or avoid writing it, to make it clear that it is not used. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-08-16udev/udevadm-hwdb.c: remove usage of qsort_rrofl0r
while theoretically a nice interface, qsort_r on GLIBC was implemented with a prototype that shuffles the argument order around when compared to the traditional BSD implementations, yielding in 2 separate incompatible implementations. even worse, the arguments are all of pointer type so one would not even notice that the order is wrong and so this would yield in crashes or silent memory corruption. thus musl does not implement it, because configure scripts would check for its existance and use it unconditionally, even when assuming the BSD version. a more portable solution is to use TLS via __thread, which any modern GCC should provide. (even 3.4.6 on x86/x86_64 does so). Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-30src/udev/udevadm-hwdb.c: rename variable to match upstreamAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-30Bring collect.c and udevadm-hwdb.c in line with upstreamAnthony G. Basile
This brings these two files in line with upstream's commit: ef89eef77ee098a6828169a6d0d74128e236bcbd udev: fix two trivial memleaks in error path Based-on-a-patch-by: Ian Stakenvicius <axs@gentoo.org> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-11src/udev/udevadm-hwdb.c: fix double freeeudev/v1.1Anthony G. Basile
clang is stupid and I will never blindly trust it again. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10Fix potential memleak and use-after-free errors as reported by clangIan Stakenvicius
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10hwdb: allow list of lookup keys per given recordKay Sievers
This allows to specify: dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Model 231*:pvr* dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Series 12*:pvr* KEY_A=value KEY_B=value Instead of: dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Model 231*:pvr* KEY_A=value KEY_B=value dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Series 12*:pvr* KEY_A=value KEY_B=value Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07hwdb: remove support for (not fully implemented) conditional propertiesKay Sievers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-06Fix ordering of params for conf_files_list_strvAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-03Move remaining _cleanup_free_ in front of typeAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02udevadm: do not free node on successZbigniew Jędrzejewski-Szmek
A fix for ff03aed06a422.
2013-06-02udevadm-hwdb: avoid leak in error pathZbigniew Jędrzejewski-Szmek
2013-03-14src/udev/udevadm-hwdb.c: fix helpAnthony G. Basile
This follows upstream commit e32a4e1ef4c61561b08f50f73f82587bdc946b40 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-02-07udevadm: support updating hwdb from an offset rootLuca Barbato
Introduce `--root` option to make users run udevadm on rootfs not mounted as / Ease the life of distribution packagers.
2012-11-23Propagation of configured installation paths to Makefile.am and .c codeAnthony G. Basile
This commit is a continuation of the previous one in which all the configured paths obtained in configure.ac are propagated to the Makefile.am and .c files via AM_CPPFLAGS of the form -DUDEV_CONF_FILE=\"$(udevconffile)\". This should address the issue in https://github.com/gentoo/eudev/issues/17 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-11-18Fix unused result warningsKacper Kowalik (Xarthisius)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-11-12use the same email address everywhereKay Sievers
2012-11-02udev: break over-long linesKay Sievers
2012-10-28udev: add "udevadm hwdb --test=<modalias>"Kay Sievers
2012-10-27libudev: import hwdb and export lookup interfaceKay Sievers
2012-10-25udev: hwdb - properly initialize search structureKay Sievers
2012-10-23udev: add hardware database supportKay Sievers