aboutsummaryrefslogtreecommitdiff
path: root/arch/common/md5.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/common/md5.h')
-rw-r--r--arch/common/md5.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/arch/common/md5.h b/arch/common/md5.h
index 256d6c3b..95d683bd 100644
--- a/arch/common/md5.h
+++ b/arch/common/md5.h
@@ -1,6 +1,6 @@
/*
* HardInfo - Displays System Information
- * Copyright (C) 2003-2006 Leandro A. F. Pereira <leandro@linuxmag.com.br>
+ * Copyright (C) 2003-2007 Leandro A. F. Pereira <leandro@linuxmag.com.br>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
#include <md5.h>
-gchar *
+static void
benchmark_md5(void)
{
struct MD5Context ctx;
@@ -33,12 +33,10 @@ benchmark_md5(void)
gchar *bdata_path;
- bdata_path = g_strdup_printf("%s/hardinfo/benchmark.data",
- gbr_find_data_dir(PREFIX));
+ bdata_path = g_build_filename(params.path_data, "benchmark.data", NULL);
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");
+ return;
}
shell_view_set_enabled(FALSE);
@@ -59,9 +57,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);
- return benchmark_include_results(retval, "MD5");
+
+ bench_results[BENCHMARK_MD5] = 312.0 / elapsed;
}