From 665ac36fa8328a852876551140cd9fc6c4c22b94 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 12 Nov 2016 16:20:21 -0500 Subject: driver: added --type support (print image type). --- src/driver/pe_driver_ctx.c | 4 ++++ src/internal/perk_driver_impl.h | 1 + src/skin/pe_skin_default.c | 4 ++++ 3 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/driver/pe_driver_ctx.c b/src/driver/pe_driver_ctx.c index fdc2704..942291b 100644 --- a/src/driver/pe_driver_ctx.c +++ b/src/driver/pe_driver_ctx.c @@ -165,6 +165,10 @@ int pe_get_driver_ctx( pretty = entry->arg; break; + case TAG_IMGTYPE: + cctx.fmtflags |= PERK_OUTPUT_IMAGE_TYPE; + break; + case TAG_EXPSYMS: cctx.fmtflags |= PERK_OUTPUT_EXPORT_SYMS; break; diff --git a/src/internal/perk_driver_impl.h b/src/internal/perk_driver_impl.h index ae5adfc..78d55ae 100644 --- a/src/internal/perk_driver_impl.h +++ b/src/internal/perk_driver_impl.h @@ -16,6 +16,7 @@ enum app_tags { TAG_VERSION, TAG_OUTPUT, TAG_PRETTY, + TAG_IMGTYPE, TAG_EXPSYMS, TAG_IMPLIBS, TAG_IMPSYMS, diff --git a/src/skin/pe_skin_default.c b/src/skin/pe_skin_default.c index ad663e8..56fbd14 100644 --- a/src/skin/pe_skin_default.c +++ b/src/skin/pe_skin_default.c @@ -14,6 +14,9 @@ const struct argv_option pe_default_options[] = { {"pretty", 'p',TAG_PRETTY,ARGV_OPTARG_REQUIRED,0,"yaml|dlltool",0, "format output for parsing by %s"}, + {"type", 't',TAG_IMGTYPE,ARGV_OPTARG_NONE,0,0,0, + "print image type"}, + {"expsyms", 'e',TAG_EXPSYMS,ARGV_OPTARG_NONE,0,0,0, "print exported symbols" }, @@ -23,5 +26,6 @@ const struct argv_option pe_default_options[] = { {"impsyms", 'I',TAG_IMPSYMS,ARGV_OPTARG_NONE,0,0,0, "list direct dependency libraries " "along with required symbols"}, + {0,0,0,0,0,0,0,0} }; -- cgit v1.2.3