summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-hwdb/hwdb-util.c
AgeCommit message (Collapse)AuthorFilesLines
2019-03-27tree-wide: (void)ify a few unlink() and rmdir()Lennart Poettering1-1/+1
Let's be helpful to static analyzers which care about whether we knowingly ignore return values. We do in these cases, since they are usually part of error paths.
2019-03-27headers: remove unneeded includes from util.hZbigniew Jędrzejewski-Szmek1-0/+1
This means we need to include many more headers in various files that simply included util.h before, but it seems cleaner to do it this way.
2019-03-13util: split out sorting related calls to new sort-util.[ch]Lennart Poettering1-0/+1
2018-12-20meson: define PROJECT_VERSION as the "bare" project versionZbigniew Jędrzejewski-Szmek1-1/+1
Let's not use atoi() if we can simply provide the project version as a number. In C code, this is the numerical project version. In substitutions in other files, this is just the bare substitution. The "PACKAGE_" prefix is from autotools, and is strange. We call systemd a "project", and "package" is something that distros build. Let's rename. PACKAGE_URL is renamed to PROJECT_URL for the same reasons and for consistency. (This leave PACKAGE_VERSION as the stringified define for C code.)
2018-12-02util-lib: split out all temporary file related calls into tmpfiles-util.cLennart Poettering1-0/+1
This splits out a bunch of functions from fileio.c that have to do with temporary files. Simply to make the header files a bit shorter, and to group things more nicely. No code changes, just some rearranging of source files.
2018-11-14Move LONG_LINE_MAX definition to fileio.hZbigniew Jędrzejewski-Szmek1-1/+0
All users of the macro (except for one, in serialize.c), use the macro in connection with read_line(), so they must include fileio.h. Let's not play libc games and require multiple header file to be included for the most common use of a function. The removal of def.h includes is not exact. I mostly went over the commits that switch over to use read_line() and add def.h at the same time and reverted the addition of def.h in those files.
2018-10-18hwdb: fgets() excorcismLennart Poettering1-2/+9
2018-09-20sd-hwdb: initialize variableYu Watanabe1-1/+1
The variable 'fn' was not initialized on compat mode. Fixes CID#1395731.
2018-09-19hwdb,udevadm: also unify hwdb_query() and hwdb_test()Yu Watanabe1-0/+18
2018-09-19sd-hwdb: use structured initializersYu Watanabe1-18/+23
2018-09-19hwdb: unify duplicated code and move it to hwdb-util.cYu Watanabe1-0/+656
Both 'systemd-hwdb update' and 'udevadm hwdb --update' creates hwdb database. The database created by systemd-hwdb containes additional information such that priority, line number, and source filename. The unified function 'hwdb_update()' can take a flag 'compat' which controls the format version of created database.