summaryrefslogtreecommitdiff
path: root/arch/common/blowfish.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/common/blowfish.h')
-rw-r--r--arch/common/blowfish.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/common/blowfish.h b/arch/common/blowfish.h
index ad4bdb92..ceec7a96 100644
--- a/arch/common/blowfish.h
+++ b/arch/common/blowfish.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 <blowfish.h>
-gchar *
+static void
benchmark_fish(void)
{
BLOWFISH_CTX ctx;
@@ -36,17 +36,14 @@ benchmark_fish(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);
- shell_status_update("Benchmarking...");
+ shell_status_update("Performing Blowfish benchmark...");
for (i = 0; i <= 50000; i++) {
g_timer_start(timer);
@@ -63,8 +60,6 @@ benchmark_fish(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, "Blowfish");
+
+ bench_results[BENCHMARK_BLOWFISH] = elapsed;
}