summaryrefslogtreecommitdiff
path: root/report.c
diff options
context:
space:
mode:
authorRobert Swiecki <robert@swiecki.net>2018-03-07 23:59:53 +0100
committerRobert Swiecki <robert@swiecki.net>2018-03-07 23:59:53 +0100
commita5b918a1ad5ce7f6372f6198d84afc9922826f7a (patch)
tree785b989cf52e22a18682ce4d8456117adf3af522 /report.c
parent5e26bd995c9cdd5db9b5463d7108e295220b9cec (diff)
downloadhonggfuzz-a5b918a1ad5ce7f6372f6198d84afc9922826f7a.tar.gz
honggfuzz: even more fields into substructs
Diffstat (limited to 'report.c')
-rw-r--r--report.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/report.c b/report.c
index 6976f3f2..f9d04406 100644
--- a/report.c
+++ b/report.c
@@ -38,14 +38,16 @@ static int reportFD = -1;
#if defined(_HF_ARCH_LINUX)
static void report_printdynFileMethod(run_t* run) {
dprintf(reportFD, " dynFileMethod: ");
- if (run->global->dynFileMethod == 0)
+ if (run->global->feedback.dynFileMethod == 0)
dprintf(reportFD, "NONE\n");
else {
- if (run->global->dynFileMethod & _HF_DYNFILE_INSTR_COUNT) dprintf(reportFD, "INSTR_COUNT ");
- if (run->global->dynFileMethod & _HF_DYNFILE_BRANCH_COUNT)
+ if (run->global->feedback.dynFileMethod & _HF_DYNFILE_INSTR_COUNT)
+ dprintf(reportFD, "INSTR_COUNT ");
+ if (run->global->feedback.dynFileMethod & _HF_DYNFILE_BRANCH_COUNT)
dprintf(reportFD, "BRANCH_COUNT ");
- if (run->global->dynFileMethod & _HF_DYNFILE_BTS_EDGE) dprintf(reportFD, "BTS_EDGE_COUNT ");
- if (run->global->dynFileMethod & _HF_DYNFILE_IPT_BLOCK)
+ if (run->global->feedback.dynFileMethod & _HF_DYNFILE_BTS_EDGE)
+ dprintf(reportFD, "BTS_EDGE_COUNT ");
+ if (run->global->feedback.dynFileMethod & _HF_DYNFILE_IPT_BLOCK)
dprintf(reportFD, "IPT_BLOCK_COUNT ");
dprintf(reportFD, "\n");
@@ -66,15 +68,15 @@ void report_Report(run_t* run) {
return;
}
- MX_SCOPED_LOCK(&run->global->report_mutex);
+ MX_SCOPED_LOCK(&run->global->cfg.report_mutex);
if (reportFD == -1) {
char reportFName[PATH_MAX];
- if (run->global->reportFile == NULL) {
+ if (run->global->cfg.reportFile == NULL) {
snprintf(reportFName, sizeof(reportFName), "%s/%s", run->global->io.workDir,
_HF_REPORT_FILE);
} else {
- snprintf(reportFName, sizeof(reportFName), "%s", run->global->reportFile);
+ snprintf(reportFName, sizeof(reportFName), "%s", run->global->cfg.reportFile);
}
reportFD = open(reportFName, O_WRONLY | O_CREAT | O_APPEND | O_CLOEXEC, 0644);