commit:     9d4010a3629ebc1d915b7f2d3e2d7be83d79b4f4
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  9 12:22:37 2021 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Feb  9 19:07:34 2021 +0000
URL:        https://gitweb.gentoo.org/proj/eudev.git/commit/?id=9d4010a3

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 <whissi <AT> gentoo.org>
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 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;
         }

Reply via email to