Blame SOURCES/0010-xlat_idx-do-not-issue-warnings-for-holes-in-indices.patch

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