]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-hwdb: order properties by origin 4199/head
authorDavid Herrmann <dh.herrmann@gmail.com>
Wed, 21 Sep 2016 13:16:00 +0000 (15:16 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Wed, 21 Sep 2016 13:18:28 +0000 (15:18 +0200)
commit3a04b789c6f17dff2000a3cdbeaaf86baa604524
tree43c9a2ffb2b957c9d5550025a7f4d2032f497378
parent698c5a176ead078e7c86c541be714ccb464dae95
sd-hwdb: order properties by origin

If we find duplicates in a property-lookup, make sure to order them by
their origin. That is, matches defined "later" take precedence over
earlier matches. The "later"-order is defined by file-name + line-number
combination. That is, if a match is defined below another one in the
same hwdb file, it takes precedence, same as if it is defined in a file
ordered after another one.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
src/libsystemd/sd-hwdb/sd-hwdb.c