31 lines
842 B
Diff
31 lines
842 B
Diff
|
From 1fb452d1a836c69fc9cf7fea59a80a50fabd6385 Mon Sep 17 00:00:00 2001
|
||
|
From: "Dmitry V. Levin" <ldv@altlinux.org>
|
||
|
Date: Mon, 24 Dec 2018 10:19:24 +0000
|
||
|
Subject: [PATCH 10/27] xlat_idx: do not issue warnings for holes in indices
|
||
|
|
||
|
Some xlat indices like evdev_abs have holes, avoid issuing warnings
|
||
|
about them.
|
||
|
|
||
|
* xlat.c (xlat_idx): Do not issue warnings for holes in the index.
|
||
|
---
|
||
|
xlat.c | 3 +++
|
||
|
1 file changed, 3 insertions(+)
|
||
|
|
||
|
diff --git a/xlat.c b/xlat.c
|
||
|
index 4614cef..7de51da 100644
|
||
|
--- a/xlat.c
|
||
|
+++ b/xlat.c
|
||
|
@@ -269,6 +269,9 @@ xlat_idx(const struct xlat *xlat, size_t nmemb, uint64_t val)
|
||
|
return NULL;
|
||
|
|
||
|
if (val != pos[val].val) {
|
||
|
+ if (pos[val].val == 0)
|
||
|
+ return NULL; /* a hole in the index */
|
||
|
+
|
||
|
error_func_msg("Unexpected xlat value %" PRIu64
|
||
|
" at index %" PRIu64,
|
||
|
pos[val].val, val);
|
||
|
--
|
||
|
2.1.4
|
||
|
|