]> git.ipfire.org Git - thirdparty/systemd.git/commit
hash-funcs: tweak odering in devt_compare_func()
authorLennart Poettering <lennart@poettering.net>
Fri, 1 Apr 2022 12:21:44 +0000 (14:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 4 Apr 2022 15:04:14 +0000 (17:04 +0200)
commit1748853700551fcea8e68047621fa9cffff904eb
treec9a557c2f9434f7b56cc726f42fe4cad847defd9
parent666efe94c998dad2b94be9b7cf471071e45784b9
hash-funcs: tweak odering in devt_compare_func()

Let's order dev_t's by their major first, minor secondary. The binary
encoding of the two fields is weirdly interleaved and different in
kernel and glibc, hence let's focus on the generic part that works like
users would expect it.

So far the function is only used to compare for equality, not for
sorting, hence this has no immediate effect.
src/basic/hash-funcs.c
src/basic/hash-funcs.h