summaryrefslogtreecommitdiff
path: root/arch/common/sha1.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/common/sha1.h')
-rw-r--r--arch/common/sha1.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/common/sha1.h b/arch/common/sha1.h
index 4bd07276..3b7f7652 100644
--- a/arch/common/sha1.h
+++ b/arch/common/sha1.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
@@ -17,7 +17,7 @@
*/
#include <sha1.h>
-gchar *
+static void
benchmark_sha1(void)
{
SHA1_CTX ctx;
@@ -32,13 +32,10 @@ benchmark_sha1(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 +56,7 @@ benchmark_sha1(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, "SHA1");
+
+ bench_results[BENCHMARK_SHA1] = 312.0 / elapsed;
}