From a2df686d9741a28ccec17eb0515a8f65f6b6753d Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 24 Oct 2018 13:27:45 -0700 Subject: [PATCH] hwsim: limit "Unknown attribute type:" print Since we don't catch all hwsim attribute types in unicast_handler you see tons of "Unknown attribute type: X" prints. Since this is not an error, we should only print if the attribute does not exist in the attribute list. --- tools/hwsim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/hwsim.c b/tools/hwsim.c index 5321b200..da54a6a0 100644 --- a/tools/hwsim.c +++ b/tools/hwsim.c @@ -1436,7 +1436,8 @@ static void unicast_handler(struct l_genl_msg *msg, void *user_data) break; default: - l_warn("Unhandled attribute type: %u", type); + if (type >= __HWSIM_ATTR_MAX) + l_warn("Unknown attribute type: %u", type); break; } }