hwdb: unify duplicated code and move it to hwdb-util.c
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 18 Sep 2018 13:57:45 +0000 (22:57 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 19 Sep 2018 08:36:03 +0000 (17:36 +0900)
commit6a34639e76b8b59233a97533b13836d5a44e8d4a
treeb68bc18c639a40dbfb26dc1897845383ed5a00cd
parent73c63957d2319f765e02ed7fe35453e94c3777ac
hwdb: unify duplicated code and move it to hwdb-util.c

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.
src/hwdb/hwdb.c
src/libsystemd/meson.build
src/libsystemd/sd-hwdb/hwdb-util.c [new file with mode: 0644]
src/libsystemd/sd-hwdb/hwdb-util.h
src/udev/udevadm-hwdb.c