tools: ynl: copy netlink error to NlError
authorJakub Kicinski <kuba@kernel.org>
Wed, 3 Apr 2024 02:34:21 +0000 (19:34 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Apr 2024 17:33:52 +0000 (10:33 -0700)
commitb269d2b4a5232c6130b5df83fb112f4029df4544
tree43f3755fc3ffc3fcc8a297641678f8c6d7f7aad2
parent1d056bf9a4c15d433e9aa49558e58c1cf8d7f70c
tools: ynl: copy netlink error to NlError

Typing e.nl_msg.error when processing exception is a bit tedious
and counter-intuitive. Set a local .error member to the positive
value of the netlink level error.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Link: https://lore.kernel.org/r/20240403023426.1762996-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/lib/ynl.py