summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-30 19:59:44 -0500
committermidipix <writeonce@midipix.org>2016-11-30 19:59:44 -0500
commitb6ce09976af9f8fe50846806296d4c2b7fccda10 (patch)
treed5af880de408020ee8340823981efc48b2a33dcb /src
parent9fdefdbcf17d60170da462a8c65ad0f863b3f465 (diff)
downloadperk-b6ce09976af9f8fe50846806296d4c2b7fccda10.tar.bz2
perk-b6ce09976af9f8fe50846806296d4c2b7fccda10.tar.xz
struct pe_{raw|meta}_opt_hdr_img: member name normalization.
Diffstat (limited to 'src')
-rw-r--r--src/info/pe_get_image_framework.c6
-rw-r--r--src/info/pe_get_image_subsystem.c6
-rw-r--r--src/reader/pe_read_optional_header.c10
3 files changed, 11 insertions, 11 deletions
diff --git a/src/info/pe_get_image_framework.c b/src/info/pe_get_image_framework.c
index 26ffc1b..10594f6 100644
--- a/src/info/pe_get_image_framework.c
+++ b/src/info/pe_get_image_framework.c
@@ -85,13 +85,13 @@ int pe_get_image_framework(const struct pe_image_meta * m, struct pe_info_string
else if (pe_image_is_mingw(m))
framework = PE_FRAMEWORK_MINGW;
- else if (m->opt.img.subsystem == PE_IMAGE_SUBSYSTEM_POSIX_CUI)
+ else if (m->opt.img.coh_subsystem == PE_IMAGE_SUBSYSTEM_POSIX_CUI)
framework = PE_FRAMEWORK_SUACON;
- else if (m->opt.img.subsystem == PE_IMAGE_SUBSYSTEM_WINDOWS_CUI)
+ else if (m->opt.img.coh_subsystem == PE_IMAGE_SUBSYSTEM_WINDOWS_CUI)
framework = PE_FRAMEWORK_WINCON;
- else if (m->opt.img.subsystem == PE_IMAGE_SUBSYSTEM_WINDOWS_GUI)
+ else if (m->opt.img.coh_subsystem == PE_IMAGE_SUBSYSTEM_WINDOWS_GUI)
framework = PE_FRAMEWORK_WIN32;
else
diff --git a/src/info/pe_get_image_subsystem.c b/src/info/pe_get_image_subsystem.c
index e4529aa..28456e8 100644
--- a/src/info/pe_get_image_subsystem.c
+++ b/src/info/pe_get_image_subsystem.c
@@ -26,14 +26,14 @@ int pe_get_image_subsystem(const struct pe_image_meta * m, struct pe_info_string
{
int subsystem;
- if (m->opt.img.subsystem >= 0x10)
+ if (m->opt.img.coh_subsystem >= 0x10)
subsystem = -1;
- else if (!pe_subsystem_str[m->opt.img.subsystem])
+ else if (!pe_subsystem_str[m->opt.img.coh_subsystem])
subsystem = -1;
else
- subsystem = m->opt.img.subsystem;
+ subsystem = m->opt.img.coh_subsystem;
if ((subsystem < 0) && infostr) {
strcpy(infostr->buffer,"INVALID");
diff --git a/src/reader/pe_read_optional_header.c b/src/reader/pe_read_optional_header.c
index f331604..148dc2d 100644
--- a/src/reader/pe_read_optional_header.c
+++ b/src/reader/pe_read_optional_header.c
@@ -70,12 +70,12 @@ static int pe_read_optional_header_structs(const union pe_raw_opt_hdr * p, struc
m->align.coh_file_align = pe_read_long(aalign->coh_file_align);
/* img */
- m->img.size_of_image = pe_read_long(aimg->size_of_image);
- m->img.size_of_headers = pe_read_long(aimg->size_of_headers);
- m->img.checksum = pe_read_long(aimg->checksum);
+ m->img.coh_size_of_image = pe_read_long(aimg->coh_size_of_image);
+ m->img.coh_size_of_headers = pe_read_long(aimg->coh_size_of_headers);
+ m->img.coh_checksum = pe_read_long(aimg->coh_checksum);
- m->img.subsystem = pe_read_short(aimg->subsystem);
- m->img.dll_characteristics = pe_read_short(aimg->dll_characteristics);
+ m->img.coh_subsystem = pe_read_short(aimg->coh_subsystem);
+ m->img.coh_dll_characteristics = pe_read_short(aimg->coh_dll_characteristics);
/* ldr */
m->ldr.loader_flags = pe_read_long(aldr->loader_flags);