Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyh2020 committed Sep 21, 2022
1 parent 115805d commit 43cae47
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 41 deletions.
3 changes: 0 additions & 3 deletions src/cli/clihnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1948,9 +1948,6 @@ static void print_phy_model_2_txt(unsigned char model)
case PHY_MODEL_VTSS_8664:
print_n_str("ENZO", 12);
break;
case PHY_MODEL_VTSS_7422:
print_n_str("LUTON26", 12);
break;
case PHY_MODEL_VTSS_8512:
print_n_str("ATOM", 12);
break;
Expand Down
24 changes: 6 additions & 18 deletions src/cli/l26_txtdef.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,7 @@ const struct {
#if TRANSIT_LLDP
const char txt_TXT_NO_CHIP_NAME [] = {"SparX-III"};

#if defined(LUTON26_L25)
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 25 Port Gigabit Ethernet Switch"};
#elif defined(LUTON26_L16)
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 16 Port Gigabit Ethernet Switch"};
#elif defined(LUTON26_L10)
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 10 Port Gigabit Ethernet Switch"};
#elif defined(FERRET_F11)
#if defined(FERRET_F11)
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 11 Port Gigabit Ethernet Switch"};
#elif defined(FERRET_F10P)
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 10 Port Gigabit Ethernet Switch"};
Expand All @@ -70,20 +64,14 @@ const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 4 Port Gigabit Ethernet Switc
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - Unknown switch description"};
#endif

#if defined(LUTON26_L25)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7422 25 Port Switch"};
#elif defined(LUTON26_L16)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7421 16 Port Switch"};
#elif defined(LUTON26_L10)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7420 10 Port Switch"};
#elif defined(FERRET_F11)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7412 11 Port Switch"};
#if defined(FERRET_F11)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7512 11 Port Switch"};
#elif defined(FERRET_F10P)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7412 10 Port Switch"};
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7512 10 Port Switch"};
#elif defined(FERRET_F5)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7411 5 Port Switch"};
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7511 5 Port Switch"};
#elif defined(FERRET_F4P)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7411 4 Port Switch"};
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7511 4 Port Switch"};
#else
const char txt_TXT_NO_SWITCH_NAME [] = {"Unknown switch name"};
#endif
Expand Down
25 changes: 5 additions & 20 deletions src/cli/txt_moredef.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,12 @@ const struct {
*
*
* ************************************************************************ */

#if defined(LUTON26_L25) || defined(LUTON26_L16) || defined(LUTON26_L10)
const char txt_TXT_NO_CHIP_NAME [] = {"SparX-III"};
#elif defined(VTSS_ARCH_OCELOT)
#if defined(VTSS_ARCH_OCELOT)
const char txt_TXT_NO_CHIP_NAME [] = {"Ferret"};
#endif


#if defined(LUTON26_L25)
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 25 Port Gigabit Ethernet Switch"};
#elif defined(LUTON26_L16)
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 16 Port Gigabit Ethernet Switch"};
#elif defined(LUTON26_L10)
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 10 Port Gigabit Ethernet Switch"};
#elif defined(FERRET_F11)
#if defined(FERRET_F11)
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 11 Port Gigabit Ethernet Switch"};
#elif defined(FERRET_F10P)
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 10 Port Gigabit Ethernet Switch"};
Expand All @@ -72,16 +63,10 @@ const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 5 Port Gigabit Ethernet Switc
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - 4 Port Gigabit Ethernet Switch"};
#else
const char txt_TXT_NO_SWITCH_DESCRIPTION [] = {" - Unknown switch description"};
#endif // LUTON26_L25
#endif


#if defined(LUTON26_L25)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7422 25 Port Switch"};
#elif defined(LUTON26_L16)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7421 16 Port Switch"};
#elif defined(LUTON26_L10)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7420 10 Port Switch"};
#elif defined(FERRET_F11)
#if defined(FERRET_F11)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7412 11 Port Switch"};
#elif defined(FERRET_F10P)
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7412 10 Port Switch"};
Expand All @@ -91,7 +76,7 @@ const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7411 5 Port Switch"};
const char txt_TXT_NO_SWITCH_NAME [] = {"VSC7411 4 Port Switch"};
#else
const char txt_TXT_NO_SWITCH_NAME [] = {"Unknown switch name"};
#endif // LUTON26_L25
#endif

#if TRANSIT_LLDP
// const char txt_TXT_NO_LLDP_OPTIONAL_TLVS [] = {"Optional TLVs"};
Expand Down

0 comments on commit 43cae47

Please sign in to comment.