aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-02-09 13:22:37 +0100
committerAnthony G. Basile <blueness@gentoo.org>2021-02-09 14:07:34 -0500
commit9d4010a3629ebc1d915b7f2d3e2d7be83d79b4f4 (patch)
tree5503780227397b4b687e401586d5c4762f9344a3 /src/udev/udevadm-hwdb.c
parentudevadm: hwdb: sync with systemd (diff)
downloadeudev-9d4010a3629ebc1d915b7f2d3e2d7be83d79b4f4.tar.gz
eudev-9d4010a3629ebc1d915b7f2d3e2d7be83d79b4f4.tar.bz2
eudev-9d4010a3629ebc1d915b7f2d3e2d7be83d79b4f4.zip
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@gentoo.org> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udevadm-hwdb.c')
-rw-r--r--src/udev/udevadm-hwdb.c5
1 files 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;
}