Commit f9e8b825 authored by Adam Wujek's avatar Adam Wujek 💬

shell: store information whether SFP was found in DB

Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 54593958
......@@ -19,6 +19,7 @@
int32_t sfp_alpha = 73622176; /* default values if could not read EEPROM */
int32_t sfp_deltaTx = 0;
int32_t sfp_deltaRx = 0;
int32_t sfp_in_db = 0;
int sfp_present(void)
{
......
......@@ -10,7 +10,10 @@
#include <stdint.h>
#define SFP_PN_LEN 16
#define SFP_NOT_MATCHED 1
#define SFP_MATCHED 2
extern int32_t sfp_in_db;
extern int32_t sfp_alpha;
extern int32_t sfp_deltaTx;
extern int32_t sfp_deltaRx;
......
......@@ -106,8 +106,11 @@ static int cmd_sfp(const char *args[])
sfp_deltaTx = sfp.dTx;
sfp_deltaRx = sfp.dRx;
sfp_alpha = sfp.alpha;
} else
sfp_in_db = SFP_MATCHED;
} else {
pp_printf("Could not match to DB\n");
sfp_in_db = SFP_NOT_MATCHED;
}
return 0;
} else if (args[0] && !strcasecmp(args[0], "ena")) {
if(!args[1])
......
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