diff options
author | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:35 -0500 |
---|---|---|
committer | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:35 -0500 |
commit | 720f5023a8f68aaaa54cb6b7bf46efee23b5b4c3 (patch) | |
tree | 26a8d91183787418455f65c2bb44ed641800dad3 /arch/common/md5.h | |
parent | 854292407779593a401a1d5ce71add51880fa84f (diff) |
Import Upstream version 0.4.1
Diffstat (limited to 'arch/common/md5.h')
-rw-r--r-- | arch/common/md5.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/common/md5.h b/arch/common/md5.h index f61aef0f..256d6c3b 100644 --- a/arch/common/md5.h +++ b/arch/common/md5.h @@ -31,8 +31,12 @@ benchmark_md5(void) tmpsrc = src; - if (!g_file_get_contents(PREFIX "benchmark.data", - &tmpsrc, NULL, NULL)) { + gchar *bdata_path; + + bdata_path = g_strdup_printf("%s/hardinfo/benchmark.data", + gbr_find_data_dir(PREFIX)); + if (!g_file_get_contents(bdata_path, &tmpsrc, NULL, NULL)) { + g_free(bdata_path); return g_strdup("[Error]\n" PREFIX "benchmark.data not found=\n"); } @@ -54,6 +58,7 @@ benchmark_md5(void) } g_timer_destroy(timer); + g_free(bdata_path); gchar *retval = g_strdup_printf("[Results <i>(in seconds; lower is better)</i>]\n" "<b>This Machine</b>=<b>%.2f</b>\n", elapsed); |