From 9d4010a3629ebc1d915b7f2d3e2d7be83d79b4f4 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Tue, 9 Feb 2021 13:22:37 +0100 Subject: [PATCH] udevadm: hwdb: allow empty properties Backport of https://github.com/systemd/systemd/commit/afe87974dd57741f74dd87165b251886f24c859f. 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: https://github.com/gentoo/hwids/commit/f30071bbebc0685c645783024cae0f9f213a1458#diff-7b9ba9c30888b1b5b1fa008f185e4efaff34eaff2c13f35c38b2ae0416cd891eR1840 Signed-off-by: Thomas Deutschmann Signed-off-by: Anthony G. Basile --- src/udev/udevadm-hwdb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index 6bc108783..53b1b15c7 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -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; }