mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
storagetm: always hash stat.st_mode
To make the hash function consistent with the compare function.
This commit is contained in:
parent
e40a67809b
commit
30c1cded77
@ -788,9 +788,10 @@ typedef struct Context {
|
||||
static void device_hash_func(const struct stat *q, struct siphash *state) {
|
||||
assert(q);
|
||||
|
||||
mode_t m = q->st_mode & S_IFMT;
|
||||
siphash24_compress_typesafe(m, state);
|
||||
|
||||
if (S_ISBLK(q->st_mode) || S_ISCHR(q->st_mode)) {
|
||||
mode_t m = q->st_mode & S_IFMT;
|
||||
siphash24_compress_typesafe(m, state);
|
||||
siphash24_compress_typesafe(q->st_rdev, state);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user