From 9026146d6d20c072dd93ff4f76de620fda673333 Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 19 Jun 2025 08:04:02 +0000 Subject: driver: added --cmd=strings support, pe_cmd_strings() stub, and perk-strings symlink. --- src/driver/pe_driver_ctx.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/driver/pe_driver_ctx.c') diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c index 8e652af..955484a 100644 --- a/src/driver/pe_driver_ctx.c +++ b/src/driver/pe_driver_ctx.c @@ -33,6 +33,7 @@ static const char * const perk_cmd_name[PERK_CMD_CAP] = { [PERK_CMD_SIZE] = "size", [PERK_CMD_STRIP] = "strip", [PERK_CMD_RANLIB] = "ranlib", + [PERK_CMD_STRINGS] = "strings", }; /* perk command options */ @@ -44,6 +45,7 @@ static const struct argv_option * perk_cmd_options[PERK_CMD_CAP] = { [PERK_CMD_SIZE] = pe_size_options, [PERK_CMD_STRIP] = pe_strip_options, [PERK_CMD_RANLIB] = pe_ranlib_options, + [PERK_CMD_STRINGS] = pe_strings_options, }; /* default fd context */ @@ -131,6 +133,12 @@ static int pe_driver_usage( cmdname,cmdname); break; + case PERK_CMD_STRINGS: + snprintf(header,sizeof(header), + PERK_STRINGS_CMD_SYNOPSIS, + cmdname,cmdname); + break; + case PERK_CMD_PERK: snprintf(header,sizeof(header), PERK_PERK_CMD_SYNOPSIS, @@ -530,6 +538,9 @@ int pe_lib_get_driver_ctx( } else if (cctx.cmd == PERK_CMD_RANLIB) { argv_optv_init(pe_ranlib_options,optv); + + } else if (cctx.cmd == PERK_CMD_STRINGS) { + argv_optv_init(pe_strings_options,optv); } /* process the selected tool's command-line arguments */ -- cgit v1.2.3