summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cmds/pe_cmd_ar.c3
-rw-r--r--src/driver/pe_driver_ctx.c4
-rw-r--r--src/internal/perk_driver_impl.h1
-rw-r--r--src/skin/pe_skin_ar.c4
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,