Skip to contentSkip to conversation

qsf: Better handling of Page A2h netlink read failure

PATCH Applied Krzysztof Olędzki 1 participant 1 message Sep 12, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 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.

---
 sfpid.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
sfpid.c +3 -1
index 1bc45c1..d9bda70 100644
@@ -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:
Signature · 1 line
2.46.0