Commit 2c90df5b authored by Adam Wujek's avatar Adam Wujek 💬

userspace/tools: use 0..17 port numbering in wrs_sfp_dump

Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent b00e15dd
......@@ -78,14 +78,14 @@ int main(int argc, char **argv)
assert_init(shw_sfp_buses_init());
for (i = dump_port; i <= nports; i++) {
printf("========= port %d =========\n", i);
printf("========= port %d =========\n", i - 1);
err = shw_sfp_read_verify_header(i - 1, &shdr);
if (err == -2) {
pr_error("SFP module not inserted in port %d. Failed "
"to read SFP configuration header\n", i);
"to read SFP configuration header\n", i - 1);
} else if (err < 0) {
pr_error("Failed to read SFP configuration header on "
"port %d\n", i);
"port %d\n", i - 1);
} else {
shw_sfp_print_header(&shdr);
if (dump_hex_header) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment