diff options
author | midipix <writeonce@midipix.org> | 2016-11-12 16:20:21 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-12 16:20:21 -0500 |
commit | 665ac36fa8328a852876551140cd9fc6c4c22b94 (patch) | |
tree | 32e9d8daeee46d87b6158c02f8417c21324c5019 /src | |
parent | b697ef4ed3024d0198d379fe73aede5669fab5de (diff) | |
download | perk-665ac36fa8328a852876551140cd9fc6c4c22b94.tar.bz2 perk-665ac36fa8328a852876551140cd9fc6c4c22b94.tar.xz |
driver: added --type support (print image type).
Diffstat (limited to 'src')
-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_default.c | 4 |
3 files changed, 9 insertions, 0 deletions
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} }; |