blob: ee3f2e1e9193780f773e5d76d1e5ed92850c9463 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
From 814980faaef11c678524a0f93856a5ed6ff8f0d2 Mon Sep 17 00:00:00 2001
From: Krzysztof Olędzki <ole@ans.pl>
Date: Wed, 11 Sep 2024 23:58:42 -0700
Subject: qsf: Better handling of Page A2h netlink read failure
Print "Failed to read Page A2h." error message to provide more context
for "netlink error: (...)" info.
Signed-off-by: Krzysztof Piotr Oledzki <ole@ans.pl>
---
sfpid.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sfpid.c b/sfpid.c
index 1bc45c1..d9bda70 100644
--- a/sfpid.c
+++ b/sfpid.c
@@ -494,8 +494,10 @@ int sff8079_show_all_nl(struct cmd_context *ctx)
/* Read A2h page */
ret = sff8079_get_eeprom_page(ctx, SFF8079_I2C_ADDRESS_HIGH,
buf + ETH_MODULE_SFF_8079_LEN);
- if (ret)
+ if (ret) {
+ fprintf(stderr, "Failed to read Page A2h.\n");
goto out;
+ }
sff8472_show_all(buf);
out:
--
cgit 1.2.3-korg
|