From c752b9a2b809b9973b08afc4f09393363ee67661 Mon Sep 17 00:00:00 2001 From: Vishnu S Date: Thu, 23 Oct 2025 19:54:13 +0530 Subject: [PATCH] Removed the --pax option from the Velocity CLI --- cli/common.h | 13 +------------ cli/main.c | 24 ------------------------ 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/cli/common.h b/cli/common.h index ecae51c..de862fd 100644 --- a/cli/common.h +++ b/cli/common.h @@ -30,8 +30,6 @@ int switchtec_handler(const char *optarg, void *value_addr, const struct argconfig_options *opt); int mfg_handler(const char *optarg, void *value_addr, const struct argconfig_options *opt); -int pax_handler(const char *optarg, void *value_addr, - const struct argconfig_options *opt); enum switchtec_fw_type check_and_print_fw_image(int img_fd, const char *img_filename); @@ -73,16 +71,7 @@ enum switchtec_fw_type check_and_print_fw_image(int img_fd, required_positional) #define __DEVICE_OPTION(type) \ - DEVICE_OPTION_BASIC(UART_HELP_TEXT, switchtec_handler, (type)), \ - { \ - "pax", 'x', .cfg_type=CFG_CUSTOM, \ - .value_addr=&cfg.dev, \ - .argument_type=required_argument, \ - .custom_handler=pax_handler, \ - .env="SWITCHTEC_PAX", \ - .help="PAX ID within a PAX fabric. Only valid on " \ - "Switchtec PAX devices" \ - } + DEVICE_OPTION_BASIC(UART_HELP_TEXT, switchtec_handler, (type)) #define DEVICE_OPTION __DEVICE_OPTION(required_positional) #define DEVICE_OPTION_OPTIONAL __DEVICE_OPTION(optional_positional) diff --git a/cli/main.c b/cli/main.c index b715ee1..1e5578a 100644 --- a/cli/main.c +++ b/cli/main.c @@ -122,30 +122,6 @@ int mfg_handler(const char *optarg, void *value_addr, return switchtec_handler(optarg, value_addr, opt); } -int pax_handler(const char *optarg, void *value_addr, - const struct argconfig_options *opt) -{ - char *end; - long num; - - errno = 0; - num = strtol(optarg, &end, 0); - global_pax_id = num; - - if ((end == optarg) || errno || num < 0 || - (global_pax_id & ~SWITCHTEC_PAX_ID_MASK)) { - fprintf(stderr, "Invalid PAX ID specified: %s\n", optarg); - return 1; - } - - if (set_global_pax_id()) { - fprintf(stderr, "%s: Setting PAX ID is not supported.\n", optarg); - return 4; - } - - return 0; -} - #define CMD_DESC_LIST "list all Switchtec devices on this machine" static int list(int argc, char **argv)