diff options
author | midipix <writeonce@midipix.org> | 2025-06-04 16:59:13 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2025-06-04 17:09:41 +0000 |
commit | eb64524975854b5c4ba6bb3e20b0642de0fb89a2 (patch) | |
tree | 12eb66bafae1488805320bae8d6ff6bd772c817a | |
parent | 7cc041cbae69077221e8bfeb7f09f3601743d28b (diff) | |
download | perk-eb64524975854b5c4ba6bb3e20b0642de0fb89a2.tar.bz2 perk-eb64524975854b5c4ba6bb3e20b0642de0fb89a2.tar.xz |
ar: pe_ar_print_members(): utility and driver integration.
-rw-r--r-- | src/cmds/pe_cmd_ar.c | 3 | ||||
-rw-r--r-- | src/driver/pe_driver_ctx.c | 4 | ||||
-rw-r--r-- | src/internal/perk_driver_impl.h | 1 | ||||
-rw-r--r-- | src/skin/pe_skin_ar.c | 4 |
4 files changed, 12 insertions, 0 deletions
diff --git a/src/cmds/pe_cmd_ar.c b/src/cmds/pe_cmd_ar.c index ae855fa..9d9423b 100644 --- a/src/cmds/pe_cmd_ar.c +++ b/src/cmds/pe_cmd_ar.c @@ -29,6 +29,9 @@ static int pe_cmd_ar_perform_unit_actions( if (action == PERK_DRIVER_AR_LIST_MEMBERS) { pe_ar_fn = pe_ar_list_members; + + } else if (action == PERK_DRIVER_AR_PRINT_ARCHIVE) { + pe_ar_fn = pe_ar_print_members; } if (pe_ar_fn(arctx->armeta,members) < 0) { diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c index 9290681..fc00c06 100644 --- a/src/driver/pe_driver_ctx.c +++ b/src/driver/pe_driver_ctx.c @@ -306,6 +306,10 @@ static int pe_cctx_update( case TAG_AR_LIST_MEMBERS: cctx->drvflags |= PERK_DRIVER_AR_LIST_MEMBERS; break; + + case TAG_AR_PRINT_MEMBERS: + cctx->drvflags |= PERK_DRIVER_AR_PRINT_ARCHIVE; + break; } } else { (*nunits)++; diff --git a/src/internal/perk_driver_impl.h b/src/internal/perk_driver_impl.h index 017638f..22e7894 100644 --- a/src/internal/perk_driver_impl.h +++ b/src/internal/perk_driver_impl.h @@ -33,6 +33,7 @@ enum app_tags { TAG_DSOSYMS, TAG_HDRDUMP, TAG_AR_LIST_MEMBERS, + TAG_AR_PRINT_MEMBERS, }; struct pe_driver_ctx_impl { diff --git a/src/skin/pe_skin_ar.c b/src/skin/pe_skin_ar.c index 639ce9a..af181ae 100644 --- a/src/skin/pe_skin_ar.c +++ b/src/skin/pe_skin_ar.c @@ -21,6 +21,10 @@ const perk_hidden struct argv_option pe_ar_options[] = { "or otherwise a detailed table of contents in " "verbose mode"}, + {"Wprint", 'p',TAG_AR_PRINT_MEMBERS,ARGV_OPTARG_NONE, + ARGV_OPTION_HYBRID_ONLY,0,0, + "print archive members"}, + {"Wpretty", 0,TAG_PRETTY,ARGV_OPTARG_REQUIRED, ARGV_OPTION_HYBRID_ONLY|ARGV_OPTION_HYBRID_EQUAL, "yaml|posix|hexdata",0, |