Skip to content

Commit

Permalink
udevadm: hwdb: allow empty properties
Browse files Browse the repository at this point in the history
Backport of systemd/systemd@afe8797.

Will address shown error

> Error, empty key or value ' XKB_FIXED_VARIANT' in '/usr/lib/udev/hwdb.d/60-keyboard.hwdb'

caued by recent changes in sys-apps/hwids-20201207 [Link 1].

Link 1: gentoo/hwids@f30071b#diff-7b9ba9c30888b1b5b1fa008f185e4efaff34eaff2c13f35c38b2ae0416cd891eR1840
Signed-off-by: Thomas Deutschmann <[email protected]>
Signed-off-by: Anthony G. Basile <[email protected]>
  • Loading branch information
Whissi authored and blueness committed Feb 9, 2021
1 parent 14748ac commit 9d4010a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/udev/udevadm-hwdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,8 @@ static int insert_data(struct trie *trie, struct udev_list *match_list,
while (isblank(line[0]) && isblank(line[1]))
line++;

if (isempty(line + 1) || isempty(value)) {
log_error("Warning, empty %s in \"%s=%s\", ignoring",
isempty(line + 1) ? "key" : "value",
if (isempty(line + 1)) {
log_error("Warning, empty key in \"%s=%s\", ignoring",
line, value);
return -EINVAL;
}
Expand Down

0 comments on commit 9d4010a

Please sign in to comment.