diff options
Diffstat (limited to 'arch')
552 files changed, 1569 insertions, 6442 deletions
diff --git a/arch/.svn/README.txt b/arch/.svn/README.txt deleted file mode 100644 index 271a8ce9..00000000 --- a/arch/.svn/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a Subversion working copy administrative directory. -Visit http://subversion.tigris.org/ for more information. diff --git a/arch/.svn/empty-file b/arch/.svn/empty-file deleted file mode 100644 index e69de29b..00000000 --- a/arch/.svn/empty-file +++ /dev/null diff --git a/arch/.svn/entries b/arch/.svn/entries deleted file mode 100644 index 1e500800..00000000 --- a/arch/.svn/entries +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<wc-entries - xmlns="svn:"> -<entry - committed-rev="9" - name="" - committed-date="2006-03-07T18:26:23.507991Z" - url="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo/trunk/hardinfo2/arch" - last-author="lafp" - kind="dir" - uuid="03931a0e-0c0b-0410-87e6-c9e79dddb921" - repos="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo" - revision="9"/> -<entry - name="linux" - kind="dir"/> -<entry - name="common" - kind="dir"/> -</wc-entries> diff --git a/arch/.svn/format b/arch/.svn/format deleted file mode 100644 index b8626c4c..00000000 --- a/arch/.svn/format +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/arch/common/.svn/README.txt b/arch/common/.svn/README.txt deleted file mode 100644 index 271a8ce9..00000000 --- a/arch/common/.svn/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a Subversion working copy administrative directory. -Visit http://subversion.tigris.org/ for more information. diff --git a/arch/common/.svn/empty-file b/arch/common/.svn/empty-file deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/empty-file +++ /dev/null diff --git a/arch/common/.svn/entries b/arch/common/.svn/entries deleted file mode 100644 index 04b48187..00000000 --- a/arch/common/.svn/entries +++ /dev/null @@ -1,101 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<wc-entries - xmlns="svn:"> -<entry - committed-rev="5" - name="" - committed-date="2006-02-01T00:06:47.257372Z" - url="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo/trunk/hardinfo2/arch/common" - last-author="lafp" - kind="dir" - uuid="03931a0e-0c0b-0410-87e6-c9e79dddb921" - repos="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo" - revision="9"/> -<entry - committed-rev="10" - name="sha1.h" - text-time="2006-05-20T14:32:18.000000Z" - committed-date="2006-05-20T14:41:28.523270Z" - checksum="7254615d07c6be90bdafc764ca8e8f9f" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z" - revision="10"/> -<entry - committed-rev="10" - name="blowfish.h" - text-time="2006-05-20T14:32:18.000000Z" - committed-date="2006-05-20T14:41:28.523270Z" - checksum="d9411117551a66fd14fc8d6b13f1a04c" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z" - revision="10"/> -<entry - committed-rev="1" - name="fib.h" - text-time="2006-05-20T14:32:18.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="3de942d27f53135b370c1b88f45220c8" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z"/> -<entry - committed-rev="10" - name="zlib.h" - text-time="2006-05-20T14:32:18.000000Z" - committed-date="2006-05-20T14:41:28.523270Z" - checksum="e7c594c5913d0847a0e2b9bfd5d062d4" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z" - revision="10"/> -<entry - committed-rev="10" - name="users.h" - text-time="2006-05-22T11:31:37.000000Z" - committed-date="2006-05-20T14:41:28.523270Z" - checksum="216feeb3fed867dacbc8a8181d0d960d" - last-author="lafp" - kind="file" - revision="10"/> -<entry - committed-rev="1" - name="display.h" - text-time="2006-05-20T14:32:18.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="9b9fe0f1472481b59436cdd18dbacfd4" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:30.000000Z"/> -<entry - committed-rev="10" - name="md5.h" - text-time="2006-05-20T14:32:18.000000Z" - committed-date="2006-05-20T14:41:28.523270Z" - checksum="6f1b0aaf6549a02d95e1a56a42e4088b" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:30.000000Z" - revision="10"/> -<entry - committed-rev="10" - name="languages.h" - text-time="2006-05-20T14:32:18.000000Z" - committed-date="2006-05-20T14:41:28.523270Z" - checksum="5c168fa59cb0589bf24d62cba96943e6" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:30.000000Z" - revision="10"/> -<entry - committed-rev="17" - name="printers.h" - text-time="2006-06-10T12:43:57.000000Z" - committed-date="2006-06-10T12:46:54.945064Z" - checksum="6c4f384feae5b86188161fe27530c3b7" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:30.000000Z" - revision="17"/> -</wc-entries> diff --git a/arch/common/.svn/format b/arch/common/.svn/format deleted file mode 100644 index b8626c4c..00000000 --- a/arch/common/.svn/format +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/arch/common/.svn/prop-base/blowfish.h.svn-base b/arch/common/.svn/prop-base/blowfish.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/prop-base/blowfish.h.svn-base +++ /dev/null diff --git a/arch/common/.svn/prop-base/display.h.svn-base b/arch/common/.svn/prop-base/display.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/prop-base/display.h.svn-base +++ /dev/null diff --git a/arch/common/.svn/prop-base/fib.h.svn-base b/arch/common/.svn/prop-base/fib.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/prop-base/fib.h.svn-base +++ /dev/null diff --git a/arch/common/.svn/prop-base/languages.h.svn-base b/arch/common/.svn/prop-base/languages.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/prop-base/languages.h.svn-base +++ /dev/null diff --git a/arch/common/.svn/prop-base/md5.h.svn-base b/arch/common/.svn/prop-base/md5.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/prop-base/md5.h.svn-base +++ /dev/null diff --git a/arch/common/.svn/prop-base/printers.h.svn-base b/arch/common/.svn/prop-base/printers.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/prop-base/printers.h.svn-base +++ /dev/null diff --git a/arch/common/.svn/prop-base/sha1.h.svn-base b/arch/common/.svn/prop-base/sha1.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/prop-base/sha1.h.svn-base +++ /dev/null diff --git a/arch/common/.svn/prop-base/zlib.h.svn-base b/arch/common/.svn/prop-base/zlib.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/prop-base/zlib.h.svn-base +++ /dev/null diff --git a/arch/common/.svn/props/blowfish.h.svn-work b/arch/common/.svn/props/blowfish.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/props/blowfish.h.svn-work +++ /dev/null diff --git a/arch/common/.svn/props/display.h.svn-work b/arch/common/.svn/props/display.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/props/display.h.svn-work +++ /dev/null diff --git a/arch/common/.svn/props/fib.h.svn-work b/arch/common/.svn/props/fib.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/props/fib.h.svn-work +++ /dev/null diff --git a/arch/common/.svn/props/languages.h.svn-work b/arch/common/.svn/props/languages.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/props/languages.h.svn-work +++ /dev/null diff --git a/arch/common/.svn/props/md5.h.svn-work b/arch/common/.svn/props/md5.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/props/md5.h.svn-work +++ /dev/null diff --git a/arch/common/.svn/props/printers.h.svn-work b/arch/common/.svn/props/printers.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/props/printers.h.svn-work +++ /dev/null diff --git a/arch/common/.svn/props/sha1.h.svn-work b/arch/common/.svn/props/sha1.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/props/sha1.h.svn-work +++ /dev/null diff --git a/arch/common/.svn/props/zlib.h.svn-work b/arch/common/.svn/props/zlib.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/common/.svn/props/zlib.h.svn-work +++ /dev/null diff --git a/arch/common/.svn/text-base/blowfish.h.svn-base b/arch/common/.svn/text-base/blowfish.h.svn-base deleted file mode 100644 index ad4bdb92..00000000 --- a/arch/common/.svn/text-base/blowfish.h.svn-base +++ /dev/null @@ -1,70 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include <blowfish.h> - -gchar * -benchmark_fish(void) -{ - BLOWFISH_CTX ctx; - GTimer *timer = g_timer_new(); - gdouble elapsed = 0; - gchar src[65536], *tmpsrc; - glong srclen = 65536; - unsigned long L, R; - int i; - - tmpsrc = src; - - L = 0xBEBACAFE; - R = 0xDEADBEEF; - - 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"); - } - - shell_view_set_enabled(FALSE); - shell_status_update("Benchmarking..."); - - for (i = 0; i <= 50000; i++) { - g_timer_start(timer); - - Blowfish_Init(&ctx, (unsigned char*)tmpsrc, srclen); - Blowfish_Encrypt(&ctx, &L, &R); - Blowfish_Decrypt(&ctx, &L, &R); - - g_timer_stop(timer); - elapsed += g_timer_elapsed(timer, NULL); - - shell_status_set_percentage(i/500); - } - - 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"); -} diff --git a/arch/common/.svn/text-base/display.h.svn-base b/arch/common/.svn/text-base/display.h.svn-base deleted file mode 100644 index 6731e3e3..00000000 --- a/arch/common/.svn/text-base/display.h.svn-base +++ /dev/null @@ -1,137 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static void -get_glx_info(DisplayInfo *di) -{ - gchar *output; - if (g_spawn_command_line_sync("glxinfo", &output, NULL, NULL, NULL)) { - gchar **output_lines, **old; - - output_lines = g_strsplit(output, "\n", 0); - g_free(output); - - old = output_lines; - while (*(++output_lines)) { - if (strstr(*output_lines, "OpenGL")) { - gchar **tmp = g_strsplit(*output_lines, ":", 0); - - tmp[1] = g_strchug(tmp[1]); - - get_str("OpenGL vendor str", di->ogl_vendor); - get_str("OpenGL renderer str", di->ogl_renderer); - get_str("OpenGL version str", di->ogl_version); - - g_strfreev(tmp); - } - } - - g_strfreev(old); - - if (!di->ogl_vendor) - di->ogl_vendor = "Unknown"; - if (!di->ogl_renderer) - di->ogl_renderer = "Unknown"; - if (!di->ogl_version) - di->ogl_version = "Unknown"; - } else { - di->ogl_vendor = di->ogl_renderer = di->ogl_version = "Unknown"; - } - -} - -static void -get_x11_info(DisplayInfo *di) -{ - gchar *output; - - if (g_spawn_command_line_sync("xdpyinfo", &output, NULL, NULL, NULL)) { - gchar **output_lines, **old; - - output_lines = g_strsplit(output, "\n", 0); - g_free(output); - - old = output_lines; - while (*(output_lines++)) { - gchar **tmp = g_strsplit(*output_lines, ":", 0); - - if (tmp[1] && tmp[0]) { - tmp[1] = g_strchug(tmp[1]); - - get_str("vendor string", di->vendor); - get_str("X.Org version", di->version); - get_str("XFree86 version", di->version); - - if (g_str_has_prefix(tmp[0], "number of extensions")) { - int n; - - di->extensions = ""; - - for (n = atoi(tmp[1]); n; n--) { - di->extensions = g_strconcat(di->extensions, - g_strstrip(*(++output_lines)), - "=\n", - NULL); - } - g_strfreev(tmp); - - break; - } - } - - g_strfreev(tmp); - } - - g_strfreev(old); - } - - GdkScreen *screen = gdk_screen_get_default(); - - if (screen && GDK_IS_SCREEN(screen)) { - gint n_monitors = gdk_screen_get_n_monitors(screen); - gint i; - - di->monitors = ""; - for (i = 0; i < n_monitors; i++) { - GdkRectangle rect; - - gdk_screen_get_monitor_geometry(screen, i, &rect); - - di->monitors = g_strdup_printf("%sMonitor %d=%dx%d pixels\n", - di->monitors, i, rect.width, rect.height); - } - } else { - di->monitors = ""; - } -} - -static DisplayInfo * -computer_get_display(void) -{ - DisplayInfo *di = g_new0(DisplayInfo, 1); - - GdkScreen *screen = gdk_screen_get_default(); - - di->width = gdk_screen_get_width(screen); - di->height = gdk_screen_get_height(screen); - - get_glx_info(di); - get_x11_info(di); - - return di; -} diff --git a/arch/common/.svn/text-base/languages.h.svn-base b/arch/common/.svn/text-base/languages.h.svn-base deleted file mode 100644 index 71e05dab..00000000 --- a/arch/common/.svn/text-base/languages.h.svn-base +++ /dev/null @@ -1,102 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -void -scan_languages(OperatingSystem * os) -{ - FILE *locale; - gchar buf[512], *retval = ""; - - locale = popen("locale -va", "r"); - if (!locale) - return; - - gchar name[32]; - gchar *title = NULL, - *source = NULL, - *address = NULL, - *email = NULL, - *language = NULL, - *territory = NULL, - *revision = NULL, - *date = NULL, - *codeset = NULL; - - while (fgets(buf, 512, locale)) { - if (!strncmp(buf, "locale:", 7)) { - sscanf(buf, "locale: %s", name); - fgets(buf, 128, locale); - } else if (strchr(buf, '|')) { - gchar **tmp = g_strsplit(buf, "|", 2); - - tmp[0] = g_strstrip(tmp[0]); - - if (tmp[1]) { - tmp[1] = g_strstrip(tmp[1]); - - get_str("title", title); - get_str("source", source); - get_str("address", address); - get_str("email", email); - get_str("language", language); - get_str("territory", territory); - get_str("revision", revision); - get_str("date", date); - get_str("codeset", codeset); - } - - g_strfreev(tmp); - } else { - gchar *currlocale; - - retval = g_strdup_printf("%s$%s$%s=%s\n", retval, name, name, title); - - currlocale = g_strdup_printf("[Locale Information]\n" - "Name=%s (%s)\n" - "Source=%s\n" - "Address=%s\n" - "Email=%s\n" - "Language=%s\n" - "Territory=%s\n" - "Revision=%s\n" - "Date=%s\n" - "Codeset=%s\n", name, title, - source, address, email, language, - territory, revision, date, - codeset); - - g_hash_table_insert(moreinfo, g_strdup(name), currlocale); - - g_free(title); - g_free(source); - g_free(address); - g_free(email); - g_free(language); - g_free(territory); - g_free(revision); - g_free(date); - g_free(codeset); - - title = source = address = email = language = territory = \ - revision = date = codeset = NULL; - } - } - - fclose(locale); - - os->languages = retval; -} diff --git a/arch/common/.svn/text-base/md5.h.svn-base b/arch/common/.svn/text-base/md5.h.svn-base deleted file mode 100644 index 256d6c3b..00000000 --- a/arch/common/.svn/text-base/md5.h.svn-base +++ /dev/null @@ -1,67 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include <md5.h> - -gchar * -benchmark_md5(void) -{ - struct MD5Context ctx; - guchar checksum[16]; - int i; - GTimer *timer = g_timer_new(); - gdouble elapsed = 0; - gchar src[65536], *tmpsrc; - glong srclen = 65536; - - tmpsrc = src; - - 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"); - } - - shell_view_set_enabled(FALSE); - shell_status_update("Generating MD5 sum for 312MiB of data..."); - - for (i = 0; i <= 5000; i++) { - g_timer_start(timer); - - MD5Init(&ctx); - MD5Update(&ctx, (guchar*)tmpsrc, srclen); - MD5Final(checksum, &ctx); - - g_timer_stop(timer); - elapsed += g_timer_elapsed(timer, NULL); - - shell_status_set_percentage(i/50); - } - - 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"); -} - diff --git a/arch/common/.svn/text-base/printers.h.svn-base b/arch/common/.svn/text-base/printers.h.svn-base deleted file mode 100644 index 01beb5dd..00000000 --- a/arch/common/.svn/text-base/printers.h.svn-base +++ /dev/null @@ -1,81 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -void -scan_printers(void) -{ - static GModule *cups = NULL; - static int (*cupsGetPrinters) (char ***printers) = NULL; - static char *(*cupsGetDefault) (void) = NULL; - static char *libcups[] = { "libcups", - "libcups.so", - "libcups.so.1", - "libcups.so.2", - NULL }; - - if (printer_list) - g_free(printer_list); - - if (!(cupsGetPrinters && cupsGetDefault)) { - int i; - - for (i = 0; libcups[i] != NULL; i++) { - cups = g_module_open(libcups[i], G_MODULE_BIND_LAZY); - if (cups) - break; - } - - if (!cups) { - printer_list = g_strdup("[Printers]\n" - "CUPS libraries cannot be found="); - return; - } - - if (!g_module_symbol(cups, "cupsGetPrinters", (gpointer) & cupsGetPrinters) - || !g_module_symbol(cups, "cupsGetDefault", - (gpointer) & cupsGetDefault)) { - printer_list = - g_strdup("[Printers]\n" - "No suitable CUPS library found="); - g_module_close(cups); - return; - } - } - - gchar **printers; - int noprinters, i; - const char *default_printer; - - noprinters = cupsGetPrinters(&printers); - default_printer = cupsGetDefault(); - - if (noprinters > 0) { - printer_list = g_strdup_printf("[Printers (CUPS)]\n"); - for (i = 0; i < noprinters; i++) { - printer_list = g_strconcat(printer_list, printers[i], - !strcmp(default_printer, - printers[i]) ? - "=<i>(Default)</i>\n" : "=\n", - NULL); - g_free(printers[i]); - } - } else { - printer_list = g_strdup("[Printers]\n" - "No printers found"); - } -} diff --git a/arch/common/.svn/text-base/sha1.h.svn-base b/arch/common/.svn/text-base/sha1.h.svn-base deleted file mode 100644 index 4bd07276..00000000 --- a/arch/common/.svn/text-base/sha1.h.svn-base +++ /dev/null @@ -1,67 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -#include <sha1.h> - -gchar * -benchmark_sha1(void) -{ - SHA1_CTX ctx; - guchar checksum[20]; - int i; - GTimer *timer = g_timer_new(); - gdouble elapsed = 0; - gchar src[65536], *tmpsrc; - glong srclen = 65536; - - tmpsrc = src; - - 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"); - } - - shell_view_set_enabled(FALSE); - shell_status_update("Generating SHA1 sum for 312MiB of data..."); - - for (i = 0; i <= 5000; i++) { - g_timer_start(timer); - - SHA1Init(&ctx); - SHA1Update(&ctx, (guchar*)tmpsrc, srclen); - SHA1Final(checksum, &ctx); - - g_timer_stop(timer); - elapsed += g_timer_elapsed(timer, NULL); - - shell_status_set_percentage(i/50); - } - - 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"); -} - diff --git a/arch/common/.svn/text-base/users.h.svn-base b/arch/common/.svn/text-base/users.h.svn-base deleted file mode 100644 index 08acd97a..00000000 --- a/arch/common/.svn/text-base/users.h.svn-base +++ /dev/null @@ -1,63 +0,0 @@ -static gchar *sys_users = NULL, - *human_users = NULL; - -static gboolean -remove_users(gpointer key, gpointer value, gpointer data) -{ - if (!strncmp((gchar *) key, "USER", 4)) { - /* - * g_free((gchar *) key); - * g_free((GtkTreeIter *) value); - */ - return TRUE; - } - return FALSE; -} - -void scan_users(void) -{ - FILE *passwd; - char buffer[512]; - - passwd = fopen("/etc/passwd", "r"); - if (!passwd) - return; - - if (sys_users) { - g_free(sys_users); - g_free(human_users); - - g_hash_table_foreach_remove(moreinfo, remove_users, NULL); - } - - sys_users = g_strdup(""); - human_users = g_strdup(""); - - while (fgets(buffer, 512, passwd)) { - gchar **tmp; - gint uid; - - tmp = g_strsplit(buffer, ":", 0); - - gchar *key = g_strdup_printf("USER%s", tmp[0]); - gchar *val = g_strdup_printf("[User Information]\n" - "User ID=%s\n" - "Group ID=%s\n" - "Home directory=%s\n" - "Default shell=%s\n", - tmp[2], tmp[3], tmp[5], tmp[6]); - g_hash_table_insert(moreinfo, key, val); - - uid = atoi(tmp[2]); - strend(tmp[4], ','); - if (uid >= 1000 && uid <= 65530) { - human_users = g_strdup_printf("%s$%s$%s=%s\n", human_users, key, tmp[0], tmp[4]); - } else { - sys_users = g_strdup_printf("%s$%s$%s=%s\n", sys_users, key, tmp[0], tmp[4]); - } - - g_strfreev(tmp); - } - - fclose(passwd); -} diff --git a/arch/common/.svn/text-base/zlib.h.svn-base b/arch/common/.svn/text-base/zlib.h.svn-base deleted file mode 100644 index 2a1007ed..00000000 --- a/arch/common/.svn/text-base/zlib.h.svn-base +++ /dev/null @@ -1,90 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static gchar * -benchmark_zlib(void) -{ - GModule *libz; - static gulong (*compressBound) (glong srclen) = NULL; - static gint (*compress) (gchar *dst, glong *dstlen, - const gchar *src, glong srclen) = NULL; - - if (!(compress && compressBound)) { - libz = g_module_open("libz", G_MODULE_BIND_LAZY); - if (!libz) { - libz = g_module_open("/lib/libz.so", G_MODULE_BIND_LAZY); - if (!libz) { - g_warning("Cannot load ZLib: %s", g_module_error()); - return g_strdup("[Error]\n" - "ZLib not found="); - } - } - - if (!g_module_symbol(libz, "compress", (gpointer) & compress) - || !g_module_symbol(libz, "compressBound", (gpointer) & compressBound)) { - - g_module_close(libz); - return g_strdup("[Error]\n" - "Invalid Z-Lib found="); - } - } - - shell_view_set_enabled(FALSE); - - int i; - GTimer *timer = g_timer_new(); - gdouble elapsed = 0; - gchar src[65536], *tmpsrc; - glong srclen = 65536; - 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"); - } - - shell_status_update("Compressing 64MB with default options..."); - - for (i = 0; i <= 1000; i++) { - g_timer_start(timer); - - gchar *dst; - glong dstlen = compressBound(srclen); - - dst = g_new0(gchar, dstlen); - compress(dst, &dstlen, src, srclen); - - g_timer_stop(timer); - elapsed += g_timer_elapsed(timer, NULL); - g_free(dst); - - shell_status_set_percentage(i/10); - } - - 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, "ZLib"); -} - 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; } diff --git a/arch/common/display.h b/arch/common/display.h index 6731e3e3..b4fe643e 100644 --- a/arch/common/display.h +++ b/arch/common/display.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 @@ -21,15 +21,14 @@ get_glx_info(DisplayInfo *di) { gchar *output; if (g_spawn_command_line_sync("glxinfo", &output, NULL, NULL, NULL)) { - gchar **output_lines, **old; - - output_lines = g_strsplit(output, "\n", 0); - g_free(output); + gchar **output_lines; + gint i = 0; - old = output_lines; - while (*(++output_lines)) { - if (strstr(*output_lines, "OpenGL")) { - gchar **tmp = g_strsplit(*output_lines, ":", 0); + for (output_lines = g_strsplit(output, "\n", 0); + output_lines && output_lines[i]; + i++) { + if (strstr(output_lines[i], "OpenGL")) { + gchar **tmp = g_strsplit(output_lines[i], ":", 0); tmp[1] = g_strchug(tmp[1]); @@ -38,10 +37,13 @@ get_glx_info(DisplayInfo *di) get_str("OpenGL version str", di->ogl_version); g_strfreev(tmp); + } else if (strstr(output_lines[i], "direct rendering: Yes")) { + di->dri = TRUE; } } - g_strfreev(old); + g_free(output); + g_strfreev(output_lines); if (!di->ogl_vendor) di->ogl_vendor = "Unknown"; @@ -126,9 +128,13 @@ computer_get_display(void) DisplayInfo *di = g_new0(DisplayInfo, 1); GdkScreen *screen = gdk_screen_get_default(); - - di->width = gdk_screen_get_width(screen); - di->height = gdk_screen_get_height(screen); + + if (screen && GDK_IS_SCREEN(screen)) { + di->width = gdk_screen_get_width(screen); + di->height = gdk_screen_get_height(screen); + } else { + di->width = di->height = 0; + } get_glx_info(di); get_x11_info(di); diff --git a/arch/common/fib.h b/arch/common/fib.h index 493cfd0f..645002fa 100644 --- a/arch/common/fib.h +++ b/arch/common/fib.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 @@ -16,35 +16,33 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static unsigned long long -fib(unsigned long long n) +static gulong +fib(gulong n) { if (n == 0) return 0; - else if (n == 1 || n == 2) + else if (n <= 2) return 1; return fib(n - 1) + fib(n - 2); } -static gchar * +static void benchmark_fib(void) { GTimer *timer = g_timer_new(); - gdouble elapsed = 0; + gdouble elapsed; shell_view_set_enabled(FALSE); - shell_status_update("Calculating the 42<sup>th</sup> Fibonacci number..."); + shell_status_update("Calculating the 42nd Fibonacci number..."); + g_timer_reset(timer); g_timer_start(timer); - fib(42); /* the answer? :) */ - g_timer_stop(timer); - elapsed = g_timer_elapsed(timer, NULL); + fib(42); + g_timer_stop(timer); + elapsed = g_timer_elapsed(timer, NULL); g_timer_destroy(timer); - - 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, "Fibonacci"); + + bench_results[BENCHMARK_FIB] = elapsed; } - diff --git a/arch/common/languages.h b/arch/common/languages.h index 71e05dab..786b829f 100644 --- a/arch/common/languages.h +++ b/arch/common/languages.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 @@ -15,6 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + void scan_languages(OperatingSystem * os) { @@ -65,6 +66,7 @@ scan_languages(OperatingSystem * os) retval = g_strdup_printf("%s$%s$%s=%s\n", retval, name, name, title); +#define FIELD(f) f ? f : "(Unknown)" currlocale = g_strdup_printf("[Locale Information]\n" "Name=%s (%s)\n" "Source=%s\n" @@ -74,10 +76,13 @@ scan_languages(OperatingSystem * os) "Territory=%s\n" "Revision=%s\n" "Date=%s\n" - "Codeset=%s\n", name, title, - source, address, email, language, - territory, revision, date, - codeset); + "Codeset=%s\n", + FIELD(name), FIELD(title), + FIELD(source), FIELD(address), + FIELD(email), FIELD(language), + FIELD(territory), FIELD(revision), + FIELD(date), FIELD(codeset)); +#undef FIELD g_hash_table_insert(moreinfo, g_strdup(name), currlocale); 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; } diff --git a/arch/common/printers.h b/arch/common/printers.h index 01beb5dd..3daf28e6 100644 --- a/arch/common/printers.h +++ b/arch/common/printers.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,11 +17,12 @@ */ void -scan_printers(void) +__scan_printers(void) { static GModule *cups = NULL; static int (*cupsGetPrinters) (char ***printers) = NULL; static char *(*cupsGetDefault) (void) = NULL; + static char *libcups[] = { "libcups", "libcups.so", "libcups.so.1", @@ -47,11 +48,9 @@ scan_printers(void) } if (!g_module_symbol(cups, "cupsGetPrinters", (gpointer) & cupsGetPrinters) - || !g_module_symbol(cups, "cupsGetDefault", - (gpointer) & cupsGetDefault)) { - printer_list = - g_strdup("[Printers]\n" - "No suitable CUPS library found="); + || !g_module_symbol(cups, "cupsGetDefault", (gpointer) & cupsGetDefault)) { + printer_list = g_strdup("[Printers]\n" + "No suitable CUPS library found="); g_module_close(cups); return; } @@ -63,19 +62,22 @@ scan_printers(void) noprinters = cupsGetPrinters(&printers); default_printer = cupsGetDefault(); - + + if (!default_printer) { + default_printer = ""; + } + if (noprinters > 0) { printer_list = g_strdup_printf("[Printers (CUPS)]\n"); for (i = 0; i < noprinters; i++) { printer_list = g_strconcat(printer_list, printers[i], - !strcmp(default_printer, - printers[i]) ? + g_str_equal(default_printer, printers[i]) ? "=<i>(Default)</i>\n" : "=\n", NULL); g_free(printers[i]); } } else { printer_list = g_strdup("[Printers]\n" - "No printers found"); + "No printers found=\n"); } } diff --git a/arch/common/.svn/text-base/fib.h.svn-base b/arch/common/raytrace.h index 493cfd0f..af9f2afa 100644 --- a/arch/common/.svn/text-base/fib.h.svn-base +++ b/arch/common/raytrace.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 @@ -16,35 +16,31 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static unsigned long long -fib(unsigned long long n) -{ - if (n == 0) - return 0; - else if (n == 1 || n == 2) - return 1; - return fib(n - 1) + fib(n - 2); -} +void fbench(); /* fbench.c */ -static gchar * -benchmark_fib(void) +static void +benchmark_raytrace(void) { + int i; GTimer *timer = g_timer_new(); gdouble elapsed = 0; shell_view_set_enabled(FALSE); - shell_status_update("Calculating the 42<sup>th</sup> Fibonacci number..."); + shell_status_update("Performing John Walker's FBENCH..."); - g_timer_start(timer); - fib(42); /* the answer? :) */ - g_timer_stop(timer); - - elapsed = g_timer_elapsed(timer, NULL); + for (i = 0; i <= 1000; i++) { + g_timer_start(timer); + + fbench(); + + g_timer_stop(timer); + elapsed += g_timer_elapsed(timer, NULL); + + shell_status_set_percentage(i/10); + } g_timer_destroy(timer); - - 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, "Fibonacci"); + + bench_results[BENCHMARK_RAYTRACE] = elapsed; } 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; } diff --git a/arch/common/users.h b/arch/common/users.h index 08acd97a..84cec9d9 100644 --- a/arch/common/users.h +++ b/arch/common/users.h @@ -14,7 +14,8 @@ remove_users(gpointer key, gpointer value, gpointer data) return FALSE; } -void scan_users(void) +static void +scan_users_do(void) { FILE *passwd; char buffer[512]; diff --git a/arch/common/zlib.h b/arch/common/zlib.h index 2a1007ed..96d20944 100644 --- a/arch/common/zlib.h +++ b/arch/common/zlib.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 @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static gchar * +static void benchmark_zlib(void) { GModule *libz; @@ -27,11 +27,10 @@ benchmark_zlib(void) if (!(compress && compressBound)) { libz = g_module_open("libz", G_MODULE_BIND_LAZY); if (!libz) { - libz = g_module_open("/lib/libz.so", G_MODULE_BIND_LAZY); + libz = g_module_open("/usr/lib/libz.so", G_MODULE_BIND_LAZY); if (!libz) { g_warning("Cannot load ZLib: %s", g_module_error()); - return g_strdup("[Error]\n" - "ZLib not found="); + return; } } @@ -39,8 +38,7 @@ benchmark_zlib(void) || !g_module_symbol(libz, "compressBound", (gpointer) & compressBound)) { g_module_close(libz); - return g_strdup("[Error]\n" - "Invalid Z-Lib found="); + return; } } @@ -53,13 +51,10 @@ benchmark_zlib(void) glong srclen = 65536; 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_status_update("Compressing 64MB with default options..."); @@ -82,9 +77,6 @@ benchmark_zlib(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, "ZLib"); + + bench_results[BENCHMARK_ZLIB] = 65536.0 / elapsed; } - diff --git a/arch/linux/.svn/README.txt b/arch/linux/.svn/README.txt deleted file mode 100644 index 271a8ce9..00000000 --- a/arch/linux/.svn/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a Subversion working copy administrative directory. -Visit http://subversion.tigris.org/ for more information. diff --git a/arch/linux/.svn/empty-file b/arch/linux/.svn/empty-file deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/.svn/empty-file +++ /dev/null diff --git a/arch/linux/.svn/entries b/arch/linux/.svn/entries deleted file mode 100644 index 5a69dcd8..00000000 --- a/arch/linux/.svn/entries +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<wc-entries - xmlns="svn:"> -<entry - committed-rev="9" - name="" - committed-date="2006-03-07T18:26:23.507991Z" - url="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo/trunk/hardinfo2/arch/linux" - last-author="lafp" - kind="dir" - uuid="03931a0e-0c0b-0410-87e6-c9e79dddb921" - repos="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo" - revision="9"/> -<entry - name="parisc" - kind="dir"/> -<entry - name="ppc" - kind="dir"/> -<entry - name="m68k" - kind="dir"/> -<entry - name="x86" - kind="dir"/> -<entry - name="armv4l" - kind="dir"/> -<entry - name="common" - kind="dir"/> -<entry - name="mips" - kind="dir"/> -<entry - name="sparc" - kind="dir"/> -<entry - committed-rev="1" - name="x86_64" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="6a53d0a8e77cb5fc139bb4eb46911fa9" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z"/> -</wc-entries> diff --git a/arch/linux/.svn/format b/arch/linux/.svn/format deleted file mode 100644 index b8626c4c..00000000 --- a/arch/linux/.svn/format +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/arch/linux/.svn/prop-base/x86_64.svn-base b/arch/linux/.svn/prop-base/x86_64.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/.svn/prop-base/x86_64.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/.svn/props/x86_64.svn-work b/arch/linux/.svn/props/x86_64.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/.svn/props/x86_64.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/.svn/text-base/x86_64.svn-base b/arch/linux/.svn/text-base/x86_64.svn-base deleted file mode 100644 index f3c08968..00000000 --- a/arch/linux/.svn/text-base/x86_64.svn-base +++ /dev/null @@ -1 +0,0 @@ -link x86
\ No newline at end of file diff --git a/arch/linux/alpha/alsa.h b/arch/linux/alpha/alsa.h new file mode 120000 index 00000000..ede8a364 --- /dev/null +++ b/arch/linux/alpha/alsa.h @@ -0,0 +1 @@ +../../../arch/linux/common/alsa.h
\ No newline at end of file diff --git a/arch/linux/alpha/boots.h b/arch/linux/alpha/boots.h new file mode 120000 index 00000000..97384500 --- /dev/null +++ b/arch/linux/alpha/boots.h @@ -0,0 +1 @@ +../../../arch/linux/common/boots.h
\ No newline at end of file diff --git a/arch/linux/alpha/devmemory.h b/arch/linux/alpha/devmemory.h new file mode 120000 index 00000000..f8a833e7 --- /dev/null +++ b/arch/linux/alpha/devmemory.h @@ -0,0 +1 @@ +../../../arch/linux/common/devmemory.h
\ No newline at end of file diff --git a/arch/linux/alpha/filesystem.h b/arch/linux/alpha/filesystem.h new file mode 120000 index 00000000..d884bcd0 --- /dev/null +++ b/arch/linux/alpha/filesystem.h @@ -0,0 +1 @@ +../../../arch/linux/common/filesystem.h
\ No newline at end of file diff --git a/arch/linux/alpha/inputdevices.h b/arch/linux/alpha/inputdevices.h new file mode 120000 index 00000000..0f594231 --- /dev/null +++ b/arch/linux/alpha/inputdevices.h @@ -0,0 +1 @@ +../../../arch/linux/common/inputdevices.h
\ No newline at end of file diff --git a/arch/linux/alpha/loadavg.h b/arch/linux/alpha/loadavg.h new file mode 120000 index 00000000..1f64e107 --- /dev/null +++ b/arch/linux/alpha/loadavg.h @@ -0,0 +1 @@ +../../../arch/linux/common/loadavg.h
\ No newline at end of file diff --git a/arch/linux/alpha/memory.h b/arch/linux/alpha/memory.h new file mode 120000 index 00000000..64c6e0ed --- /dev/null +++ b/arch/linux/alpha/memory.h @@ -0,0 +1 @@ +../../../arch/linux/common/memory.h
\ No newline at end of file diff --git a/arch/linux/alpha/modules.h b/arch/linux/alpha/modules.h new file mode 120000 index 00000000..d21c9a20 --- /dev/null +++ b/arch/linux/alpha/modules.h @@ -0,0 +1 @@ +../../../arch/linux/common/modules.h
\ No newline at end of file diff --git a/arch/linux/alpha/net.h b/arch/linux/alpha/net.h new file mode 120000 index 00000000..488b5ae3 --- /dev/null +++ b/arch/linux/alpha/net.h @@ -0,0 +1 @@ +../../../arch/linux/common/net.h
\ No newline at end of file diff --git a/arch/linux/alpha/nfs.h b/arch/linux/alpha/nfs.h new file mode 120000 index 00000000..73e0b8c9 --- /dev/null +++ b/arch/linux/alpha/nfs.h @@ -0,0 +1 @@ +../../../arch/linux/common/nfs.h
\ No newline at end of file diff --git a/arch/linux/alpha/os.h b/arch/linux/alpha/os.h new file mode 120000 index 00000000..44051626 --- /dev/null +++ b/arch/linux/alpha/os.h @@ -0,0 +1 @@ +../../../arch/linux/common/os.h
\ No newline at end of file diff --git a/arch/linux/alpha/pci.h b/arch/linux/alpha/pci.h new file mode 120000 index 00000000..8df04a0e --- /dev/null +++ b/arch/linux/alpha/pci.h @@ -0,0 +1 @@ +../../../arch/linux/common/pci.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/processor.h.svn-base b/arch/linux/alpha/processor.h index f4ff5b0e..081a4f7d 100644 --- a/arch/linux/ppc/.svn/text-base/processor.h.svn-base +++ b/arch/linux/alpha/processor.h @@ -16,8 +16,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static Processor * -computer_get_processor(void) +struct _Processor { + gchar *model_name; + gfloat bogomips; + gchar *strmodel; +}; + +static GSList * +__scan_processors(void) { Processor *processor; FILE *cpuinfo; @@ -35,39 +41,35 @@ computer_get_processor(void) tmp[0] = g_strstrip(tmp[0]); tmp[1] = g_strstrip(tmp[1]); - get_str("cpu", processor->model_name); - get_str("machine", processor->vendor_id); - get_int("L2 cache", processor->cache_size); - get_float("clock", processor->cpu_mhz); - get_float("bogomips", processor->bogomips); + get_str("cpu model", processor->model_name); + get_float("BogoMIPS", processor->bogomips); + get_str("platform string", processor->strmodel); } g_strfreev(tmp); } - gchar *tmp = g_strconcat("PowerPC ", processor->model_name, NULL); + gchar *tmp = g_strconcat("Alpha ", processor->model_name, NULL); g_free(processor->model_name); processor->model_name = tmp; fclose(cpuinfo); - return processor; + return g_slist_append(NULL, processor); } static gchar * -processor_get_info(Processor *processor) +processor_get_info(GSList *processors) { + Processor *processor = (Processor *)processors->data; + return g_strdup_printf("[Processor]\n" - "Machine=%s\n" - "CPU=%s\n" - "L2 Cache=%.2f\n" - "Frequency=%.2fMHz\n" - "BogoMips=%.2f" + "Model=%s\n" + "Platform String=%s\n" + "BogoMIPS=%.2f" "Byte Order=%s\n", - processor->vendor_id, processor->model_name, - processor->cache_size, - processor->cpu_mhz, + processor->strmodel, processor->bogomips, #if G_BYTE_ORDER == G_LITTLE_ENDIAN "Little Endian" diff --git a/arch/linux/alpha/samba.h b/arch/linux/alpha/samba.h new file mode 120000 index 00000000..ebab9b11 --- /dev/null +++ b/arch/linux/alpha/samba.h @@ -0,0 +1 @@ +../../../arch/linux/common/samba.h
\ No newline at end of file diff --git a/arch/linux/alpha/sensors.h b/arch/linux/alpha/sensors.h new file mode 120000 index 00000000..3b799377 --- /dev/null +++ b/arch/linux/alpha/sensors.h @@ -0,0 +1 @@ +../../../arch/linux/common/sensors.h
\ No newline at end of file diff --git a/arch/linux/alpha/storage.h b/arch/linux/alpha/storage.h new file mode 120000 index 00000000..3ea886ce --- /dev/null +++ b/arch/linux/alpha/storage.h @@ -0,0 +1 @@ +../../../arch/linux/common/storage.h
\ No newline at end of file diff --git a/arch/linux/alpha/uptime.h b/arch/linux/alpha/uptime.h new file mode 120000 index 00000000..a5bac980 --- /dev/null +++ b/arch/linux/alpha/uptime.h @@ -0,0 +1 @@ +../../../arch/linux/common/uptime.h
\ No newline at end of file diff --git a/arch/linux/alpha/usb.h b/arch/linux/alpha/usb.h new file mode 120000 index 00000000..aee3046c --- /dev/null +++ b/arch/linux/alpha/usb.h @@ -0,0 +1 @@ +../../../arch/linux/common/usb.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/README.txt b/arch/linux/armv4l/.svn/README.txt deleted file mode 100644 index 271a8ce9..00000000 --- a/arch/linux/armv4l/.svn/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a Subversion working copy administrative directory. -Visit http://subversion.tigris.org/ for more information. diff --git a/arch/linux/armv4l/.svn/empty-file b/arch/linux/armv4l/.svn/empty-file deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/armv4l/.svn/empty-file +++ /dev/null diff --git a/arch/linux/armv4l/.svn/entries b/arch/linux/armv4l/.svn/entries deleted file mode 100644 index b43822b6..00000000 --- a/arch/linux/armv4l/.svn/entries +++ /dev/null @@ -1,156 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<wc-entries - xmlns="svn:"> -<entry - committed-rev="16" - name="" - committed-date="2006-05-28T10:40:24.784981Z" - url="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo/trunk/hardinfo2/arch/linux/armv4l" - last-author="lafp" - kind="dir" - repos="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo" - revision="16"/> -<entry - committed-rev="16" - name="usb.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="0ed17ec7082ecf81bc512f4d2add7bec" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="sensors.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="ba83966be8f142e8f9fbed44bfc77b7a" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="inputdevices.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="1307b7aff245fa7fba84aa91f08d27fc" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="uptime.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="760f1adef4fbcec7d74200abc3a4f6eb" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="storage.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="602ef4aa9053cd983170660f53334cef" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="memory.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="765f1eed8d98b9bbb06c4c034ce9fa32" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="modules.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="45dfbaaabb31981ac06e021773429228" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="pci.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="cab1a2936974aed489c107f3643b3484" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="loadavg.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="1c83a008e883018ff1092781358ec2da" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="processor.h" - text-time="2006-05-28T10:32:28.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="4b8c2f74f5ec835ccb17253235b789b5" - last-author="lafp" - kind="file"/> -<entry - committed-rev="16" - name="alsa.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="dc249687377b2de88793ee09bf54f1f1" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="os.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="048c3f4b338d765be4f10b5067d8b50e" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="samba.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="b541109072721d735717a33724ce9127" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="filesystem.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="7f23b37be4cf5009414843bfe5c4e450" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="nfs.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="382976a6eab28131079a346dd16edcd7" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -<entry - committed-rev="16" - name="net.h" - text-time="2006-05-28T10:27:47.000000Z" - committed-date="2006-05-28T10:40:24.784981Z" - checksum="22e5b201692010dee02e9562ce6cba1b" - last-author="lafp" - kind="file" - prop-time="2006-05-28T10:32:37.000000Z"/> -</wc-entries> diff --git a/arch/linux/armv4l/.svn/format b/arch/linux/armv4l/.svn/format deleted file mode 100644 index b8626c4c..00000000 --- a/arch/linux/armv4l/.svn/format +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/arch/linux/armv4l/.svn/prop-base/alsa.h.svn-base b/arch/linux/armv4l/.svn/prop-base/alsa.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/alsa.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/filesystem.h.svn-base b/arch/linux/armv4l/.svn/prop-base/filesystem.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/filesystem.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/inputdevices.h.svn-base b/arch/linux/armv4l/.svn/prop-base/inputdevices.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/inputdevices.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/loadavg.h.svn-base b/arch/linux/armv4l/.svn/prop-base/loadavg.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/loadavg.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/memory.h.svn-base b/arch/linux/armv4l/.svn/prop-base/memory.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/memory.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/modules.h.svn-base b/arch/linux/armv4l/.svn/prop-base/modules.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/modules.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/net.h.svn-base b/arch/linux/armv4l/.svn/prop-base/net.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/net.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/nfs.h.svn-base b/arch/linux/armv4l/.svn/prop-base/nfs.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/nfs.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/os.h.svn-base b/arch/linux/armv4l/.svn/prop-base/os.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/os.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/pci.h.svn-base b/arch/linux/armv4l/.svn/prop-base/pci.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/pci.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/samba.h.svn-base b/arch/linux/armv4l/.svn/prop-base/samba.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/samba.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/sensors.h.svn-base b/arch/linux/armv4l/.svn/prop-base/sensors.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/sensors.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/storage.h.svn-base b/arch/linux/armv4l/.svn/prop-base/storage.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/storage.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/uptime.h.svn-base b/arch/linux/armv4l/.svn/prop-base/uptime.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/uptime.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/prop-base/usb.h.svn-base b/arch/linux/armv4l/.svn/prop-base/usb.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/prop-base/usb.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/alsa.h.svn-work b/arch/linux/armv4l/.svn/props/alsa.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/alsa.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/filesystem.h.svn-work b/arch/linux/armv4l/.svn/props/filesystem.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/filesystem.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/inputdevices.h.svn-work b/arch/linux/armv4l/.svn/props/inputdevices.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/inputdevices.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/loadavg.h.svn-work b/arch/linux/armv4l/.svn/props/loadavg.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/loadavg.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/memory.h.svn-work b/arch/linux/armv4l/.svn/props/memory.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/memory.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/modules.h.svn-work b/arch/linux/armv4l/.svn/props/modules.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/modules.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/net.h.svn-work b/arch/linux/armv4l/.svn/props/net.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/net.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/nfs.h.svn-work b/arch/linux/armv4l/.svn/props/nfs.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/nfs.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/os.h.svn-work b/arch/linux/armv4l/.svn/props/os.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/os.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/pci.h.svn-work b/arch/linux/armv4l/.svn/props/pci.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/pci.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/samba.h.svn-work b/arch/linux/armv4l/.svn/props/samba.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/samba.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/sensors.h.svn-work b/arch/linux/armv4l/.svn/props/sensors.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/sensors.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/storage.h.svn-work b/arch/linux/armv4l/.svn/props/storage.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/storage.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/uptime.h.svn-work b/arch/linux/armv4l/.svn/props/uptime.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/uptime.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/props/usb.h.svn-work b/arch/linux/armv4l/.svn/props/usb.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/armv4l/.svn/props/usb.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/armv4l/.svn/text-base/alsa.h.svn-base b/arch/linux/armv4l/.svn/text-base/alsa.h.svn-base deleted file mode 100644 index e17b92c3..00000000 --- a/arch/linux/armv4l/.svn/text-base/alsa.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/alsa.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/filesystem.h.svn-base b/arch/linux/armv4l/.svn/text-base/filesystem.h.svn-base deleted file mode 100644 index 0d23c803..00000000 --- a/arch/linux/armv4l/.svn/text-base/filesystem.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/filesystem.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/inputdevices.h.svn-base b/arch/linux/armv4l/.svn/text-base/inputdevices.h.svn-base deleted file mode 100644 index 58695156..00000000 --- a/arch/linux/armv4l/.svn/text-base/inputdevices.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/inputdevices.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/loadavg.h.svn-base b/arch/linux/armv4l/.svn/text-base/loadavg.h.svn-base deleted file mode 100644 index 354f872f..00000000 --- a/arch/linux/armv4l/.svn/text-base/loadavg.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/loadavg.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/memory.h.svn-base b/arch/linux/armv4l/.svn/text-base/memory.h.svn-base deleted file mode 100644 index 2b2ad528..00000000 --- a/arch/linux/armv4l/.svn/text-base/memory.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/memory.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/modules.h.svn-base b/arch/linux/armv4l/.svn/text-base/modules.h.svn-base deleted file mode 100644 index d80f7d7a..00000000 --- a/arch/linux/armv4l/.svn/text-base/modules.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/modules.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/net.h.svn-base b/arch/linux/armv4l/.svn/text-base/net.h.svn-base deleted file mode 100644 index 2b4ac97a..00000000 --- a/arch/linux/armv4l/.svn/text-base/net.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/net.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/nfs.h.svn-base b/arch/linux/armv4l/.svn/text-base/nfs.h.svn-base deleted file mode 100644 index c10bd829..00000000 --- a/arch/linux/armv4l/.svn/text-base/nfs.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/nfs.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/os.h.svn-base b/arch/linux/armv4l/.svn/text-base/os.h.svn-base deleted file mode 100644 index 49613b1f..00000000 --- a/arch/linux/armv4l/.svn/text-base/os.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/os.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/pci.h.svn-base b/arch/linux/armv4l/.svn/text-base/pci.h.svn-base deleted file mode 100644 index 2386d2ad..00000000 --- a/arch/linux/armv4l/.svn/text-base/pci.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/pci.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/processor.h.svn-base b/arch/linux/armv4l/.svn/text-base/processor.h.svn-base deleted file mode 100644 index 7a9c1f2e..00000000 --- a/arch/linux/armv4l/.svn/text-base/processor.h.svn-base +++ /dev/null @@ -1,71 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static Processor * -computer_get_processor(void) -{ - Processor *processor; - FILE *cpuinfo; - gchar buffer[128]; - - cpuinfo = fopen("/proc/cpuinfo", "r"); - if (!cpuinfo) - return NULL; - - processor = g_new0(Processor, 1); - while (fgets(buffer, 128, cpuinfo)) { - gchar **tmp = g_strsplit(buffer, ":", 2); - - if (tmp[0] && tmp[1]) { - tmp[0] = g_strstrip(tmp[0]); - tmp[1] = g_strstrip(tmp[1]); - - get_str("Processor", processor->model_name); - get_str("Features", processor->flags); - get_float("BogoMIPS", processor->bogomips); - - get_str("Hardware", processor->has_fpu); - } - g_strfreev(tmp); - } - - fclose(cpuinfo); - - return processor; -} - -static gchar * -processor_get_info(Processor *processor) -{ - return g_strdup_printf("[Processor]\n" - "Name=%s\n" - "Features=%s\n" - "BogoMips=%.2f\n" - "Endianesss=" -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - "Little Endian", -#else - "Big Endian", -#endif - "\n" - "Hardware=%s\n", - processor->model_name, - processor->flags, - processor->bogomips, - processor->has_fpu); -} diff --git a/arch/linux/armv4l/.svn/text-base/samba.h.svn-base b/arch/linux/armv4l/.svn/text-base/samba.h.svn-base deleted file mode 100644 index 246e9ed0..00000000 --- a/arch/linux/armv4l/.svn/text-base/samba.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/samba.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/sensors.h.svn-base b/arch/linux/armv4l/.svn/text-base/sensors.h.svn-base deleted file mode 100644 index 822de7b7..00000000 --- a/arch/linux/armv4l/.svn/text-base/sensors.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/sensors.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/storage.h.svn-base b/arch/linux/armv4l/.svn/text-base/storage.h.svn-base deleted file mode 100644 index 24568f89..00000000 --- a/arch/linux/armv4l/.svn/text-base/storage.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/storage.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/uptime.h.svn-base b/arch/linux/armv4l/.svn/text-base/uptime.h.svn-base deleted file mode 100644 index 25cc41e9..00000000 --- a/arch/linux/armv4l/.svn/text-base/uptime.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/uptime.h
\ No newline at end of file diff --git a/arch/linux/armv4l/.svn/text-base/usb.h.svn-base b/arch/linux/armv4l/.svn/text-base/usb.h.svn-base deleted file mode 100644 index 8aece87f..00000000 --- a/arch/linux/armv4l/.svn/text-base/usb.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/usb.h
\ No newline at end of file diff --git a/arch/linux/armv4l/battery.h b/arch/linux/armv4l/battery.h new file mode 120000 index 00000000..e4c794f2 --- /dev/null +++ b/arch/linux/armv4l/battery.h @@ -0,0 +1 @@ +../../linux/common/battery.h
\ No newline at end of file diff --git a/arch/linux/armv4l/boots.h b/arch/linux/armv4l/boots.h new file mode 120000 index 00000000..97384500 --- /dev/null +++ b/arch/linux/armv4l/boots.h @@ -0,0 +1 @@ +../../../arch/linux/common/boots.h
\ No newline at end of file diff --git a/arch/linux/armv4l/devmemory.h b/arch/linux/armv4l/devmemory.h new file mode 120000 index 00000000..f8a833e7 --- /dev/null +++ b/arch/linux/armv4l/devmemory.h @@ -0,0 +1 @@ +../../../arch/linux/common/devmemory.h
\ No newline at end of file diff --git a/arch/linux/armv4l/processor.h b/arch/linux/armv4l/processor.h index 7a9c1f2e..d66d6f25 100644 --- a/arch/linux/armv4l/processor.h +++ b/arch/linux/armv4l/processor.h @@ -16,8 +16,17 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static Processor * -computer_get_processor(void) +struct _Processor { + gchar *model_name; + gchar *flags; + gfloat bogomips; + + gchar *has_fpu; +}; + + +static GSList * +__scan_processors(void) { Processor *processor; FILE *cpuinfo; @@ -46,12 +55,14 @@ computer_get_processor(void) fclose(cpuinfo); - return processor; + return g_slist_append(NULL, processor); } static gchar * -processor_get_info(Processor *processor) +processor_get_info(GSList *processors) { + Processor *processor = (Processor *)processors->data; + return g_strdup_printf("[Processor]\n" "Name=%s\n" "Features=%s\n" diff --git a/arch/linux/common/.svn/README.txt b/arch/linux/common/.svn/README.txt deleted file mode 100644 index 271a8ce9..00000000 --- a/arch/linux/common/.svn/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a Subversion working copy administrative directory. -Visit http://subversion.tigris.org/ for more information. diff --git a/arch/linux/common/.svn/empty-file b/arch/linux/common/.svn/empty-file deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/empty-file +++ /dev/null diff --git a/arch/linux/common/.svn/entries b/arch/linux/common/.svn/entries deleted file mode 100644 index 590cfded..00000000 --- a/arch/linux/common/.svn/entries +++ /dev/null @@ -1,151 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<wc-entries - xmlns="svn:"> -<entry - committed-rev="9" - name="" - committed-date="2006-03-07T18:26:23.507991Z" - url="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo/trunk/hardinfo2/arch/linux/common" - last-author="lafp" - kind="dir" - uuid="03931a0e-0c0b-0410-87e6-c9e79dddb921" - repos="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo" - revision="9"/> -<entry - committed-rev="1" - name="usb.h" - text-time="2006-05-20T14:29:25.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="0c0cac5253587505cc065f0e256a5d4d" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:24.000000Z"/> -<entry - committed-rev="1" - name="sensors.h" - text-time="2006-05-20T14:29:25.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="29e1c509624467fe7314b4735e7111c0" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:24.000000Z"/> -<entry - committed-rev="12" - name="inputdevices.h" - text-time="2006-05-20T19:41:49.000000Z" - committed-date="2006-05-20T19:59:34.736889Z" - checksum="01a7b3bd4ca502e604a6feb9092523d8" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:24.000000Z" - revision="12"/> -<entry - committed-rev="1" - name="uptime.h" - text-time="2006-05-20T14:29:25.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="4f5d1b5cb05b0f74f1cc5030d58568a4" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:24.000000Z"/> -<entry - committed-rev="1" - name="storage.h" - text-time="2006-05-20T14:29:25.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="d5793dc35001654f593b7b20028065d8" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:25.000000Z"/> -<entry - committed-rev="1" - name="memory.h" - text-time="2006-05-20T14:29:25.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="6003144cee387dca46d2ef91429c1d49" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:25.000000Z"/> -<entry - committed-rev="1" - name="modules.h" - text-time="2006-05-20T14:29:25.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="1ad54b4dd6e3eec6b953ad4ddf0fd860" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:25.000000Z"/> -<entry - committed-rev="4" - name="pci.h" - text-time="2006-05-20T14:29:25.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="37a5c5e99c34cbb4adbc4aa31e7fd457" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:24.000000Z"/> -<entry - committed-rev="1" - name="loadavg.h" - text-time="2006-05-20T14:29:25.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="d5c6e755bc626cbad504197c6806f532" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:24.000000Z"/> -<entry - committed-rev="1" - name="alsa.h" - text-time="2006-05-20T14:29:25.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="59621ae90495ca734fffde1d5c6a17f8" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:24.000000Z"/> -<entry - committed-rev="4" - name="os.h" - text-time="2006-05-20T14:29:25.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="5096953136a76251742ceedbe95b4b27" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:24.000000Z"/> -<entry - committed-rev="18" - name="samba.h" - text-time="2006-06-16T14:09:12.000000Z" - committed-date="2006-06-16T14:09:52.687901Z" - checksum="41d760d05bea9c45eba0622fe168b2fd" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:24.000000Z" - revision="18"/> -<entry - committed-rev="9" - name="filesystem.h" - text-time="2006-05-20T14:29:25.000000Z" - committed-date="2006-03-07T18:26:23.507991Z" - checksum="964d2ae62a1d35e125607b9e13d56762" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:25.000000Z"/> -<entry - committed-rev="4" - name="net.h" - text-time="2006-05-20T14:29:25.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="cda86d4df0a7b91c598f6da5ec63b13e" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:25.000000Z"/> -<entry - committed-rev="14" - name="nfs.h" - text-time="2006-05-22T16:03:07.000000Z" - committed-date="2006-05-22T16:05:56.041082Z" - checksum="65db4676d1ef228ef7821c71ae185f67" - last-author="lafp" - kind="file" - revision="14"/> -</wc-entries> diff --git a/arch/linux/common/.svn/format b/arch/linux/common/.svn/format deleted file mode 100644 index b8626c4c..00000000 --- a/arch/linux/common/.svn/format +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/arch/linux/common/.svn/prop-base/alsa.h.svn-base b/arch/linux/common/.svn/prop-base/alsa.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/alsa.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/filesystem.h.svn-base b/arch/linux/common/.svn/prop-base/filesystem.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/filesystem.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/inputdevices.h.svn-base b/arch/linux/common/.svn/prop-base/inputdevices.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/inputdevices.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/loadavg.h.svn-base b/arch/linux/common/.svn/prop-base/loadavg.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/loadavg.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/memory.h.svn-base b/arch/linux/common/.svn/prop-base/memory.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/memory.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/modules.h.svn-base b/arch/linux/common/.svn/prop-base/modules.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/modules.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/net.h.svn-base b/arch/linux/common/.svn/prop-base/net.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/net.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/os.h.svn-base b/arch/linux/common/.svn/prop-base/os.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/os.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/pci.h.svn-base b/arch/linux/common/.svn/prop-base/pci.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/pci.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/samba.h.svn-base b/arch/linux/common/.svn/prop-base/samba.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/samba.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/sensors.h.svn-base b/arch/linux/common/.svn/prop-base/sensors.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/sensors.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/storage.h.svn-base b/arch/linux/common/.svn/prop-base/storage.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/storage.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/uptime.h.svn-base b/arch/linux/common/.svn/prop-base/uptime.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/uptime.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/prop-base/usb.h.svn-base b/arch/linux/common/.svn/prop-base/usb.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/prop-base/usb.h.svn-base +++ /dev/null diff --git a/arch/linux/common/.svn/props/alsa.h.svn-work b/arch/linux/common/.svn/props/alsa.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/alsa.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/filesystem.h.svn-work b/arch/linux/common/.svn/props/filesystem.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/filesystem.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/inputdevices.h.svn-work b/arch/linux/common/.svn/props/inputdevices.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/inputdevices.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/loadavg.h.svn-work b/arch/linux/common/.svn/props/loadavg.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/loadavg.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/memory.h.svn-work b/arch/linux/common/.svn/props/memory.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/memory.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/modules.h.svn-work b/arch/linux/common/.svn/props/modules.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/modules.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/net.h.svn-work b/arch/linux/common/.svn/props/net.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/net.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/os.h.svn-work b/arch/linux/common/.svn/props/os.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/os.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/pci.h.svn-work b/arch/linux/common/.svn/props/pci.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/pci.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/samba.h.svn-work b/arch/linux/common/.svn/props/samba.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/samba.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/sensors.h.svn-work b/arch/linux/common/.svn/props/sensors.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/sensors.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/storage.h.svn-work b/arch/linux/common/.svn/props/storage.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/storage.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/uptime.h.svn-work b/arch/linux/common/.svn/props/uptime.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/uptime.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/props/usb.h.svn-work b/arch/linux/common/.svn/props/usb.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/common/.svn/props/usb.h.svn-work +++ /dev/null diff --git a/arch/linux/common/.svn/text-base/alsa.h.svn-base b/arch/linux/common/.svn/text-base/alsa.h.svn-base deleted file mode 100644 index 0c0744ae..00000000 --- a/arch/linux/common/.svn/text-base/alsa.h.svn-base +++ /dev/null @@ -1,69 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -gchar * -computer_get_alsacards(Computer * computer) -{ - GSList *p; - gchar *tmp = ""; - gint n = 0; - - if (computer->alsa) { - for (p = computer->alsa->cards; p; p = p->next) { - AlsaCard *ac = (AlsaCard *) p->data; - - tmp = - g_strdup_printf("Audio Adapter#%d=%s\n%s", ++n, - ac->friendly_name, tmp); - } - } - - return tmp; -} - -static AlsaInfo * -computer_get_alsainfo(void) -{ - AlsaInfo *ai; - AlsaCard *ac; - FILE *cards; - gchar buffer[128]; - - cards = fopen("/proc/asound/cards", "r"); - if (!cards) - return NULL; - - ai = g_new0(AlsaInfo, 1); - - while (fgets(buffer, 128, cards)) { - gchar **tmp; - - ac = g_new0(AlsaCard, 1); - - tmp = g_strsplit(buffer, ":", 0); - - ac->friendly_name = g_strdup(tmp[1]); - ai->cards = g_slist_append(ai->cards, ac); - - g_strfreev(tmp); - fgets(buffer, 128, cards); /* skip next line */ - } - fclose(cards); - - return ai; -} diff --git a/arch/linux/common/.svn/text-base/filesystem.h.svn-base b/arch/linux/common/.svn/text-base/filesystem.h.svn-base deleted file mode 100644 index 79784c8f..00000000 --- a/arch/linux/common/.svn/text-base/filesystem.h.svn-base +++ /dev/null @@ -1,102 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Some code from xfce4-mount-plugin, version 0.4.3 - * Copyright (C) 2005 Jean-Baptiste jb_dul@yahoo.com - * Distributed under the terms of GNU GPL 2. - */ -#include <sys/vfs.h> -#define KB 1024 -#define MB 1048576 -#define GB 1073741824 - -static gchar *fs_list = NULL; - -static gchar * -fs_human_readable(gfloat size) -{ - if (size < KB) - return g_strdup_printf("%.1f B", size); - if (size < MB) - return g_strdup_printf("%.1f KiB", size / KB); - if (size < GB) - return g_strdup_printf("%.1f MiB", size / MB); - - return g_strdup_printf("%.1f GiB", size / GB); -} - -static void -scan_filesystems(void) -{ - FILE *mtab; - gchar buf[1024]; - struct statfs sfs; - - g_free(fs_list); - fs_list = g_strdup(""); - - mtab = fopen("/etc/mtab", "r"); - if (!mtab) - return; - - while (fgets(buf, 1024, mtab)) { - gfloat size, used, avail; - gchar **tmp; - - tmp = g_strsplit(buf, " ", 0); - if (!statfs(tmp[1], &sfs)) { - size = (float) sfs.f_bsize * (float) sfs.f_blocks; - avail = (float) sfs.f_bsize * (float) sfs.f_bavail; - used = size - avail; - - gchar *strsize = fs_human_readable(size), - *stravail = fs_human_readable(avail), - *strused = fs_human_readable(used); - - gchar *strhash; - if ((strhash = g_hash_table_lookup(moreinfo, tmp[0]))) { - g_hash_table_remove(moreinfo, tmp[0]); - g_free(strhash); - } - - strhash = g_strdup_printf("[%s]\n" - "Filesystem=%s\n" - "Mounted As=%s\n" - "Mount Point=%s\n" - "Size=%s\n" - "Used=%s\n" - "Available=%s\n", - tmp[0], - tmp[2], - strstr(tmp[3], "rw") ? "Read-Write" : - "Read-Only", tmp[1], strsize, strused, - stravail); - g_hash_table_insert(moreinfo, g_strdup(tmp[0]), strhash); - - fs_list = g_strdup_printf("%s$%s$%s=%s total, %s free\n", - fs_list, - tmp[0], tmp[0], strsize, stravail); - - g_free(strsize); - g_free(stravail); - g_free(strused); - } - g_strfreev(tmp); - } - - fclose(mtab); -} diff --git a/arch/linux/common/.svn/text-base/inputdevices.h.svn-base b/arch/linux/common/.svn/text-base/inputdevices.h.svn-base deleted file mode 100644 index 44a109ca..00000000 --- a/arch/linux/common/.svn/text-base/inputdevices.h.svn-base +++ /dev/null @@ -1,122 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static gchar *input_icons = NULL; - -static gboolean -remove_input_devices(gpointer key, gpointer value, gpointer data) -{ - if (!strncmp((gchar *) key, "INP", 3)) { - g_free((gchar *) key); - g_free((GtkTreeIter *) value); - return TRUE; - } - - return FALSE; -} - -static struct { - char *name; - char *icon; -} input_devices[] = { - { "Keyboard", "keyboard.png" }, - { "Joystick", "joystick.png" }, - { "Mouse", "mouse.png" }, - { "Speaker", "audio.png" }, - { "Unknown", "module.png" }, -}; - -void -scan_inputdevices(void) -{ - FILE *dev; - gchar buffer[128]; - gchar *tmp, *name = NULL, *phys = NULL; - gint bus, vendor, product, version; - int d = 0, n = 0; - - dev = fopen("/proc/bus/input/devices", "r"); - if (!dev) - return; - - if (input_list) { - g_hash_table_foreach_remove(devices, remove_input_devices, NULL); - g_free(input_list); - g_free(input_icons); - } - input_list = g_strdup(""); - input_icons = g_strdup(""); - - while (fgets(buffer, 128, dev)) { - tmp = buffer; - - switch (*tmp) { - case 'N': - name = g_strdup(tmp + strlen("N: Name=")); - remove_quotes(name); - break; - case 'P': - phys = g_strdup(tmp + strlen("P: Phys=")); - break; - case 'I': - sscanf(tmp, "I: Bus=%x Vendor=%x Product=%x Version=%x", - &bus, &vendor, &product, &version); - break; - case 'H': - if (strstr(tmp, "kbd")) - d = 0; //INPUT_KEYBOARD; - else if (strstr(tmp, "js")) - d = 1; //INPUT_JOYSTICK; - else if (strstr(tmp, "mouse")) - d = 2; //INPUT_MOUSE; - else - d = 4; //INPUT_UNKNOWN; - break; - case '\n': - if (strstr(name, "PC Speaker")) { - d = 3; // INPUT_PCSPKR - } - - tmp = g_strdup_printf("INP%d", ++n); - input_list = g_strdup_printf("%s$%s$%s=\n", - input_list, - tmp, name); - input_icons = g_strdup_printf("%sIcon$%s$%s=%s\n", - input_icons, - tmp, name, - input_devices[d].icon); - gchar *strhash = g_strdup_printf("[Device Information]\n" - "Name=%s\n" - "Type=%s\n" - "Bus=0x%x\n" - "Vendor=0x%x\n" - "Product=0x%x\n" - "Version=0x%x\n" - "Connected to=%s\n", - name, input_devices[d].name, - bus, vendor, product, - version, phys); - g_hash_table_insert(devices, tmp, strhash); - - g_free(phys); - g_free(name); - } - } - - fclose(dev); -} diff --git a/arch/linux/common/.svn/text-base/loadavg.h.svn-base b/arch/linux/common/.svn/text-base/loadavg.h.svn-base deleted file mode 100644 index 28132b5f..00000000 --- a/arch/linux/common/.svn/text-base/loadavg.h.svn-base +++ /dev/null @@ -1,47 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static LoadInfo * -computer_get_loadinfo(void) -{ - LoadInfo *li = g_new0(LoadInfo, 1); - FILE *procloadavg; - - procloadavg = fopen("/proc/loadavg", "r"); - fscanf(procloadavg, "%f %f %f", &(li->load1), &(li->load5), - &(li->load15)); - fclose(procloadavg); - - return li; -} - -static gchar * -computer_get_formatted_loadavg() -{ - LoadInfo *li; - gchar *tmp; - - li = computer_get_loadinfo(); - - tmp = - g_strdup_printf("%.2f, %.2f, %.2f", li->load1, li->load5, - li->load15); - - g_free(li); - return tmp; -} diff --git a/arch/linux/common/.svn/text-base/memory.h.svn-base b/arch/linux/common/.svn/text-base/memory.h.svn-base deleted file mode 100644 index def4cc1d..00000000 --- a/arch/linux/common/.svn/text-base/memory.h.svn-base +++ /dev/null @@ -1,56 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static MemoryInfo * -computer_get_memory(void) -{ - MemoryInfo *mi; - FILE *procmem; - gchar buffer[128]; - - procmem = fopen("/proc/meminfo", "r"); - if (!procmem) - return NULL; - mi = g_new0(MemoryInfo, 1); - - while (fgets(buffer, 128, procmem)) { - gchar **tmp = g_strsplit(buffer, ":", 2); - - tmp[0] = g_strstrip(tmp[0]); - tmp[1] = g_strstrip(tmp[1]); - - get_int("MemTotal", mi->total); - get_int("MemFree", mi->free); - get_int("Cached", mi->cached); - - g_strfreev(tmp); - } - fclose(procmem); - - mi->used = mi->total - mi->free; - - mi->total /= 1000; - mi->cached /= 1000; - mi->used /= 1000; - mi->free /= 1000; - - mi->used -= mi->cached; - mi->ratio = 1 - (gdouble) mi->used / mi->total; - - return mi; -} diff --git a/arch/linux/common/.svn/text-base/modules.h.svn-base b/arch/linux/common/.svn/text-base/modules.h.svn-base deleted file mode 100644 index 69f7ebd6..00000000 --- a/arch/linux/common/.svn/text-base/modules.h.svn-base +++ /dev/null @@ -1,129 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -void -scan_modules(void) -{ - FILE *lsmod; - gchar buffer[1024]; - - lsmod = popen("/sbin/lsmod", "r"); - if (!lsmod) - return; - - fgets(buffer, 1024, lsmod); /* Discards the first line */ - - while (fgets(buffer, 1024, lsmod)) { - gchar *buf, *strmodule, *hashkey; - gchar *author = NULL, - *description = NULL, - *license = NULL, - *deps = NULL, *vermagic = NULL, *filename = NULL, modname[64]; - FILE *modi; - glong memory; - - shell_status_pulse(); - - buf = buffer; - - sscanf(buf, "%s %ld", modname, &memory); - - hashkey = g_strdup_printf("MOD%s", modname); - buf = g_strdup_printf("/sbin/modinfo %s", modname); - - modi = popen(buf, "r"); - while (fgets(buffer, 1024, modi)) { - gchar **tmp = g_strsplit(buffer, ":", 2); - - GET_STR("author", author); - GET_STR("description", description); - GET_STR("license", license); - GET_STR("depends", deps); - GET_STR("vermagic", vermagic); - GET_STR("filename", filename); - - g_strfreev(tmp); - } - pclose(modi); - g_free(buf); - - /* old modutils includes quotes in some strings; strip them */ - /*remove_quotes(modname); - remove_quotes(description); - remove_quotes(vermagic); - remove_quotes(author); - remove_quotes(license); */ - - /* old modutils displays <none> when there's no value for a - given field; this is not desirable in the module name - display, so change it to an empty string */ - if (description && !strcmp(description, "<none>")) { - g_free(description); - description = g_strdup(""); - } - - /* append this module to the list of modules */ - module_list = g_strdup_printf("%s$%s$%s=%s\n", - module_list, - hashkey, - modname, - description ? description : ""); - -#define NONE_IF_NULL(var) (var) ? (var) : "N/A" - - /* create the module information string */ - strmodule = g_strdup_printf("[Module Information]\n" - "Path=%s\n" - "Used Memory=%.2fKiB\n" - "[Description]\n" - "Name=%s\n" - "Description=%s\n" - "Version Magic=%s\n" - "[Copyright]\n" - "Author=%s\n" - "License=%s\n", - NONE_IF_NULL(filename), - memory / 1024.0, - NONE_IF_NULL(modname), - NONE_IF_NULL(description), - NONE_IF_NULL(vermagic), - NONE_IF_NULL(author), - NONE_IF_NULL(license)); - - /* if there are dependencies, append them to that string */ - if (deps && strlen(deps)) { - gchar **tmp = g_strsplit(deps, ",", 0); - - strmodule = g_strconcat(strmodule, - "\n[Dependencies]\n", - g_strjoinv("=\n", tmp), - "=\n", NULL); - g_strfreev(tmp); - g_free(deps); - } - - g_hash_table_insert(devices, hashkey, strmodule); - - g_free(license); - g_free(description); - g_free(author); - g_free(vermagic); - g_free(filename); - } - pclose(lsmod); -} diff --git a/arch/linux/common/.svn/text-base/net.h.svn-base b/arch/linux/common/.svn/text-base/net.h.svn-base deleted file mode 100644 index 87e7e59b..00000000 --- a/arch/linux/common/.svn/text-base/net.h.svn-base +++ /dev/null @@ -1,203 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static gchar *network_interfaces = NULL; - -#include <sys/ioctl.h> -#include <net/if.h> -#include <netinet/in.h> -#include <linux/sockios.h> -#include <sys/socket.h> - -typedef struct _NetInfo NetInfo; -struct _NetInfo { - char name[16]; - int mtu; - unsigned char mac[8]; -}; - - -void get_net_info(char *if_name, NetInfo *netinfo) -{ - struct ifreq ifr; - int fd; - - fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); - - strcpy(ifr.ifr_name, if_name); - strcpy(netinfo->name, if_name); - - if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) { - netinfo->mtu = 0; - } else { - netinfo->mtu = ifr.ifr_mtu; - } - - strcpy(ifr.ifr_name, if_name); - if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) { - memset(netinfo->mac, 0, 8); - } else { - memcpy(netinfo->mac, ifr.ifr_ifru.ifru_hwaddr.sa_data, 8); - } - - shutdown(fd, 0); -} - -static struct { - char *type; - char *label; -} netdev2type[] = { - { "eth", "Ethernet" }, - { "lo", "Loopback" }, - { "ppp", "Point-to-Point" }, - { "ath", "Wireless" }, - { "wlan", "Wireless" }, - { "tun", "Virtual Point-to-Point (TUN)" }, - { "tap", "Ethernet (TAP)" }, - { "plip", "Parallel Line Internet Protocol" }, - { "irlan", "Infrared" }, - { "slip", "Serial Line Internet Protocol" }, - { "isdn", "Integrated Services Digital Network" }, - { "sit", "IPv6-over-IPv4 Tunnel" }, - { "vmnet8", "VMWare Virtual Network Interface (NAT)" }, - { "vmnet", "VMWare Virtual Network Interface" }, - { NULL, "Unknown" }, -}; - -static const gchar * -net_get_iface_type(gchar *name) -{ - int i; - - for (i = 0; netdev2type[i].type; i++) { - if (g_str_has_prefix(name, netdev2type[i].type)) - break; - } - - return netdev2type[i].label; -} - -static gboolean -remove_net_devices(gpointer key, gpointer value, gpointer data) -{ - if (!strncmp((gchar *) key, "NET", 4)) { - g_free((gchar *) key); - g_free((GtkTreeIter *) value); - return TRUE; - } - return FALSE; -} - -static void -scan_net_interfaces_24(void) -{ - FILE *proc_net; - NetInfo ni; - gchar buffer[256]; - gchar *devid, *detailed; - gulong recv_bytes; - gulong recv_errors; - gulong recv_packets; - - gulong trans_bytes; - gulong trans_errors; - gulong trans_packets; - - if (!g_file_test("/proc/net/dev", G_FILE_TEST_EXISTS)) { - if (network_interfaces) { - g_free(network_interfaces); - network_interfaces = g_strdup("[Network Interfaces]\n" - "None found=\n"); - } - - return; - } - - if (network_interfaces) { - g_free(network_interfaces); - } - - network_interfaces = g_strdup("[Network Interfaces]\n"); - - proc_net = fopen("/proc/net/dev", "r"); - while (fgets(buffer, 256, proc_net)) { - if (strchr(buffer, ':')) { - gint trash; - gchar ifacename[16]; - gchar *buf = buffer; - gint i; - - buf = g_strstrip(buf); - - memset(ifacename, 0, 16); - - for (i = 0; buffer[i] != ':' && i < 16; i++) { - ifacename[i] = buffer[i]; - } - - buf = strchr(buf, ':') + 1; - - /* iface: bytes packets errs drop fifo frame compressed multicast */ - sscanf(buf, "%ld %ld %ld %d %d %d %d %d %ld %ld %ld", - &recv_bytes, &recv_packets, - &recv_errors, &trash, &trash, &trash, &trash, - &trash, &trans_bytes, &trans_packets, - &trans_errors); - - gfloat recv_mb = recv_bytes / 1048576.0; - gfloat trans_mb = trans_bytes / 1048576.0; - - devid = g_strdup_printf("NET%s", ifacename); - network_interfaces = g_strdup_printf("%s$%s$%s=Sent %.2fMiB, received %.2fMiB\n", - network_interfaces, - devid, - ifacename, - trans_mb, - recv_mb); - - get_net_info(ifacename, &ni); - detailed = g_strdup_printf("[Network Adapter Properties]\n" - "Interface Type=%s\n" - "Hardware Address=%02x:%02x:%02x:%02x:%02x:%02x\n" - "MTU=%d\n" - "Bytes Sent=%ld (%.2fMiB)\n" - "Bytes Received=%ld (%.2fMiB)\n", - net_get_iface_type(ifacename), - ni.mac[0], ni.mac[1], - ni.mac[2], ni.mac[3], - ni.mac[4], ni.mac[5], - ni.mtu, - recv_bytes, recv_mb, - trans_bytes, trans_mb); - g_hash_table_insert(moreinfo, devid, detailed); - } - } - fclose(proc_net); -} - -static void -scan_net_interfaces(void) -{ - /* FIXME: See if we're running Linux 2.6 and if /sys is mounted, then use - that instead of /proc/net/dev */ - - /* remove old devices from global device table */ - g_hash_table_foreach_remove(moreinfo, remove_net_devices, NULL); - - scan_net_interfaces_24(); -} diff --git a/arch/linux/common/.svn/text-base/nfs.h.svn-base b/arch/linux/common/.svn/text-base/nfs.h.svn-base deleted file mode 100644 index 5ae22797..00000000 --- a/arch/linux/common/.svn/text-base/nfs.h.svn-base +++ /dev/null @@ -1,29 +0,0 @@ -static gchar *nfs_shares_list = NULL; -void -scan_nfs_shared_directories(void) -{ - FILE *exports; - gchar buf[512]; - - if (nfs_shares_list) { - g_free(nfs_shares_list); - } - - nfs_shares_list = g_strdup(""); - - exports = fopen("/etc/exports", "r"); - if (!exports) - return; - - while (fgets(buf, 512, exports)) { - if (buf[0] != '/') - continue; - - strend(buf, ' '); - strend(buf, '\t'); - - nfs_shares_list = g_strconcat(nfs_shares_list, buf, "=\n", NULL); - } - fclose(exports); -} - diff --git a/arch/linux/common/.svn/text-base/os.h.svn-base b/arch/linux/common/.svn/text-base/os.h.svn-base deleted file mode 100644 index 0f7b59e3..00000000 --- a/arch/linux/common/.svn/text-base/os.h.svn-base +++ /dev/null @@ -1,203 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static gchar * -get_libc_version(void) -{ - FILE *libc; - gchar buf[256], *tmp, *p; - - libc = popen("/lib/libc.so.6", "r"); - if (!libc) goto err; - - fgets(buf, 256, libc); - if (pclose(libc)) goto err; - - tmp = strstr(buf, "version "); - if (!tmp) goto err; - - p = strchr(tmp, ','); - if (p) *p = '\0'; - else goto err; - - return g_strdup_printf("GNU C Library version %s (%sstable)", - strchr(tmp, ' ') + 1, - strstr(buf, " stable ") ? "" : "un"); - err: - return g_strdup("Unknown"); -} - -static gchar * -get_os_compiled_date(void) -{ - FILE *procversion; - gchar buf[512]; - - procversion = fopen("/proc/sys/kernel/version", "r"); - if (!procversion) - return g_strdup("Unknown"); - - fgets(buf, 512, procversion); - fclose(procversion); - - return g_strdup(buf); -} - - -#include <gdk/gdkx.h> - -void -detect_desktop_environment(OperatingSystem * os) -{ - const gchar *tmp = g_getenv("GNOME_DESKTOP_SESSION_ID"); - FILE *version; - int maj, min; - - if (tmp) { - /* FIXME: this might not be true, as the gnome-panel in path - may not be the one that's running. - see where the user's running panel is and run *that* to - obtain the version. */ - version = popen("gnome-panel --version", "r"); - if (version) { - fscanf(version, "Gnome gnome-panel %d.%d", &maj, &min); - if (pclose(version)) - goto unknown; - } else { - goto unknown; - } - - os->desktop = - g_strdup_printf("GNOME %d.%d (session name: %s)", maj, min, - tmp); - } else if (g_getenv("KDE_FULL_SESSION")) { - version = popen("kcontrol --version", "r"); - if (version) { - char buf[32]; - - fgets(buf, 32, version); - - fscanf(version, "KDE: %d.%d", &maj, &min); - if (pclose(version)) - goto unknown; - } else { - goto unknown; - } - - os->desktop = g_strdup_printf("KDE %d.%d", maj, min); - } else { - unknown: - if (!g_getenv("DISPLAY")) { - os->desktop = g_strdup("Terminal"); - } else { - const gchar *windowman; - GdkScreen *screen = gdk_screen_get_default(); - - windowman = gdk_x11_screen_get_window_manager_name(screen); - - if (g_str_equal(windowman, "Xfwm4")) { - /* FIXME: check if xprop -root | grep XFCE_DESKTOP_WINDOW - is defined */ - os->desktop = g_strdup("XFCE 4"); - } else { - os->desktop = g_strdup_printf("Unknown (Window Manager: %s)", - windowman); - } - } - } -} - -static OperatingSystem * -computer_get_os(void) -{ - struct utsname utsbuf; - OperatingSystem *os; - int i; - - os = g_new0(OperatingSystem, 1); - - os->compiled_date = get_os_compiled_date(); - - /* Attempt to get the Distribution name; try using /etc/lsb-release first, - then doing the legacy method (checking for /etc/$DISTRO-release files) */ - if (g_file_test("/etc/lsb-release", G_FILE_TEST_EXISTS)) { - FILE *release; - gchar buffer[128]; - - release = popen("lsb_release -d", "r"); - fgets(buffer, 128, release); - pclose(release); - - os->distro = buffer; - os->distro = g_strdup(os->distro + strlen("Description:\t")); - } - - for (i = 0;; i++) { - if (distro_db[i].file == NULL) { - os->distrocode = g_strdup("unk"); - os->distro = g_strdup("Unknown distribution"); - break; - } - - if (g_file_test(distro_db[i].file, G_FILE_TEST_EXISTS)) { - - - FILE *distro_ver; - char buf[128]; - - distro_ver = fopen(distro_db[i].file, "r"); - fgets(buf, 128, distro_ver); - fclose(distro_ver); - - buf[strlen(buf) - 1] = 0; - - if (!os->distro) { - /* - * HACK: Some Debian systems doesn't include - * the distribuition name in /etc/debian_release, - * so add them here. - */ - if (!strncmp(distro_db[i].codename, "deb", 3) && - ((buf[0] >= '0' && buf[0] <= '9') || buf[0] != 'D')) { - os->distro = g_strdup_printf - ("Debian GNU/Linux %s", buf); - } else { - os->distro = g_strdup(buf); - } - } - os->distrocode = g_strdup(distro_db[i].codename); - - break; - } - } - - /* Kernel and hostname info */ - uname(&utsbuf); - os->kernel = g_strdup_printf("%s %s (%s)", utsbuf.sysname, - utsbuf.release, utsbuf.machine); - os->hostname = g_strdup(utsbuf.nodename); - os->language = g_strdup(g_getenv("LC_MESSAGES")); - os->homedir = g_strdup(g_get_home_dir()); - os->username = g_strdup_printf("%s (%s)", - g_get_user_name(), g_get_real_name()); - os->libc = get_libc_version(); - scan_languages(os); - detect_desktop_environment(os); - - return os; -} diff --git a/arch/linux/common/.svn/text-base/pci.h.svn-base b/arch/linux/common/.svn/text-base/pci.h.svn-base deleted file mode 100644 index f8c9d319..00000000 --- a/arch/linux/common/.svn/text-base/pci.h.svn-base +++ /dev/null @@ -1,190 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -void -scan_pci(void) -{ - FILE *lspci; - gchar buffer[256], *buf, *strhash = NULL, *strdevice = NULL; - gchar *category = NULL, *name = NULL; - gint n = 0; - - //if (g_file_test("/usr/bin/gksudo", G_FILE_TEST_EXISTS)) { - // lspci = popen("gksudo '/bin/lspci -v'", "r"); - //} else { - lspci = popen(LSPCI, "r"); - //} - - if (!lspci) { - return; - } - - gchar *icon; - - int x = 0; /* unique Memory, Capability and I/O port */ - while (fgets(buffer, 256, lspci)) { - buf = g_strstrip(buffer); - - if (!strncmp(buf, "Flags", 5)) { - gint irq = 0, freq = 0, latency = 0, i; - gchar **list; - gboolean bus_master; - - buf += 7; - - bus_master = FALSE; - - list = g_strsplit(buf, ", ", 10); - for (i = 0; i <= 10; i++) { - if (!list[i]) - break; - - if (!strncmp(list[i], "IRQ", 3)) - sscanf(list[i], "IRQ %d", &irq); - else if (strstr(list[i], "Mhz")) - sscanf(list[i], "%dMhz", &freq); - else if (!strncmp(list[i], "bus master", 10)) - bus_master = TRUE; - else if (!strncmp(list[i], "latency", 7)) - sscanf(list[i], "latency %d", &latency); - } - g_strfreev(list); - - if (irq) - strdevice = g_strdup_printf("%sIRQ=%d\n", strdevice, irq); - if (freq) - strdevice = - g_strdup_printf("%sFrequency=%dMHz\n", strdevice, - freq); - if (latency) - strdevice = - g_strdup_printf("%sLatency=%d\n", strdevice, latency); - - strdevice = - g_strdup_printf("%sBus Master=%s\n", strdevice, - bus_master ? "Yes" : "No"); - } else if (!strncmp(buf, "Subsystem", 9)) { - WALK_UNTIL(' '); - buf++; - strdevice = - g_strdup_printf("%sOEM Vendor=%s\n", strdevice, buf); - } else if (!strncmp(buf, "Capabilities", 12) - && !strstr(buf, "only to root") && - !strstr(buf, "access denied")) { - WALK_UNTIL(' '); - WALK_UNTIL(']'); - buf++; - strdevice = - g_strdup_printf("%sCapability#%d=%s\n", strdevice, ++x, - buf); - } else if (!strncmp(buf, "Memory at", 9) && strstr(buf, "[size=")) { - gint mem; - gchar unit; - gboolean prefetch; - gboolean _32bit; - - prefetch = strstr(buf, "non-prefetchable") ? FALSE : TRUE; - _32bit = strstr(buf, "32-bit") ? TRUE : FALSE; - - WALK_UNTIL('['); - sscanf(buf, "[size=%d%c", &mem, &unit); - - strdevice = g_strdup_printf("%sMemory#%d=%d%cB (%s%s)\n", - strdevice, ++x, - mem, - (unit == ']') ? ' ' : unit, - _32bit ? "32-bit, " : "", - prefetch ? "prefetchable" : - "non-prefetchable"); - - } else if (!strncmp(buf, "I/O", 3)) { - guint io_addr, io_size; - - sscanf(buf, "I/O ports at %x [size=%d]", &io_addr, &io_size); - - strdevice = - g_strdup_printf("%sI/O ports at#%d=0x%x - 0x%x\n", - strdevice, ++x, io_addr, - io_addr + io_size); - } else if ((buf[0] >= '0' && buf[0] <= '9') && (buf[4] == ':' || buf[2] == ':')) { - gint bus, device, function, domain; - gpointer start, end; - - if (strdevice != NULL && strhash != NULL) { - g_hash_table_insert(devices, strhash, strdevice); - g_free(category); - g_free(name); - } - - if (buf[4] == ':') { - sscanf(buf, "%x:%x:%x.%d", &domain, &bus, &device, &function); - } else { - /* lspci without domain field */ - sscanf(buf, "%x:%x.%x", &bus, &device, &function); - domain = 0; - } - - WALK_UNTIL(' '); - - start = buf; - - WALK_UNTIL(':'); - end = buf + 1; - *buf = 0; - - buf = start + 1; - category = g_strdup(buf); - - buf = end; - start = buf; - WALK_UNTIL('('); - *buf = 0; - buf = start + 1; - - if (strstr(category, "RAM memory")) icon = "mem"; - else if (strstr(category, "Multimedia")) icon = "media"; - else if (strstr(category, "USB")) icon = "usb"; - else icon = "pci"; - - name = g_strdup(buf); - - strhash = g_strdup_printf("PCI%d", n); - strdevice = g_strdup_printf("[Device Information]\n" - "Name=%s\n" - "Class=%s\n" - "Domain=%d\n" - "Bus, device, function=%d, %d, %d\n", - name, category, domain, bus, - device, function); - pci_list = g_strdup_printf("%s$PCI%d$%s=%s\n", pci_list, n, category, - name); - - n++; - } - } - - if (pclose(lspci)) { - /* error (no pci, perhaps?) */ - pci_list = g_strconcat(pci_list, "No PCI devices found=\n", NULL); - } else if (strhash) { - /* insert the last device */ - g_hash_table_insert(devices, strhash, strdevice); - g_free(category); - g_free(name); - } -} diff --git a/arch/linux/common/.svn/text-base/samba.h.svn-base b/arch/linux/common/.svn/text-base/samba.h.svn-base deleted file mode 100644 index 5f5ecbe5..00000000 --- a/arch/linux/common/.svn/text-base/samba.h.svn-base +++ /dev/null @@ -1,80 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static gchar *smb_shares_list = NULL; -void -scan_samba_shared_directories(void) -{ - GKeyFile *keyfile; - GError *error = NULL; - gchar **groups; - gchar *smbconf; - gsize length; - gint i = 0; - - if (smb_shares_list) { - g_free(smb_shares_list); - } - - keyfile = g_key_file_new(); - - if (!g_file_get_contents("/etc/samba/smb.conf", &smbconf, &length, &error)) { - smb_shares_list = g_strdup("Cannot open /etc/samba/smb.conf=\n"); - g_error_free(error); - goto cleanup; - } - - gchar *_smbconf = smbconf; - for (; *_smbconf; _smbconf++) - if (*_smbconf == ';') *_smbconf = '\0'; - - if (!g_key_file_load_from_data(keyfile, smbconf, length, 0, &error)) { - smb_shares_list = g_strdup("Cannot parse smb.conf=\n"); - g_error_free(error); - goto cleanup; - } - - smb_shares_list = g_strdup(""); - - groups = g_key_file_get_groups(keyfile, NULL); - while (groups[i]) { - if (g_key_file_has_key(keyfile, groups[i], "path", NULL) && - g_key_file_has_key(keyfile, groups[i], "available", NULL)) { - - gchar *available = g_key_file_get_string(keyfile, groups[i], "available", NULL); - - if (g_str_equal(available, "yes")) { - gchar *path = g_key_file_get_string(keyfile, groups[i], "path", NULL); - smb_shares_list = g_strconcat(smb_shares_list, groups[i], "=", - path, "\n", NULL); - g_free(path); - } - - g_free(available); - } - - i++; - } - - g_strfreev(groups); - - cleanup: - g_key_file_free(keyfile); - g_free(smbconf); -} - diff --git a/arch/linux/common/.svn/text-base/sensors.h.svn-base b/arch/linux/common/.svn/text-base/sensors.h.svn-base deleted file mode 100644 index ef834de2..00000000 --- a/arch/linux/common/.svn/text-base/sensors.h.svn-base +++ /dev/null @@ -1,237 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static gchar *sensors = NULL; -static GHashTable *sensor_labels = NULL; -static GHashTable *sensor_compute = NULL; - -static void -read_sensor_labels(gchar *driver) -{ - FILE *conf; - gchar buf[256], *line, *p; - gboolean lock = FALSE; - gint i; - - sensor_labels = g_hash_table_new_full(g_str_hash, g_str_equal, - g_free, g_free); - sensor_compute = g_hash_table_new(g_str_hash, g_str_equal); - - conf = fopen("/etc/sensors.conf", "r"); - if (!conf) - return; - - while (fgets(buf, 256, conf)) { - line = buf; - - remove_linefeed(line); - strend(line, '#'); - - if (*line == '\0') { - continue; - } else if (lock && strstr(line, "label")) { /* label lines */ - gchar **names = g_strsplit(strstr(line, "label") + 5, " ", 0); - gchar *name = NULL, *value = NULL; - - for (i = 0; names[i]; i++) { - if (names[i][0] == '\0') - continue; - - if (!name) name = g_strdup(names[i]); - else if (!value) value = g_strdup(names[i]); - else value = g_strconcat(value, " ", names[i], NULL); - } - - remove_quotes(value); - g_hash_table_insert(sensor_labels, name, value); - - g_strfreev(names); - } else if (lock && strstr(line, "ignore")) { /* ignore lines */ - p = strstr(line, "ignore") + 6; - if (!strchr(p, ' ')) - continue; - - while (*p == ' ') p++; - g_hash_table_insert(sensor_labels, g_strdup(p), "ignore"); - } else if (lock && strstr(line, "compute")) { /* compute lines */ - gchar **formulas = g_strsplit(strstr(line, "compute") + 7, " ", 0); - gchar *name = NULL, *formula = NULL; - - for (i = 0; formulas[i]; i++) { - if (formulas[i][0] == '\0') - continue; - if (formulas[i][0] == ',') - break; - - if (!name) name = g_strdup(formulas[i]); - else if (!formula) formula = g_strdup(formulas[i]); - else formula = g_strconcat(formula, formulas[i], NULL); - } - - g_strfreev(formulas); - g_hash_table_insert(sensor_compute, name, math_string_to_postfix(formula)); - } else if (g_str_has_prefix(line, "chip")) { /* chip lines (delimiter) */ - if (lock == FALSE) { - gchar **chips = g_strsplit(line, " ", 0); - - for (i = 1; chips[i]; i++) { - strend(chips[i], '*'); - - if (g_str_has_prefix(driver, chips[i] + 1)) { - lock = TRUE; - break; - } - } - - g_strfreev(chips); - } else { - break; - } - } - } - - fclose(conf); -} - -static gchar * -get_sensor_label(gchar *sensor) -{ - gchar *ret; - - ret = g_hash_table_lookup(sensor_labels, sensor); - if (!ret) ret = g_strdup(sensor); - else ret = g_strdup(ret); - - return ret; -} - -static float -adjust_sensor(gchar *name, float value) -{ - GSList *postfix; - - postfix = g_hash_table_lookup(sensor_compute, name); - if (!postfix) return value; - - return math_postfix_eval(postfix, value); -} - -static void -read_sensors(void) -{ - gchar *path_hwmon, *path_sensor, *tmp, *driver, *name, *mon; - int hwmon, count; - - if (sensors) - g_free(sensors); - - hwmon = 0; - sensors = g_strdup(""); - - path_hwmon = g_strdup_printf("/sys/class/hwmon/hwmon%d/device/", hwmon); - while (g_file_test(path_hwmon, G_FILE_TEST_EXISTS)) { - tmp = g_strdup_printf("%sdriver", path_hwmon); - driver = g_file_read_link(tmp, NULL); - g_free(tmp); - - tmp = g_path_get_basename(driver); - g_free(driver); - driver = tmp; - - if (!sensor_labels) { - read_sensor_labels(driver); - } - - sensors = g_strdup_printf("%s[Driver Info]\n" - "Name=%s\n", sensors, driver); - - sensors = g_strconcat(sensors, "[Cooling Fans]\n", NULL); - for (count = 1; ; count++) { - path_sensor = g_strdup_printf("%sfan%d_input", path_hwmon, count); - if (!g_file_get_contents(path_sensor, &tmp, NULL, NULL)) { - g_free(path_sensor); - break; - } - - mon = g_strdup_printf("fan%d", count); - name = get_sensor_label(mon); - if (!g_str_equal(name, "ignore")) { - sensors = g_strdup_printf("%s%s=%.0fRPM\n", - sensors, name, - adjust_sensor(mon, atof(tmp))); - } - - g_free(name); - g_free(mon); - g_free(tmp); - g_free(path_sensor); - } - - sensors = g_strconcat(sensors, "[Temperatures]\n", NULL); - for (count = 1; ; count++) { - path_sensor = g_strdup_printf("%stemp%d_input", path_hwmon, count); - if (!g_file_get_contents(path_sensor, &tmp, NULL, NULL)) { - g_free(path_sensor); - break; - } - - mon = g_strdup_printf("temp%d", count); - name = get_sensor_label(mon); - if (!g_str_equal(name, "ignore")) { - sensors = g_strdup_printf("%s%s=%.2f\302\260C\n", - sensors, name, - adjust_sensor(mon, atof(tmp) / 1000.0)); - } - - g_free(tmp); - g_free(name); - g_free(path_sensor); - g_free(mon); - } - - sensors = g_strconcat(sensors, "[Voltage Values]\n", NULL); - for (count = 0; ; count++) { - path_sensor = g_strdup_printf("%sin%d_input", path_hwmon, count); - if (!g_file_get_contents(path_sensor, &tmp, NULL, NULL)) { - g_free(path_sensor); - break; - } - - - mon = g_strdup_printf("in%d", count); - name = get_sensor_label(mon); - if (!g_str_equal(name, "ignore")) { - sensors = g_strdup_printf("%s%s=%.3fV\n", - sensors, name, - adjust_sensor(mon, atof(tmp) / 1000.0)); - } - - g_free(tmp); - g_free(mon); - g_free(name); - g_free(path_sensor); - } - - g_free(path_hwmon); - g_free(driver); - path_hwmon = g_strdup_printf("/sys/class/hwmon/hwmon%d/device/", ++hwmon); - } - - g_free(path_hwmon); -} - diff --git a/arch/linux/common/.svn/text-base/storage.h.svn-base b/arch/linux/common/.svn/text-base/storage.h.svn-base deleted file mode 100644 index 4fb682a9..00000000 --- a/arch/linux/common/.svn/text-base/storage.h.svn-base +++ /dev/null @@ -1,268 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static gchar *storage_icons = ""; - -static gboolean -remove_scsi_devices(gpointer key, gpointer value, gpointer data) -{ - if (!strncmp((gchar *) key, "SCSI", 4)) { - g_free((gchar *) key); - g_free((GtkTreeIter *) value); - return TRUE; - } - return FALSE; -} - -/* SCSI support by Pascal F.Martin <pascalmartin@earthlink.net> */ -void -scan_scsi(void) -{ - FILE *proc_scsi; - gchar buffer[256], *buf; - gint n = 0; - gint scsi_controller; - gint scsi_channel; - gint scsi_id; - gint scsi_lun; - gchar *vendor = NULL, *revision = NULL, *model = NULL; - - /* remove old devices from global device table */ - g_hash_table_foreach_remove(devices, remove_scsi_devices, NULL); - - if (!g_file_test("/proc/scsi/scsi", G_FILE_TEST_EXISTS)) - return; - - storage_list = g_strconcat(storage_list, "\n[SCSI Disks]\n", NULL); - - proc_scsi = fopen("/proc/scsi/scsi", "r"); - while (fgets(buffer, 256, proc_scsi)) { - buf = g_strstrip(buffer); - if (!strncmp(buf, "Host: scsi", 10)) { - sscanf(buf, - "Host: scsi%d Channel: %d Id: %d Lun: %d", - &scsi_controller, &scsi_channel, &scsi_id, &scsi_lun); - - n++; - } else if (!strncmp(buf, "Vendor: ", 8)) { - char *p; - char *rev = strstr(buf, "Rev: "); - - model = strstr(buf, "Model: "); - - if (model == NULL) { - model = buf + strlen(buf); - } - p = model; - while (*(--p) == ' '); - *(++p) = 0; - vendor = g_strdup(buf + 8); - - if (rev != NULL) { - revision = g_strdup(rev + 5); - } else { - rev = model + strlen(model); - } - p = rev; - while (*(--p) == ' '); - *(++p) = 0; - model = g_strdup_printf("%s %s", vendor, model + 7); - - } else if (!strncmp(buf, "Type: ", 8)) { - char *p = strstr(buf, "ANSI SCSI revi"); - gchar *type = NULL, *icon = NULL; - - if (p != NULL) { - while (*(--p) == ' '); - *(++p) = 0; - - static struct { - char *type; - char *label; - char *icon; - } type2icon[] = { - { "Direct-Access", "Disk", "hdd"}, - { "Sequential-Access", "Tape", "tape"}, - { "Printer", "Printer", "lpr"}, - { "WORM", "CD-ROM", "cd"}, - { "CD-ROM", "CD-ROM", "cd"}, - { "Scanner", "Scanner", "scanner"}, - { NULL, "Generic", "scsi"} - }; - int i; - - for (i = 0; type2icon[i].type != NULL; i++) - if (!strcmp(buf + 8, type2icon[i].type)) - break; - - type = type2icon[i].label; - icon = type2icon[i].icon; - } - - gchar *devid = g_strdup_printf("SCSI%d", n); - storage_list = g_strdup_printf("%s$%s$%s=\n", storage_list, devid, model); - storage_icons = g_strdup_printf("%sIcon$%s$%s=%s.png\n", storage_icons, devid, model, icon); - - gchar *strhash = g_strdup_printf("[Device Information]\n" - "Model=%s\n" - "Type=%s\n" - "Revision=%s\n" - "[SCSI Controller]\n" - "Controller=scsi%d\n" - "Channel=%d\n" - "ID=%d\n" "LUN=%d\n", - model, - type, - revision, - scsi_controller, - scsi_channel, - scsi_id, - scsi_lun); - g_hash_table_insert(devices, devid, strhash); - - g_free(model); - g_free(revision); - g_free(vendor); - } - } - fclose(proc_scsi); -} - -static gboolean -remove_ide_devices(gpointer key, gpointer value, gpointer data) -{ - if (!strncmp((gchar *) key, "IDE", 3)) { - g_free((gchar *) key); - g_free((gchar *) value); - - return TRUE; - } - return FALSE; -} - - -void -scan_ide(void) -{ - FILE *proc_ide; - gchar *device, iface, *model, *media, *pgeometry = NULL, *lgeometry = - NULL; - gint n = 0, i = 0, cache; - - /* remove old devices from global device table */ - g_hash_table_foreach_remove(devices, remove_ide_devices, NULL); - - storage_list = g_strdup_printf("%s\n[IDE Disks]\n", storage_list); - - iface = 'a'; - for (i = 0; i <= 16; i++) { - device = g_strdup_printf("/proc/ide/hd%c/model", iface); - if (g_file_test(device, G_FILE_TEST_EXISTS)) { - gchar buf[64]; - - cache = 0; - - proc_ide = fopen(device, "r"); - fgets(buf, 64, proc_ide); - fclose(proc_ide); - - buf[strlen(buf) - 1] = 0; - - model = g_strdup(buf); - - g_free(device); - - device = g_strdup_printf("/proc/ide/hd%c/media", iface); - proc_ide = fopen(device, "r"); - fgets(buf, 64, proc_ide); - fclose(proc_ide); - buf[strlen(buf) - 1] = 0; - - media = g_strdup(buf); - - g_free(device); - - device = g_strdup_printf("/proc/ide/hd%c/cache", iface); - if (g_file_test(device, G_FILE_TEST_EXISTS)) { - proc_ide = fopen(device, "r"); - fscanf(proc_ide, "%d", &cache); - fclose(proc_ide); - } - g_free(device); - - device = g_strdup_printf("/proc/ide/hd%c/geometry", iface); - if (g_file_test(device, G_FILE_TEST_EXISTS)) { - gchar *tmp; - - proc_ide = fopen(device, "r"); - - fgets(buf, 64, proc_ide); - for (tmp = buf; *tmp; tmp++) { - if (*tmp >= '0' && *tmp <= '9') - break; - } - - pgeometry = g_strdup(g_strstrip(tmp)); - - fgets(buf, 64, proc_ide); - for (tmp = buf; *tmp; tmp++) { - if (*tmp >= '0' && *tmp <= '9') - break; - } - lgeometry = g_strdup(g_strstrip(tmp)); - - fclose(proc_ide); - } - g_free(device); - - n++; - - gchar *devid = g_strdup_printf("IDE%d", n); - - storage_list = g_strdup_printf("%s$%s$%s=\n", storage_list, - devid, model); - storage_icons = g_strdup_printf("%sIcon$%s$%s=%s.png\n", storage_icons, devid, - model, g_str_equal(media, "cdrom") ? \ - "cdrom" : "hdd"); - - gchar *strhash = g_strdup_printf("[Device Information]\n" - "Model=%s\n" - "Device Name=hd%c\n" - "Media=%s\n" "Cache=%dkb\n", - model, iface, media, cache); - if (pgeometry && lgeometry) - strhash = g_strdup_printf("%s[Geometry]\n" - "Physical=%s\n" - "Logical=%s\n", - strhash, pgeometry, lgeometry); - - g_hash_table_insert(devices, devid, strhash); - - g_free(model); - model = ""; - - g_free(pgeometry); - pgeometry = NULL; - g_free(lgeometry); - lgeometry = NULL; - } else - g_free(device); - - iface++; - } -} diff --git a/arch/linux/common/.svn/text-base/uptime.h.svn-base b/arch/linux/common/.svn/text-base/uptime.h.svn-base deleted file mode 100644 index cf339bf3..00000000 --- a/arch/linux/common/.svn/text-base/uptime.h.svn-base +++ /dev/null @@ -1,75 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static UptimeInfo * -computer_get_uptime(void) -{ - UptimeInfo *ui = g_new0(UptimeInfo, 1); - FILE *procuptime; - gulong minutes; - - if ((procuptime = fopen("/proc/uptime", "r")) != NULL) { - fscanf(procuptime, "%lu", &minutes); - ui->minutes = minutes / 60; - fclose(procuptime); - } else { - return NULL; - } - - ui->hours = ui->minutes / 60; - ui->minutes %= 60; - ui->days = ui->hours / 24; - ui->hours %= 24; - - return ui; -} - -static gchar * -computer_get_formatted_uptime() -{ - UptimeInfo *ui; - gchar *tmp; - - ui = computer_get_uptime(); - - /* FIXME: Use ngettext */ -#define plural(x) ((x > 1) ? "s" : "") - - - if (ui->days < 1) { - if (ui->hours < 1) { - tmp = - g_strdup_printf("%d minute%s", ui->minutes, - plural(ui->minutes)); - } else { - tmp = - g_strdup_printf("%d hour%s, %d minute%s", ui->hours, - plural(ui->hours), ui->minutes, - plural(ui->minutes)); - } - } else { - tmp = - g_strdup_printf("%d day%s, %d hour%s and %d minute%s", - ui->days, plural(ui->days), ui->hours, - plural(ui->hours), ui->minutes, - plural(ui->minutes)); - } - - g_free(ui); - return tmp; -} diff --git a/arch/linux/common/.svn/text-base/usb.h.svn-base b/arch/linux/common/.svn/text-base/usb.h.svn-base deleted file mode 100644 index a52be2cb..00000000 --- a/arch/linux/common/.svn/text-base/usb.h.svn-base +++ /dev/null @@ -1,132 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static gboolean -remove_usb_devices(gpointer key, gpointer value, gpointer data) -{ - if (!strncmp((gchar *) key, "USB", 3)) { - GtkTreeIter *iter = (GtkTreeIter *) data; - - g_free((gchar *) value); - g_free(iter); - - return TRUE; - } - return FALSE; -} - -static gchar *usb_list = NULL; -void -scan_usb(void) -{ - FILE *dev; - gchar buffer[128]; - gchar *tmp, *manuf = NULL, *product = NULL, *mxpwr; - gint bus, level, port, classid, trash; - gint vendor, prodid; - gfloat ver, rev, speed; - int n = 0; - - dev = fopen("/proc/bus/usb/devices", "r"); - if (!dev) - return; - - if (usb_list) { - g_hash_table_foreach_remove(devices, remove_usb_devices, NULL); - g_free(usb_list); - } - usb_list = g_strdup(""); - - while (fgets(buffer, 128, dev)) { - tmp = buffer; - - switch (*tmp) { - case 'T': - sscanf(tmp, - "T: Bus=%d Lev=%d Prnt=%d Port=%d Cnt=%d Dev#=%d Spd=%f", - &bus, &level, &trash, &port, &trash, &trash, &speed); - break; - case 'D': - sscanf(tmp, "D: Ver=%f Cls=%x", &ver, &classid); - break; - case 'P': - sscanf(tmp, "P: Vendor=%x ProdID=%x Rev=%f", - &vendor, &prodid, &rev); - break; - case 'S': - if (strstr(tmp, "Manufacturer=")) { - manuf = g_strdup(strchr(tmp, '=') + 1); - remove_linefeed(manuf); - } else if (strstr(tmp, "Product=")) { - product = g_strdup(strchr(tmp, '=') + 1); - remove_linefeed(product); - } - break; - case 'C': - mxpwr = strstr(buffer, "MxPwr=") + 6; - - tmp = g_strdup_printf("USB%d", ++n); - - if (*product == '\0') { - g_free(product); - if (classid == 9) { - product = g_strdup_printf("USB %.2f Hub", ver); - } else { - product = g_strdup_printf("Unknown USB %.2f Device (class %d)", - ver, classid); - } - } - - - if (classid == 9) { /* hub */ - usb_list = g_strdup_printf("%s[%s#%d]\n", - usb_list, product, n); - } else { /* everything else */ - usb_list = g_strdup_printf("%s$%s$%s=\n", - usb_list, tmp, product); - - gchar *strhash = g_strdup_printf("[Device Information]\n" - "Product=%s\n" - "Manufacturer=%s\n" - "[Port #%d]\n" - "Speed=%.2fMbit/s\n" - "Max Current=%s\n" - "[Misc]\n" - "USB Version=%.2f\n" - "Revision=%.2f\n" - "Class=0x%x\n" - "Vendor=0x%x\n" - "Product ID=0x%x\n" - "Bus=%d\n" "Level=%d\n", - product, manuf, - port, speed, mxpwr, - ver, rev, classid, - vendor, prodid, bus, level); - - g_hash_table_insert(devices, tmp, strhash); - } - - g_free(manuf); - g_free(product); - manuf = g_strdup(""); - product = g_strdup(""); - } - } - - fclose(dev); -} diff --git a/arch/linux/common/battery.h b/arch/linux/common/battery.h new file mode 100644 index 00000000..20979e48 --- /dev/null +++ b/arch/linux/common/battery.h @@ -0,0 +1,212 @@ +/* + * HardInfo - Displays System Information + * Copyright (C) 2003-2006 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 + * the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include <time.h> + +static void +__scan_battery_acpi(void) +{ + gchar *acpi_path; + + gchar *present = NULL; + gchar *capacity = NULL; + gchar *technology = NULL; + gchar *voltage = NULL; + gchar *model = NULL, *serial = NULL, *type = NULL; + gchar *state = NULL, *rate = NULL; + gchar *remaining = NULL; + + if (battery_list) { + g_free(battery_list); + } + battery_list = g_strdup(""); + + acpi_path = g_strdup("/proc/acpi/battery"); + if (g_file_test(acpi_path, G_FILE_TEST_EXISTS)) { + GDir *acpi; + + if ((acpi = g_dir_open(acpi_path, 0, NULL))) { + const gchar *entry; + + while ((entry = g_dir_read_name(acpi))) { + gchar *path = g_strdup_printf("%s/%s/info", acpi_path, entry); + FILE *f; + gchar buffer[256]; + gdouble charge_rate = 1.0; + + f = fopen(path, "r"); + g_free(path); + + if (!f) + goto cleanup; + + while (fgets(buffer, 256, f)) { + gchar **tmp = g_strsplit(buffer, ":", 2); + + GET_STR("present", present); + GET_STR("design capacity", capacity); + GET_STR("battery technology", technology); + GET_STR("design voltage", voltage); + GET_STR("model number", model); + GET_STR("serial number", serial); + GET_STR("battery type", type); + + g_strfreev(tmp); + } + fclose(f); + + path = g_strdup_printf("%s/%s/state", acpi_path, entry); + f = fopen(path, "r"); + g_free(path); + + if (!f) + goto cleanup; + + while (fgets(buffer, 256, f)) { + gchar **tmp = g_strsplit(buffer, ":", 2); + + GET_STR("charging state", state); + GET_STR("present rate", rate); + GET_STR("remaining capacity", remaining); + + g_strfreev(tmp); + } + + fclose(f); + + if (g_str_equal(present, "yes")) { + charge_rate = atof(remaining) / atof(capacity); + + battery_list = g_strdup_printf("%s\n[Battery: %s]\n" + "State=%s (load: %s)\n" + "Capacity=%s / %s (%.2f%%)\n" + "Battery Technology=%s (%s)\n" + "Model Number=%s\n" + "Serial Number=%s\n", + battery_list, + entry, + state, rate, + remaining, capacity, charge_rate * 100.0, + technology, type, + model, + serial); + } + + cleanup: + g_free(present); + g_free(capacity); + g_free(technology); + g_free(type); + g_free(model); + g_free(serial); + g_free(state); + g_free(remaining); + g_free(rate); + + present = capacity = technology = type = \ + model = serial = state = remaining = rate = NULL; + } + + g_dir_close(acpi); + } + } + + g_free(acpi_path); +} + +static void +__scan_battery_apm(void) +{ + FILE *procapm; + static char *sremaining = NULL, *stotal = NULL; + static unsigned int last_time = 0; + static int percentage = 0; + const char *ac_status[] = { "Battery", + "AC Power", + "Charging" }; + int ac_bat; + char apm_bios_ver[16], apm_drv_ver[16]; + char trash[10]; + + if ((procapm = fopen("/proc/apm", "r"))) { + int old_percentage = percentage; + + fscanf(procapm, "%s %s %s 0x%x %s %s %d%%", + apm_drv_ver, apm_bios_ver, trash, + &ac_bat, trash, trash, &percentage); + fclose(procapm); + + if (last_time == 0) { + last_time = time(NULL); + sremaining = stotal = NULL; + } + + if (old_percentage - percentage > 0) { + if (sremaining && stotal) { + g_free(sremaining); + g_free(stotal); + } + + int secs_remaining = (time(NULL) - last_time) * percentage / + (old_percentage - percentage); + sremaining = seconds_to_string(secs_remaining); + stotal = seconds_to_string((secs_remaining * 100) / percentage); + + last_time = time(NULL); + } + } else { + return; + } + + if (stotal && sremaining) { + battery_list = g_strdup_printf("%s\n[Battery (APM)]\n" + "Charge=%d%%\n" + "Remaining Charge=%s of %s\n" + "Using=%s\n" + "APM driver version=%s\n" + "APM BIOS version=%s\n", + battery_list, + percentage, + sremaining, stotal, + ac_status[ac_bat], + apm_drv_ver, apm_bios_ver); + } else { + battery_list = g_strdup_printf("%s\n[Battery (APM)]\n" + "Charge=%d%%\n" + "Using=%s\n" + "APM driver version=%s\n" + "APM BIOS version=%s\n", + battery_list, + percentage, + ac_status[ac_bat], + apm_drv_ver, apm_bios_ver); + + } +} + +static void +__scan_battery(void) +{ + if (battery_list) { + g_free(battery_list); + } + battery_list = g_strdup(""); + + __scan_battery_acpi(); + __scan_battery_apm(); +} diff --git a/arch/linux/common/boots.h b/arch/linux/common/boots.h new file mode 100644 index 00000000..c95ba321 --- /dev/null +++ b/arch/linux/common/boots.h @@ -0,0 +1,61 @@ +/* + * HardInfo - Displays System Information + * 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 + * the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +void +scan_boots_real(void) +{ + FILE *last; + char buffer[256]; + + scan_os(FALSE); + + if (!computer->os->boots) + computer->os->boots = "[Boots]\n"; + else + return; + + last = popen("last", "r"); + if (last) { + while (fgets(buffer, 256, last)) { + if (strstr(buffer, "system boot")) { + gchar **tmp, *buf = buffer; + + strend(buffer, '\n'); + + while (*buf) { + if (*buf == ' ' && *(buf + 1) == ' ') { + strcpy(buf, buf + 1); + + buf--; + } else { + buf++; + } + } + + tmp = g_strsplit(buffer, " ", 5); + computer->os->boots = g_strdup_printf("%s\n%s=Kernel %s", + computer->os->boots, + tmp[4], + tmp[3]); + g_strfreev(tmp); + } + } + + pclose(last); + } +} diff --git a/arch/linux/common/devmemory.h b/arch/linux/common/devmemory.h new file mode 100644 index 00000000..780ab12f --- /dev/null +++ b/arch/linux/common/devmemory.h @@ -0,0 +1,99 @@ +/* + * HardInfo - Displays System Information + * 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 + * the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +static GHashTable *memlabels; + +static void __scan_memory() +{ + gchar **keys, *tmp; + static gint offset = -1; + gint i; + + if (offset == -1) { + /* gah. linux 2.4 adds three lines of data we don't need in + /proc/meminfo */ + offset = strstr(idle_free(module_call_method("computer::getOSKernel")), + "Linux 2.4") ? 3 : 0; + } + + g_file_get_contents("/proc/meminfo", &meminfo, NULL, NULL); + + keys = g_strsplit(meminfo, "\n", 0); + + g_free(meminfo); + g_free(lginterval); + + meminfo = g_strdup(""); + lginterval = g_strdup(""); + + for (i = offset; keys[i]; i++) { + gchar **newkeys = g_strsplit(keys[i], ":", 0); + + if (!newkeys[0]) { + g_strfreev(newkeys); + break; + } + + g_strstrip(newkeys[1]); + + if ((tmp = g_hash_table_lookup(memlabels, newkeys[0]))) { + g_free(newkeys[0]); + newkeys[0] = g_strdup(tmp); + } + + g_hash_table_replace(moreinfo, g_strdup(newkeys[0]), g_strdup(newkeys[1])); + + tmp = g_strconcat(meminfo, newkeys[0], "=", newkeys[1], "\n", NULL); + g_free(meminfo); + meminfo = tmp; + + tmp = g_strconcat(lginterval, + "UpdateInterval$", newkeys[0], "=1000\n", NULL); + g_free(lginterval); + lginterval = tmp; + + g_strfreev(newkeys); + } + g_strfreev(keys); +} + +static void __init_memory_labels(void) +{ + static struct { + char *proc_label; + char *real_label; + } proc2real[] = { + { "MemTotal", "Total Memory" }, + { "MemFree", "Free Memory" }, + { "SwapCached", "Cached Swap" }, + { "HighTotal", "High Memory" }, + { "HighFree", "Free High Memory" }, + { "LowTotal", "Low Memory" }, + { "LowFree", "Free Low Memory" }, + { "SwapTotal", "Virtual Memory" }, + { "SwapFree", "Free Virtual Memory" }, + { NULL }, + }; + gint i; + + memlabels = g_hash_table_new(g_str_hash, g_str_equal); + + for (i = 0; proc2real[i].proc_label; i++) { + g_hash_table_insert(memlabels, proc2real[i].proc_label, proc2real[i].real_label); + } +} diff --git a/arch/linux/common/filesystem.h b/arch/linux/common/filesystem.h index 79784c8f..8300f278 100644 --- a/arch/linux/common/filesystem.h +++ b/arch/linux/common/filesystem.h @@ -20,25 +20,9 @@ * Distributed under the terms of GNU GPL 2. */ #include <sys/vfs.h> -#define KB 1024 -#define MB 1048576 -#define GB 1073741824 static gchar *fs_list = NULL; -static gchar * -fs_human_readable(gfloat size) -{ - if (size < KB) - return g_strdup_printf("%.1f B", size); - if (size < MB) - return g_strdup_printf("%.1f KiB", size / KB); - if (size < GB) - return g_strdup_printf("%.1f MiB", size / MB); - - return g_strdup_printf("%.1f GiB", size / GB); -} - static void scan_filesystems(void) { @@ -63,16 +47,18 @@ scan_filesystems(void) avail = (float) sfs.f_bsize * (float) sfs.f_bavail; used = size - avail; - gchar *strsize = fs_human_readable(size), - *stravail = fs_human_readable(avail), - *strused = fs_human_readable(used); + gchar *strsize = size_human_readable(size), + *stravail = size_human_readable(avail), + *strused = size_human_readable(used); gchar *strhash; if ((strhash = g_hash_table_lookup(moreinfo, tmp[0]))) { g_hash_table_remove(moreinfo, tmp[0]); g_free(strhash); } - + + strreplace(tmp[0], "#", '_'); + strhash = g_strdup_printf("[%s]\n" "Filesystem=%s\n" "Mounted As=%s\n" diff --git a/arch/linux/common/inputdevices.h b/arch/linux/common/inputdevices.h index 44a109ca..1a5baff8 100644 --- a/arch/linux/common/inputdevices.h +++ b/arch/linux/common/inputdevices.h @@ -22,8 +22,6 @@ static gboolean remove_input_devices(gpointer key, gpointer value, gpointer data) { if (!strncmp((gchar *) key, "INP", 3)) { - g_free((gchar *) key); - g_free((GtkTreeIter *) value); return TRUE; } @@ -42,7 +40,7 @@ static struct { }; void -scan_inputdevices(void) +__scan_input_devices(void) { FILE *dev; gchar buffer[128]; @@ -55,7 +53,7 @@ scan_inputdevices(void) return; if (input_list) { - g_hash_table_foreach_remove(devices, remove_input_devices, NULL); + g_hash_table_foreach_remove(moreinfo, remove_input_devices, NULL); g_free(input_list); g_free(input_icons); } @@ -103,15 +101,31 @@ scan_inputdevices(void) gchar *strhash = g_strdup_printf("[Device Information]\n" "Name=%s\n" "Type=%s\n" - "Bus=0x%x\n" - "Vendor=0x%x\n" - "Product=0x%x\n" - "Version=0x%x\n" - "Connected to=%s\n", - name, input_devices[d].name, - bus, vendor, product, - version, phys); - g_hash_table_insert(devices, tmp, strhash); + "Bus=0x%x\n", + name, + input_devices[d].name, + bus); + + const gchar *url = vendor_get_url(name); + if (url) { + strhash = g_strdup_printf("%s" + "Vendor=%s (%s)\n", + strhash, + vendor_get_name(name), + url); + } else { + strhash = g_strdup_printf("%s" + "Vendor=%x\n", + strhash, + vendor); + } + + strhash = g_strdup_printf("%s" + "Product=0x%x\n" + "Version=0x%x\n" + "Connected to=%s\n", + strhash, product, version, phys); + g_hash_table_insert(moreinfo, tmp, strhash); g_free(phys); g_free(name); diff --git a/arch/linux/common/modules.h b/arch/linux/common/modules.h index 69f7ebd6..9b895ee8 100644 --- a/arch/linux/common/modules.h +++ b/arch/linux/common/modules.h @@ -16,12 +16,37 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -void -scan_modules(void) +#define GET_STR(field_name,ptr) \ + if (!ptr && strstr(tmp[0], field_name)) { \ + ptr = g_markup_escape_text(g_strstrip(tmp[1]), strlen(tmp[1])); \ + g_strfreev(tmp); \ + continue; \ + } + +static gboolean +remove_module_devices(gpointer key, gpointer value, gpointer data) +{ + if (!strncmp((gchar *) key, "MOD", 3)) { + g_free((gchar *) key); + g_free((GtkTreeIter *) value); + return TRUE; + } + return FALSE; +} + +static void +scan_modules_do(void) { FILE *lsmod; gchar buffer[1024]; + if (module_list) { + g_free(module_list); + module_list = NULL; + } + + g_hash_table_foreach_remove(moreinfo, remove_module_devices, NULL); + lsmod = popen("/sbin/lsmod", "r"); if (!lsmod) return; @@ -44,7 +69,7 @@ scan_modules(void) sscanf(buf, "%s %ld", modname, &memory); hashkey = g_strdup_printf("MOD%s", modname); - buf = g_strdup_printf("/sbin/modinfo %s", modname); + buf = g_strdup_printf("/sbin/modinfo %s 2>/dev/null", modname); modi = popen(buf, "r"); while (fgets(buffer, 1024, modi)) { @@ -72,14 +97,14 @@ scan_modules(void) /* old modutils displays <none> when there's no value for a given field; this is not desirable in the module name display, so change it to an empty string */ - if (description && !strcmp(description, "<none>")) { + if (description && g_str_equal(description, "<none>")) { g_free(description); description = g_strdup(""); } /* append this module to the list of modules */ module_list = g_strdup_printf("%s$%s$%s=%s\n", - module_list, + module_list ? module_list : "", hashkey, modname, description ? description : ""); @@ -117,7 +142,7 @@ scan_modules(void) g_free(deps); } - g_hash_table_insert(devices, hashkey, strmodule); + g_hash_table_insert(moreinfo, hashkey, strmodule); g_free(license); g_free(description); diff --git a/arch/linux/common/net.h b/arch/linux/common/net.h index 87e7e59b..cd8b8706 100644 --- a/arch/linux/common/net.h +++ b/arch/linux/common/net.h @@ -24,14 +24,25 @@ static gchar *network_interfaces = NULL; #include <linux/sockios.h> #include <sys/socket.h> +#include <stdio.h> +#include <unistd.h> +#include <string.h> /* for strncpy */ +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> + + typedef struct _NetInfo NetInfo; struct _NetInfo { - char name[16]; - int mtu; - unsigned char mac[8]; + char name[16]; + int mtu; + unsigned char mac[8]; + char ip[16]; + char mask[16]; + char broadcast[16]; }; - void get_net_info(char *if_name, NetInfo *netinfo) { struct ifreq ifr; @@ -39,21 +50,49 @@ void get_net_info(char *if_name, NetInfo *netinfo) fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); - strcpy(ifr.ifr_name, if_name); + /* IPv4 */ + ifr.ifr_addr.sa_family = AF_INET; strcpy(netinfo->name, if_name); + /* MTU */ + strcpy(ifr.ifr_name, if_name); if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) { netinfo->mtu = 0; } else { netinfo->mtu = ifr.ifr_mtu; } - + + /* HW Address */ strcpy(ifr.ifr_name, if_name); if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) { memset(netinfo->mac, 0, 8); } else { memcpy(netinfo->mac, ifr.ifr_ifru.ifru_hwaddr.sa_data, 8); } + + /* IP Address */ + strcpy(ifr.ifr_name, if_name); + if (ioctl(fd, SIOCGIFADDR, &ifr) < 0) { + netinfo->ip[0] = 0; + } else { + sprintf(netinfo->ip, "%s", inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr)); + } + + /* Mask Address */ + strcpy(ifr.ifr_name, if_name); + if (ioctl(fd, SIOCGIFNETMASK, &ifr) < 0) { + netinfo->mask[0] = 0; + } else { + sprintf(netinfo->mask, "%s", inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr)); + } + + /* Broadcast Address */ + strcpy(ifr.ifr_name, if_name); + if (ioctl(fd, SIOCGIFBRDADDR, &ifr) < 0) { + netinfo->broadcast[0] = 0; + } else { + sprintf(netinfo->broadcast, "%s", inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr)); + } shutdown(fd, 0); } @@ -162,21 +201,25 @@ scan_net_interfaces_24(void) gfloat recv_mb = recv_bytes / 1048576.0; gfloat trans_mb = trans_bytes / 1048576.0; + get_net_info(ifacename, &ni); + devid = g_strdup_printf("NET%s", ifacename); - network_interfaces = g_strdup_printf("%s$%s$%s=Sent %.2fMiB, received %.2fMiB\n", + network_interfaces = g_strdup_printf("%s$%s$%s=Sent %.2fMiB, received %.2fMiB%s\n", network_interfaces, devid, ifacename, trans_mb, - recv_mb); + recv_mb, + ni.ip[0] ? + (gchar*)idle_free(g_strdup_printf(" (%s)", ni.ip)) : ""); - get_net_info(ifacename, &ni); detailed = g_strdup_printf("[Network Adapter Properties]\n" "Interface Type=%s\n" - "Hardware Address=%02x:%02x:%02x:%02x:%02x:%02x\n" + "Hardware Address (MAC)=%02x:%02x:%02x:%02x:%02x:%02x\n" "MTU=%d\n" - "Bytes Sent=%ld (%.2fMiB)\n" - "Bytes Received=%ld (%.2fMiB)\n", + "[Transfer Details]\n" + "Bytes Received=%ld (%.2fMiB)\n" + "Bytes Sent=%ld (%.2fMiB)\n", net_get_iface_type(ifacename), ni.mac[0], ni.mac[1], ni.mac[2], ni.mac[3], @@ -184,6 +227,19 @@ scan_net_interfaces_24(void) ni.mtu, recv_bytes, recv_mb, trans_bytes, trans_mb); + + if (ni.ip[0] || ni.mask[0] || ni.broadcast[0]) { + detailed = g_strdup_printf("%s\n" + "[Internet Protocol (IPv4)]\n" + "IP Address=%s\n" + "Mask=%s\n" + "Broadcast Address=%s\n", + detailed, + ni.ip[0] ? ni.ip : "Not set", + ni.mask[0] ? ni.mask : "Not set", + ni.broadcast[0] ? ni.broadcast : "Not set"); + } + g_hash_table_insert(moreinfo, devid, detailed); } } diff --git a/arch/linux/common/os.h b/arch/linux/common/os.h index 0f7b59e3..d30146ef 100644 --- a/arch/linux/common/os.h +++ b/arch/linux/common/os.h @@ -75,7 +75,9 @@ detect_desktop_environment(OperatingSystem * os) obtain the version. */ version = popen("gnome-panel --version", "r"); if (version) { - fscanf(version, "Gnome gnome-panel %d.%d", &maj, &min); + char gnome[10]; + + fscanf(version, "%s gnome-panel %d.%d", gnome, &maj, &min); if (pclose(version)) goto unknown; } else { @@ -105,18 +107,23 @@ detect_desktop_environment(OperatingSystem * os) if (!g_getenv("DISPLAY")) { os->desktop = g_strdup("Terminal"); } else { - const gchar *windowman; GdkScreen *screen = gdk_screen_get_default(); - - windowman = gdk_x11_screen_get_window_manager_name(screen); - if (g_str_equal(windowman, "Xfwm4")) { - /* FIXME: check if xprop -root | grep XFCE_DESKTOP_WINDOW - is defined */ - os->desktop = g_strdup("XFCE 4"); + if (screen && GDK_IS_SCREEN(screen)) { + const gchar *windowman; + + windowman = gdk_x11_screen_get_window_manager_name(screen); + + if (g_str_equal(windowman, "Xfwm4")) { + /* FIXME: check if xprop -root | grep XFCE_DESKTOP_WINDOW + is defined */ + os->desktop = g_strdup("XFCE 4"); + } else { + os->desktop = g_strdup_printf("Unknown (Window Manager: %s)", + windowman); + } } else { - os->desktop = g_strdup_printf("Unknown (Window Manager: %s)", - windowman); + os->desktop = g_strdup("Unknown"); } } } diff --git a/arch/linux/common/pci.h b/arch/linux/common/pci.h index f8c9d319..e50691d0 100644 --- a/arch/linux/common/pci.h +++ b/arch/linux/common/pci.h @@ -17,7 +17,7 @@ */ void -scan_pci(void) +__scan_pci(void) { FILE *lspci; gchar buffer[256], *buf, *strhash = NULL, *strdevice = NULL; @@ -126,7 +126,7 @@ scan_pci(void) gpointer start, end; if (strdevice != NULL && strhash != NULL) { - g_hash_table_insert(devices, strhash, strdevice); + g_hash_table_insert(moreinfo, strhash, strdevice); g_free(category); g_free(name); } @@ -171,6 +171,17 @@ scan_pci(void) "Bus, device, function=%d, %d, %d\n", name, category, domain, bus, device, function); + + const gchar *url = vendor_get_url(name); + if (url) { + strdevice = g_strdup_printf("%s" + "Vendor=%s (%s)\n", + strdevice, + vendor_get_name(name), + url); + } + + pci_list = g_strdup_printf("%s$PCI%d$%s=%s\n", pci_list, n, category, name); @@ -183,7 +194,7 @@ scan_pci(void) pci_list = g_strconcat(pci_list, "No PCI devices found=\n", NULL); } else if (strhash) { /* insert the last device */ - g_hash_table_insert(devices, strhash, strdevice); + g_hash_table_insert(moreinfo, strhash, strdevice); g_free(category); g_free(name); } diff --git a/arch/linux/common/samba.h b/arch/linux/common/samba.h index 5f5ecbe5..7c7d8bb7 100644 --- a/arch/linux/common/samba.h +++ b/arch/linux/common/samba.h @@ -24,7 +24,7 @@ scan_samba_shared_directories(void) GError *error = NULL; gchar **groups; gchar *smbconf; - gsize length; + gsize length = -1; gint i = 0; if (smb_shares_list) { @@ -33,9 +33,10 @@ scan_samba_shared_directories(void) keyfile = g_key_file_new(); - if (!g_file_get_contents("/etc/samba/smb.conf", &smbconf, &length, &error)) { + if (!g_file_get_contents("/etc/samba/smb.conf", &smbconf, &length, &error) || length == 0) { smb_shares_list = g_strdup("Cannot open /etc/samba/smb.conf=\n"); - g_error_free(error); + if (error) + g_error_free(error); goto cleanup; } @@ -45,7 +46,8 @@ scan_samba_shared_directories(void) if (!g_key_file_load_from_data(keyfile, smbconf, length, 0, &error)) { smb_shares_list = g_strdup("Cannot parse smb.conf=\n"); - g_error_free(error); + if (error) + g_error_free(error); goto cleanup; } diff --git a/arch/linux/common/sensors.h b/arch/linux/common/sensors.h index ef834de2..3303d5d2 100644 --- a/arch/linux/common/sensors.h +++ b/arch/linux/common/sensors.h @@ -20,218 +20,352 @@ static gchar *sensors = NULL; static GHashTable *sensor_labels = NULL; static GHashTable *sensor_compute = NULL; -static void -read_sensor_labels(gchar *driver) +static void read_sensor_labels(gchar * driver) { FILE *conf; gchar buf[256], *line, *p; gboolean lock = FALSE; gint i; - + sensor_labels = g_hash_table_new_full(g_str_hash, g_str_equal, - g_free, g_free); + g_free, g_free); sensor_compute = g_hash_table_new(g_str_hash, g_str_equal); - + conf = fopen("/etc/sensors.conf", "r"); if (!conf) - return; - + return; + while (fgets(buf, 256, conf)) { - line = buf; - - remove_linefeed(line); - strend(line, '#'); - - if (*line == '\0') { - continue; - } else if (lock && strstr(line, "label")) { /* label lines */ - gchar **names = g_strsplit(strstr(line, "label") + 5, " ", 0); - gchar *name = NULL, *value = NULL; - - for (i = 0; names[i]; i++) { - if (names[i][0] == '\0') - continue; - - if (!name) name = g_strdup(names[i]); - else if (!value) value = g_strdup(names[i]); - else value = g_strconcat(value, " ", names[i], NULL); - } - - remove_quotes(value); - g_hash_table_insert(sensor_labels, name, value); - - g_strfreev(names); - } else if (lock && strstr(line, "ignore")) { /* ignore lines */ - p = strstr(line, "ignore") + 6; - if (!strchr(p, ' ')) - continue; - - while (*p == ' ') p++; - g_hash_table_insert(sensor_labels, g_strdup(p), "ignore"); - } else if (lock && strstr(line, "compute")) { /* compute lines */ - gchar **formulas = g_strsplit(strstr(line, "compute") + 7, " ", 0); - gchar *name = NULL, *formula = NULL; - - for (i = 0; formulas[i]; i++) { - if (formulas[i][0] == '\0') - continue; - if (formulas[i][0] == ',') - break; - - if (!name) name = g_strdup(formulas[i]); - else if (!formula) formula = g_strdup(formulas[i]); - else formula = g_strconcat(formula, formulas[i], NULL); - } - - g_strfreev(formulas); - g_hash_table_insert(sensor_compute, name, math_string_to_postfix(formula)); - } else if (g_str_has_prefix(line, "chip")) { /* chip lines (delimiter) */ - if (lock == FALSE) { - gchar **chips = g_strsplit(line, " ", 0); - - for (i = 1; chips[i]; i++) { - strend(chips[i], '*'); - - if (g_str_has_prefix(driver, chips[i] + 1)) { - lock = TRUE; - break; - } - } - - g_strfreev(chips); - } else { - break; - } - } + line = buf; + + remove_linefeed(line); + strend(line, '#'); + + if (*line == '\0') { + continue; + } else if (lock && strstr(line, "label")) { /* label lines */ + gchar **names = g_strsplit(strstr(line, "label") + 5, " ", 0); + gchar *name = NULL, *value = NULL; + + for (i = 0; names[i]; i++) { + if (names[i][0] == '\0') + continue; + + if (!name) + name = g_strdup(names[i]); + else if (!value) + value = g_strdup(names[i]); + else + value = g_strconcat(value, " ", names[i], NULL); + } + + remove_quotes(value); + g_hash_table_insert(sensor_labels, name, value); + + g_strfreev(names); + } else if (lock && strstr(line, "ignore")) { /* ignore lines */ + p = strstr(line, "ignore") + 6; + if (!strchr(p, ' ')) + continue; + + while (*p == ' ') + p++; + g_hash_table_insert(sensor_labels, g_strdup(p), "ignore"); + } else if (lock && strstr(line, "compute")) { /* compute lines */ + gchar **formulas = + g_strsplit(strstr(line, "compute") + 7, " ", 0); + gchar *name = NULL, *formula = NULL; + + for (i = 0; formulas[i]; i++) { + if (formulas[i][0] == '\0') + continue; + if (formulas[i][0] == ',') + break; + + if (!name) + name = g_strdup(formulas[i]); + else if (!formula) + formula = g_strdup(formulas[i]); + else + formula = g_strconcat(formula, formulas[i], NULL); + } + + g_strfreev(formulas); + g_hash_table_insert(sensor_compute, name, + math_string_to_postfix(formula)); + } else if (g_str_has_prefix(line, "chip")) { /* chip lines (delimiter) */ + if (lock == FALSE) { + gchar **chips = g_strsplit(line, " ", 0); + + for (i = 1; chips[i]; i++) { + strend(chips[i], '*'); + + if (g_str_has_prefix(driver, chips[i] + 1)) { + lock = TRUE; + break; + } + } + + g_strfreev(chips); + } else { + break; + } + } } - + fclose(conf); } -static gchar * -get_sensor_label(gchar *sensor) +static gchar *get_sensor_label(gchar * sensor) { gchar *ret; - + ret = g_hash_table_lookup(sensor_labels, sensor); - if (!ret) ret = g_strdup(sensor); - else ret = g_strdup(ret); + if (!ret) + ret = g_strdup(sensor); + else + ret = g_strdup(ret); return ret; } -static float -adjust_sensor(gchar *name, float value) +static float adjust_sensor(gchar * name, float value) { GSList *postfix; - + postfix = g_hash_table_lookup(sensor_compute, name); - if (!postfix) return value; - + if (!postfix) + return value; + return math_postfix_eval(postfix, value); } -static void -read_sensors(void) + +static void read_sensors_hwmon(void) { - gchar *path_hwmon, *path_sensor, *tmp, *driver, *name, *mon; int hwmon, count; - - if (sensors) - g_free(sensors); - + gchar *path_hwmon, *path_sensor, *tmp, *driver, *name, *mon; hwmon = 0; - sensors = g_strdup(""); - - path_hwmon = g_strdup_printf("/sys/class/hwmon/hwmon%d/device/", hwmon); + + path_hwmon = + g_strdup_printf("/sys/class/hwmon/hwmon%d/device/", hwmon); while (g_file_test(path_hwmon, G_FILE_TEST_EXISTS)) { - tmp = g_strdup_printf("%sdriver", path_hwmon); - driver = g_file_read_link(tmp, NULL); - g_free(tmp); - - tmp = g_path_get_basename(driver); - g_free(driver); - driver = tmp; - - if (!sensor_labels) { - read_sensor_labels(driver); - } - - sensors = g_strdup_printf("%s[Driver Info]\n" - "Name=%s\n", sensors, driver); - - sensors = g_strconcat(sensors, "[Cooling Fans]\n", NULL); - for (count = 1; ; count++) { - path_sensor = g_strdup_printf("%sfan%d_input", path_hwmon, count); - if (!g_file_get_contents(path_sensor, &tmp, NULL, NULL)) { - g_free(path_sensor); - break; - } - - mon = g_strdup_printf("fan%d", count); - name = get_sensor_label(mon); - if (!g_str_equal(name, "ignore")) { - sensors = g_strdup_printf("%s%s=%.0fRPM\n", - sensors, name, - adjust_sensor(mon, atof(tmp))); - } - - g_free(name); - g_free(mon); - g_free(tmp); - g_free(path_sensor); - } - - sensors = g_strconcat(sensors, "[Temperatures]\n", NULL); - for (count = 1; ; count++) { - path_sensor = g_strdup_printf("%stemp%d_input", path_hwmon, count); - if (!g_file_get_contents(path_sensor, &tmp, NULL, NULL)) { - g_free(path_sensor); - break; - } - - mon = g_strdup_printf("temp%d", count); - name = get_sensor_label(mon); - if (!g_str_equal(name, "ignore")) { - sensors = g_strdup_printf("%s%s=%.2f\302\260C\n", - sensors, name, - adjust_sensor(mon, atof(tmp) / 1000.0)); - } - - g_free(tmp); - g_free(name); - g_free(path_sensor); - g_free(mon); - } - - sensors = g_strconcat(sensors, "[Voltage Values]\n", NULL); - for (count = 0; ; count++) { - path_sensor = g_strdup_printf("%sin%d_input", path_hwmon, count); - if (!g_file_get_contents(path_sensor, &tmp, NULL, NULL)) { - g_free(path_sensor); - break; - } - - - mon = g_strdup_printf("in%d", count); - name = get_sensor_label(mon); - if (!g_str_equal(name, "ignore")) { - sensors = g_strdup_printf("%s%s=%.3fV\n", - sensors, name, - adjust_sensor(mon, atof(tmp) / 1000.0)); - } - - g_free(tmp); - g_free(mon); - g_free(name); - g_free(path_sensor); - } - - g_free(path_hwmon); - g_free(driver); - path_hwmon = g_strdup_printf("/sys/class/hwmon/hwmon%d/device/", ++hwmon); + tmp = g_strdup_printf("%sdriver", path_hwmon); + driver = g_file_read_link(tmp, NULL); + g_free(tmp); + + tmp = g_path_get_basename(driver); + g_free(driver); + driver = tmp; + + if (!sensor_labels) { + read_sensor_labels(driver); + } + + sensors = g_strdup_printf("%s[Driver Info]\n" + "Name=%s\n", sensors, driver); + + sensors = g_strconcat(sensors, "[Cooling Fans]\n", NULL); + for (count = 1;; count++) { + path_sensor = + g_strdup_printf("%sfan%d_input", path_hwmon, count); + if (!g_file_get_contents(path_sensor, &tmp, NULL, NULL)) { + g_free(path_sensor); + break; + } + + mon = g_strdup_printf("fan%d", count); + name = get_sensor_label(mon); + if (!g_str_equal(name, "ignore")) { + sensors = g_strdup_printf("%s%s=%.0fRPM\n", + sensors, name, + adjust_sensor(mon, atof(tmp))); + } + + g_free(name); + g_free(mon); + g_free(tmp); + g_free(path_sensor); + } + + sensors = g_strconcat(sensors, "[Temperatures]\n", NULL); + for (count = 1;; count++) { + path_sensor = + g_strdup_printf("%stemp%d_input", path_hwmon, count); + if (!g_file_get_contents(path_sensor, &tmp, NULL, NULL)) { + g_free(path_sensor); + break; + } + + mon = g_strdup_printf("temp%d", count); + name = get_sensor_label(mon); + if (!g_str_equal(name, "ignore")) { + sensors = g_strdup_printf("%s%s=%.2f\302\260C\n", + sensors, name, + adjust_sensor(mon, + atof(tmp) / + 1000.0)); + } + + g_free(tmp); + g_free(name); + g_free(path_sensor); + g_free(mon); + } + + sensors = g_strconcat(sensors, "[Voltage Values]\n", NULL); + for (count = 0;; count++) { + path_sensor = + g_strdup_printf("%sin%d_input", path_hwmon, count); + if (!g_file_get_contents(path_sensor, &tmp, NULL, NULL)) { + g_free(path_sensor); + break; + } + + + mon = g_strdup_printf("in%d", count); + name = get_sensor_label(mon); + if (!g_str_equal(name, "ignore")) { + sensors = g_strdup_printf("%s%s=%.3fV\n", + sensors, name, + adjust_sensor(mon, + atof(tmp) / + 1000.0)); + } + + g_free(tmp); + g_free(mon); + g_free(name); + g_free(path_sensor); + } + + g_free(path_hwmon); + g_free(driver); + path_hwmon = + g_strdup_printf("/sys/class/hwmon/hwmon%d/device/", ++hwmon); } - - g_free(path_hwmon); + + g_free(path_hwmon); + } +static void read_sensors_acpi(void) +{ + const gchar *path_tz = "/proc/acpi/thermal_zone"; + + if (g_file_test(path_tz, G_FILE_TEST_EXISTS)) { + GDir *tz; + + if ((tz = g_dir_open(path_tz, 0, NULL))) { + const gchar *entry; + + sensors = + g_strdup_printf("%s\n[ACPI Thermal Zone]\n", sensors); + + while ((entry = g_dir_read_name(tz))) { + gchar *path = + g_strdup_printf("%s/%s/temperature", path_tz, entry); + gchar *contents; + + if (g_file_get_contents(path, &contents, NULL, NULL)) { + int temperature; + + sscanf(contents, "temperature: %d C", &temperature); + + sensors = g_strdup_printf("%s\n%s=%d\302\260C\n", + sensors, entry, temperature); + + g_free(contents); + } + } + + g_dir_close(tz); + } + } + +} + +static void read_sensors_omnibook(void) +{ + const gchar *path_ob = "/proc/omnibook/temperature"; + gchar *contents; + + if (g_file_get_contents(path_ob, &contents, NULL, NULL)) { + int temperature; + + sscanf(contents, "CPU temperature: %d C", &temperature); + + sensors = g_strdup_printf("%s\n[Omnibook]\n" + "CPU temperature=%d\302\260C\n", + sensors, temperature); + + g_free(contents); + } +} + +static void read_sensors_hddtemp(void) +{ + Socket *s; + static gchar *old = NULL; + gchar buffer[1024]; + gint len = 0; + + if ((s = sock_connect("127.0.0.1", 7634))) { + while (!len) + len = sock_read(s, buffer, sizeof(buffer)); + sock_close(s); + + if (len > 2 && buffer[0] == '|' && buffer[1] == '/') { + gchar **disks; + int i; + + if (old) + g_free(old); + + old = g_strdup("[Hard Disk Temperature]\n"); + + disks = g_strsplit(buffer, "\n", 0); + for (i = 0; disks[i]; i++) { + gchar **fields = g_strsplit(disks[i] + 1, "|", 5); + + /* + * 0 -> /dev/hda + * 1 -> FUJITSU MHV2080AH + * 2 -> 41 + * 3 -> C + */ + old = g_strdup_printf("%s\n" + "%s (%s)=%s\302\260%s\n", + old, + fields[1], fields[0], + fields[2], fields[3]); + + g_strfreev(fields); + } + + g_strfreev(disks); + } + } else { + g_free(old); + old = NULL; + } + + if (old) { + sensors = g_strconcat(sensors, "\n", old, NULL); + } +} + +static void __scan_sensors(void) +{ + if (sensors) + g_free(sensors); + + sensors = g_strdup(""); + + read_sensors_hwmon(); + read_sensors_acpi(); + read_sensors_omnibook(); + read_sensors_hddtemp(); + + /* FIXME: Add support for ibm acpi and more sensors */ +} diff --git a/arch/linux/common/storage.h b/arch/linux/common/storage.h index 4fb682a9..836ba7ea 100644 --- a/arch/linux/common/storage.h +++ b/arch/linux/common/storage.h @@ -22,8 +22,6 @@ static gboolean remove_scsi_devices(gpointer key, gpointer value, gpointer data) { if (!strncmp((gchar *) key, "SCSI", 4)) { - g_free((gchar *) key); - g_free((GtkTreeIter *) value); return TRUE; } return FALSE; @@ -31,7 +29,7 @@ remove_scsi_devices(gpointer key, gpointer value, gpointer data) /* SCSI support by Pascal F.Martin <pascalmartin@earthlink.net> */ void -scan_scsi(void) +__scan_scsi_devices(void) { FILE *proc_scsi; gchar buffer[256], *buf; @@ -43,7 +41,7 @@ scan_scsi(void) gchar *vendor = NULL, *revision = NULL, *model = NULL; /* remove old devices from global device table */ - g_hash_table_foreach_remove(devices, remove_scsi_devices, NULL); + g_hash_table_foreach_remove(moreinfo, remove_scsi_devices, NULL); if (!g_file_test("/proc/scsi/scsi", G_FILE_TEST_EXISTS)) return; @@ -107,7 +105,7 @@ scan_scsi(void) int i; for (i = 0; type2icon[i].type != NULL; i++) - if (!strcmp(buf + 8, type2icon[i].type)) + if (g_str_equal(buf + 8, type2icon[i].type)) break; type = type2icon[i].label; @@ -120,6 +118,7 @@ scan_scsi(void) gchar *strhash = g_strdup_printf("[Device Information]\n" "Model=%s\n" + "Vendor=%s (%s)\n" "Type=%s\n" "Revision=%s\n" "[SCSI Controller]\n" @@ -127,13 +126,15 @@ scan_scsi(void) "Channel=%d\n" "ID=%d\n" "LUN=%d\n", model, + vendor_get_name(model), + vendor_get_url(model), type, revision, scsi_controller, scsi_channel, scsi_id, scsi_lun); - g_hash_table_insert(devices, devid, strhash); + g_hash_table_insert(moreinfo, devid, strhash); g_free(model); g_free(revision); @@ -147,25 +148,22 @@ static gboolean remove_ide_devices(gpointer key, gpointer value, gpointer data) { if (!strncmp((gchar *) key, "IDE", 3)) { - g_free((gchar *) key); - g_free((gchar *) value); - return TRUE; } return FALSE; } - void -scan_ide(void) +__scan_ide_devices(void) { FILE *proc_ide; gchar *device, iface, *model, *media, *pgeometry = NULL, *lgeometry = NULL; - gint n = 0, i = 0, cache; + gint n = 0, i = 0, cache, nn = 0; + gchar *capab = NULL, *speed = NULL, *driver = NULL; /* remove old devices from global device table */ - g_hash_table_foreach_remove(devices, remove_ide_devices, NULL); + g_hash_table_foreach_remove(moreinfo, remove_ide_devices, NULL); storage_list = g_strdup_printf("%s\n[IDE Disks]\n", storage_list); @@ -173,12 +171,12 @@ scan_ide(void) for (i = 0; i <= 16; i++) { device = g_strdup_printf("/proc/ide/hd%c/model", iface); if (g_file_test(device, G_FILE_TEST_EXISTS)) { - gchar buf[64]; + gchar buf[128]; cache = 0; proc_ide = fopen(device, "r"); - fgets(buf, 64, proc_ide); + fgets(buf, 128, proc_ide); fclose(proc_ide); buf[strlen(buf) - 1] = 0; @@ -189,11 +187,67 @@ scan_ide(void) device = g_strdup_printf("/proc/ide/hd%c/media", iface); proc_ide = fopen(device, "r"); - fgets(buf, 64, proc_ide); + fgets(buf, 128, proc_ide); fclose(proc_ide); buf[strlen(buf) - 1] = 0; media = g_strdup(buf); + if (g_str_equal(media, "cdrom")) { + /* obtain cd-rom drive information from cdrecord */ + GTimer *timer; + gchar *tmp = g_strdup_printf("cdrecord dev=/dev/hd%c -prcap 2>/dev/stdout", iface); + FILE *prcap; + + if ((prcap = popen(tmp, "r"))) { + /* we need a timeout so cdrecord does not try to get information on cd drives + with inserted media, which is not possible currently. half second should be + enough. */ + timer = g_timer_new(); + g_timer_start(timer); + + while (fgets(buf, 128, prcap) && g_timer_elapsed(timer, NULL) < 0.5) { + if (g_str_has_prefix(buf, " Does")) { + if (g_str_has_suffix(buf, "media\n") && !strstr(buf, "speed")) { + gchar *media_type = g_strstrip(strstr(buf, "Does ")); + gchar **ttmp = g_strsplit(media_type, " ", 0); + + capab = g_strdup_printf("%s\nCan %s#%d=%s\n", + capab ? capab : "", + ttmp[1], ++nn, ttmp[2]); + + g_strfreev(ttmp); + } else if (strstr(buf, "Buffer-Underrun-Free")) { + capab = g_strdup_printf("%s\nSupports BurnProof=%s\n", + capab ? capab : "", + strstr(buf, "Does not") ? "No" : "Yes"); + } else if (strstr(buf, "multi-session")) { + capab = g_strdup_printf("%s\nCan read multi-session CDs=%s\n", + capab ? capab : "", + strstr(buf, "Does not") ? "No" : "Yes"); + } else if (strstr(buf, "audio CDs")) { + capab = g_strdup_printf("%s\nCan play audio CDs=%s\n", + capab ? capab : "", + strstr(buf, "Does not") ? "No" : "Yes"); + } else if (strstr(buf, "PREVENT/ALLOW")) { + capab = g_strdup_printf("%s\nCan lock media=%s\n", + capab ? capab : "", + strstr(buf, "Does not") ? "No" : "Yes"); + } + } else if ((strstr(buf, "read") || strstr(buf, "write")) && strstr(buf, "kB/s")) { + speed = g_strconcat(speed ? speed : "", + strreplace(g_strstrip(buf), ":", '='), + "\n", NULL); + } else if (strstr(buf, "Device seems to be")) { + driver = g_strdup_printf("Driver=%s\n", strchr(buf, ':') + 1); + } + } + + pclose(prcap); + g_timer_destroy(timer); + } + + g_free(tmp); + } g_free(device); @@ -242,24 +296,53 @@ scan_ide(void) gchar *strhash = g_strdup_printf("[Device Information]\n" "Model=%s\n" + "Vendor=%s (%s)\n" "Device Name=hd%c\n" - "Media=%s\n" "Cache=%dkb\n", - model, iface, media, cache); - if (pgeometry && lgeometry) + "Media=%s\n" + "Cache=%dkb\n", + model, + vendor_get_name(model), + vendor_get_url(model), + iface, + media, + cache); + if (driver) { + strhash = g_strdup_printf("%s%s\n", strhash, driver); + + g_free(driver); + driver = NULL; + } + + if (pgeometry && lgeometry) { strhash = g_strdup_printf("%s[Geometry]\n" "Physical=%s\n" "Logical=%s\n", strhash, pgeometry, lgeometry); + + g_free(pgeometry); + pgeometry = NULL; + g_free(lgeometry); + lgeometry = NULL; + } + + if (capab) { + strhash = g_strdup_printf("%s[Capabilities]\n%s", strhash, capab); + + g_free(capab); + capab = NULL; + } - g_hash_table_insert(devices, devid, strhash); + if (speed) { + strhash = g_strdup_printf("%s[Speeds]\n%s", strhash, speed); + + g_free(speed); + speed = NULL; + } + + g_hash_table_insert(moreinfo, devid, strhash); g_free(model); model = ""; - - g_free(pgeometry); - pgeometry = NULL; - g_free(lgeometry); - lgeometry = NULL; } else g_free(device); diff --git a/arch/linux/common/uptime.h b/arch/linux/common/uptime.h index cf339bf3..9225c85c 100644 --- a/arch/linux/common/uptime.h +++ b/arch/linux/common/uptime.h @@ -50,7 +50,6 @@ computer_get_formatted_uptime() /* FIXME: Use ngettext */ #define plural(x) ((x > 1) ? "s" : "") - if (ui->days < 1) { if (ui->hours < 1) { tmp = diff --git a/arch/linux/common/usb.h b/arch/linux/common/usb.h index a52be2cb..d59f5f01 100644 --- a/arch/linux/common/usb.h +++ b/arch/linux/common/usb.h @@ -20,11 +20,6 @@ static gboolean remove_usb_devices(gpointer key, gpointer value, gpointer data) { if (!strncmp((gchar *) key, "USB", 3)) { - GtkTreeIter *iter = (GtkTreeIter *) data; - - g_free((gchar *) value); - g_free(iter); - return TRUE; } return FALSE; @@ -32,7 +27,7 @@ remove_usb_devices(gpointer key, gpointer value, gpointer data) static gchar *usb_list = NULL; void -scan_usb(void) +__scan_usb(void) { FILE *dev; gchar buffer[128]; @@ -47,7 +42,7 @@ scan_usb(void) return; if (usb_list) { - g_hash_table_foreach_remove(devices, remove_usb_devices, NULL); + g_hash_table_foreach_remove(moreinfo, remove_usb_devices, NULL); g_free(usb_list); } usb_list = g_strdup(""); @@ -100,6 +95,13 @@ scan_usb(void) usb_list = g_strdup_printf("%s$%s$%s=\n", usb_list, tmp, product); + const gchar *url = vendor_get_url(manuf); + if (url) { + gchar *tmp = g_strdup_printf("%s (%s)", manuf, url); + g_free(manuf); + manuf = tmp; + } + gchar *strhash = g_strdup_printf("[Device Information]\n" "Product=%s\n" "Manufacturer=%s\n" @@ -118,7 +120,7 @@ scan_usb(void) ver, rev, classid, vendor, prodid, bus, level); - g_hash_table_insert(devices, tmp, strhash); + g_hash_table_insert(moreinfo, tmp, strhash); } g_free(manuf); diff --git a/arch/linux/ia64/alsa.h b/arch/linux/ia64/alsa.h new file mode 120000 index 00000000..ede8a364 --- /dev/null +++ b/arch/linux/ia64/alsa.h @@ -0,0 +1 @@ +../../../arch/linux/common/alsa.h
\ No newline at end of file diff --git a/arch/linux/ia64/boots.h b/arch/linux/ia64/boots.h new file mode 120000 index 00000000..97384500 --- /dev/null +++ b/arch/linux/ia64/boots.h @@ -0,0 +1 @@ +../../../arch/linux/common/boots.h
\ No newline at end of file diff --git a/arch/linux/ia64/devmemory.h b/arch/linux/ia64/devmemory.h new file mode 120000 index 00000000..f8a833e7 --- /dev/null +++ b/arch/linux/ia64/devmemory.h @@ -0,0 +1 @@ +../../../arch/linux/common/devmemory.h
\ No newline at end of file diff --git a/arch/linux/ia64/filesystem.h b/arch/linux/ia64/filesystem.h new file mode 120000 index 00000000..d884bcd0 --- /dev/null +++ b/arch/linux/ia64/filesystem.h @@ -0,0 +1 @@ +../../../arch/linux/common/filesystem.h
\ No newline at end of file diff --git a/arch/linux/ia64/inputdevices.h b/arch/linux/ia64/inputdevices.h new file mode 120000 index 00000000..0f594231 --- /dev/null +++ b/arch/linux/ia64/inputdevices.h @@ -0,0 +1 @@ +../../../arch/linux/common/inputdevices.h
\ No newline at end of file diff --git a/arch/linux/ia64/loadavg.h b/arch/linux/ia64/loadavg.h new file mode 120000 index 00000000..1f64e107 --- /dev/null +++ b/arch/linux/ia64/loadavg.h @@ -0,0 +1 @@ +../../../arch/linux/common/loadavg.h
\ No newline at end of file diff --git a/arch/linux/ia64/memory.h b/arch/linux/ia64/memory.h new file mode 120000 index 00000000..64c6e0ed --- /dev/null +++ b/arch/linux/ia64/memory.h @@ -0,0 +1 @@ +../../../arch/linux/common/memory.h
\ No newline at end of file diff --git a/arch/linux/ia64/modules.h b/arch/linux/ia64/modules.h new file mode 120000 index 00000000..d21c9a20 --- /dev/null +++ b/arch/linux/ia64/modules.h @@ -0,0 +1 @@ +../../../arch/linux/common/modules.h
\ No newline at end of file diff --git a/arch/linux/ia64/net.h b/arch/linux/ia64/net.h new file mode 120000 index 00000000..488b5ae3 --- /dev/null +++ b/arch/linux/ia64/net.h @@ -0,0 +1 @@ +../../../arch/linux/common/net.h
\ No newline at end of file diff --git a/arch/linux/ia64/nfs.h b/arch/linux/ia64/nfs.h new file mode 120000 index 00000000..73e0b8c9 --- /dev/null +++ b/arch/linux/ia64/nfs.h @@ -0,0 +1 @@ +../../../arch/linux/common/nfs.h
\ No newline at end of file diff --git a/arch/linux/ia64/os.h b/arch/linux/ia64/os.h new file mode 120000 index 00000000..44051626 --- /dev/null +++ b/arch/linux/ia64/os.h @@ -0,0 +1 @@ +../../../arch/linux/common/os.h
\ No newline at end of file diff --git a/arch/linux/ia64/pci.h b/arch/linux/ia64/pci.h new file mode 120000 index 00000000..8df04a0e --- /dev/null +++ b/arch/linux/ia64/pci.h @@ -0,0 +1 @@ +../../../arch/linux/common/pci.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/processor.h.svn-base b/arch/linux/ia64/processor.h index 8be922f9..bc1d7f08 100644 --- a/arch/linux/mips/.svn/text-base/processor.h.svn-base +++ b/arch/linux/ia64/processor.h @@ -16,8 +16,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static Processor * -computer_get_processor(void) +struct _Processor { + gchar *model_name; + gchar *vendor_id; + gfloat bogomips; + gchar *strmodel; +}; + +static GSList * +__scan_processors(void) { Processor *processor; FILE *cpuinfo; @@ -35,36 +42,39 @@ computer_get_processor(void) tmp[0] = g_strstrip(tmp[0]); tmp[1] = g_strstrip(tmp[1]); - get_str("system type", processor->model_name); - get_str("cpu model", processor->vendor_id); - get_float("cpu MHz", processor->cpu_mhz); + get_str("vendor", processor->model_name); + get_str("arch", processor->vendor_id); + get_str("family", processor->strmodel); get_float("BogoMIPS", processor->bogomips); + } g_strfreev(tmp); } - + fclose(cpuinfo); - return processor; + return g_slist_append(NULL, processor); } static gchar * -processor_get_info(Processor *processor) +processor_get_info(GSList *processors) { + Processor *processor = (Processor *)processors->data; + return g_strdup_printf("[Processor]\n" - "System Type=%s\n" - "CPU Model=%s\n" - "Frequency=%.2fMHz\n" - "BogoMIPS=%.2f\n" - "Byte Order=%s\n", + "Model=%s\n" + "Architecture=%s\n" + "Family=%sMHz\n" + "BogoMIPS=%s\n" + "Byte Order=%s\n", processor->model_name, processor->vendor_id, - processor->cpu_mhz, + processor->strmodel, processor->bogomips, #if G_BYTE_ORDER == G_LITTLE_ENDIAN "Little Endian" #else "Big Endian" #endif - ); + ); } diff --git a/arch/linux/ia64/samba.h b/arch/linux/ia64/samba.h new file mode 120000 index 00000000..ebab9b11 --- /dev/null +++ b/arch/linux/ia64/samba.h @@ -0,0 +1 @@ +../../../arch/linux/common/samba.h
\ No newline at end of file diff --git a/arch/linux/ia64/sensors.h b/arch/linux/ia64/sensors.h new file mode 120000 index 00000000..3b799377 --- /dev/null +++ b/arch/linux/ia64/sensors.h @@ -0,0 +1 @@ +../../../arch/linux/common/sensors.h
\ No newline at end of file diff --git a/arch/linux/ia64/storage.h b/arch/linux/ia64/storage.h new file mode 120000 index 00000000..3ea886ce --- /dev/null +++ b/arch/linux/ia64/storage.h @@ -0,0 +1 @@ +../../../arch/linux/common/storage.h
\ No newline at end of file diff --git a/arch/linux/ia64/uptime.h b/arch/linux/ia64/uptime.h new file mode 120000 index 00000000..a5bac980 --- /dev/null +++ b/arch/linux/ia64/uptime.h @@ -0,0 +1 @@ +../../../arch/linux/common/uptime.h
\ No newline at end of file diff --git a/arch/linux/ia64/usb.h b/arch/linux/ia64/usb.h new file mode 120000 index 00000000..aee3046c --- /dev/null +++ b/arch/linux/ia64/usb.h @@ -0,0 +1 @@ +../../../arch/linux/common/usb.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/README.txt b/arch/linux/m68k/.svn/README.txt deleted file mode 100644 index 271a8ce9..00000000 --- a/arch/linux/m68k/.svn/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a Subversion working copy administrative directory. -Visit http://subversion.tigris.org/ for more information. diff --git a/arch/linux/m68k/.svn/empty-file b/arch/linux/m68k/.svn/empty-file deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/m68k/.svn/empty-file +++ /dev/null diff --git a/arch/linux/m68k/.svn/entries b/arch/linux/m68k/.svn/entries deleted file mode 100644 index 878516e0..00000000 --- a/arch/linux/m68k/.svn/entries +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<wc-entries - xmlns="svn:"> -<entry - committed-rev="4" - name="" - committed-date="2006-01-31T23:35:06.244169Z" - url="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo/trunk/hardinfo2/arch/linux/m68k" - last-author="lafp" - kind="dir" - uuid="03931a0e-0c0b-0410-87e6-c9e79dddb921" - repos="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo" - revision="9"/> -<entry - committed-rev="4" - name="usb.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="0ed17ec7082ecf81bc512f4d2add7bec" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="sensors.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="ba83966be8f142e8f9fbed44bfc77b7a" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="inputdevices.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="1307b7aff245fa7fba84aa91f08d27fc" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:22.000000Z"/> -<entry - committed-rev="4" - name="uptime.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="760f1adef4fbcec7d74200abc3a4f6eb" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:22.000000Z"/> -<entry - committed-rev="4" - name="storage.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="602ef4aa9053cd983170660f53334cef" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:22.000000Z"/> -<entry - committed-rev="4" - name="modules.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="45dfbaaabb31981ac06e021773429228" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:22.000000Z"/> -<entry - committed-rev="4" - name="memory.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="765f1eed8d98b9bbb06c4c034ce9fa32" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:22.000000Z"/> -<entry - committed-rev="4" - name="pci.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="cab1a2936974aed489c107f3643b3484" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="loadavg.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="1c83a008e883018ff1092781358ec2da" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="processor.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="b0be8780283e94e9eb694153c9b19d8a" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="alsa.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="dc249687377b2de88793ee09bf54f1f1" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="os.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="048c3f4b338d765be4f10b5067d8b50e" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:22.000000Z"/> -<entry - committed-rev="4" - name="samba.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="b541109072721d735717a33724ce9127" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:22.000000Z"/> -<entry - committed-rev="4" - name="filesystem.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="7f23b37be4cf5009414843bfe5c4e450" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:22.000000Z"/> -<entry - committed-rev="4" - name="net.h" - text-time="2006-05-20T14:29:22.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="22e5b201692010dee02e9562ce6cba1b" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:22.000000Z"/> -<entry - committed-rev="13" - name="nfs.h" - text-time="2006-05-22T12:07:13.000000Z" - committed-date="2006-05-22T12:11:05.185078Z" - checksum="382976a6eab28131079a346dd16edcd7" - last-author="lafp" - kind="file" - prop-time="2006-05-22T12:07:36.000000Z" - revision="13"/> -</wc-entries> diff --git a/arch/linux/m68k/.svn/format b/arch/linux/m68k/.svn/format deleted file mode 100644 index b8626c4c..00000000 --- a/arch/linux/m68k/.svn/format +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/arch/linux/m68k/.svn/prop-base/alsa.h.svn-base b/arch/linux/m68k/.svn/prop-base/alsa.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/alsa.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/filesystem.h.svn-base b/arch/linux/m68k/.svn/prop-base/filesystem.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/filesystem.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/inputdevices.h.svn-base b/arch/linux/m68k/.svn/prop-base/inputdevices.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/inputdevices.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/loadavg.h.svn-base b/arch/linux/m68k/.svn/prop-base/loadavg.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/loadavg.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/memory.h.svn-base b/arch/linux/m68k/.svn/prop-base/memory.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/memory.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/modules.h.svn-base b/arch/linux/m68k/.svn/prop-base/modules.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/modules.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/net.h.svn-base b/arch/linux/m68k/.svn/prop-base/net.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/net.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/nfs.h.svn-base b/arch/linux/m68k/.svn/prop-base/nfs.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/nfs.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/os.h.svn-base b/arch/linux/m68k/.svn/prop-base/os.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/os.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/pci.h.svn-base b/arch/linux/m68k/.svn/prop-base/pci.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/pci.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/processor.h.svn-base b/arch/linux/m68k/.svn/prop-base/processor.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/m68k/.svn/prop-base/processor.h.svn-base +++ /dev/null diff --git a/arch/linux/m68k/.svn/prop-base/samba.h.svn-base b/arch/linux/m68k/.svn/prop-base/samba.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/samba.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/sensors.h.svn-base b/arch/linux/m68k/.svn/prop-base/sensors.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/sensors.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/storage.h.svn-base b/arch/linux/m68k/.svn/prop-base/storage.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/storage.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/uptime.h.svn-base b/arch/linux/m68k/.svn/prop-base/uptime.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/uptime.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/prop-base/usb.h.svn-base b/arch/linux/m68k/.svn/prop-base/usb.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/prop-base/usb.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/alsa.h.svn-work b/arch/linux/m68k/.svn/props/alsa.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/alsa.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/filesystem.h.svn-work b/arch/linux/m68k/.svn/props/filesystem.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/filesystem.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/inputdevices.h.svn-work b/arch/linux/m68k/.svn/props/inputdevices.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/inputdevices.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/loadavg.h.svn-work b/arch/linux/m68k/.svn/props/loadavg.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/loadavg.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/memory.h.svn-work b/arch/linux/m68k/.svn/props/memory.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/memory.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/modules.h.svn-work b/arch/linux/m68k/.svn/props/modules.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/modules.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/net.h.svn-work b/arch/linux/m68k/.svn/props/net.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/net.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/nfs.h.svn-work b/arch/linux/m68k/.svn/props/nfs.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/nfs.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/os.h.svn-work b/arch/linux/m68k/.svn/props/os.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/os.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/pci.h.svn-work b/arch/linux/m68k/.svn/props/pci.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/pci.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/processor.h.svn-work b/arch/linux/m68k/.svn/props/processor.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/m68k/.svn/props/processor.h.svn-work +++ /dev/null diff --git a/arch/linux/m68k/.svn/props/samba.h.svn-work b/arch/linux/m68k/.svn/props/samba.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/samba.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/sensors.h.svn-work b/arch/linux/m68k/.svn/props/sensors.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/sensors.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/storage.h.svn-work b/arch/linux/m68k/.svn/props/storage.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/storage.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/uptime.h.svn-work b/arch/linux/m68k/.svn/props/uptime.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/uptime.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/props/usb.h.svn-work b/arch/linux/m68k/.svn/props/usb.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/m68k/.svn/props/usb.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/m68k/.svn/text-base/alsa.h.svn-base b/arch/linux/m68k/.svn/text-base/alsa.h.svn-base deleted file mode 100644 index e17b92c3..00000000 --- a/arch/linux/m68k/.svn/text-base/alsa.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/alsa.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/filesystem.h.svn-base b/arch/linux/m68k/.svn/text-base/filesystem.h.svn-base deleted file mode 100644 index 0d23c803..00000000 --- a/arch/linux/m68k/.svn/text-base/filesystem.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/filesystem.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/inputdevices.h.svn-base b/arch/linux/m68k/.svn/text-base/inputdevices.h.svn-base deleted file mode 100644 index 58695156..00000000 --- a/arch/linux/m68k/.svn/text-base/inputdevices.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/inputdevices.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/loadavg.h.svn-base b/arch/linux/m68k/.svn/text-base/loadavg.h.svn-base deleted file mode 100644 index 354f872f..00000000 --- a/arch/linux/m68k/.svn/text-base/loadavg.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/loadavg.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/memory.h.svn-base b/arch/linux/m68k/.svn/text-base/memory.h.svn-base deleted file mode 100644 index 2b2ad528..00000000 --- a/arch/linux/m68k/.svn/text-base/memory.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/memory.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/modules.h.svn-base b/arch/linux/m68k/.svn/text-base/modules.h.svn-base deleted file mode 100644 index d80f7d7a..00000000 --- a/arch/linux/m68k/.svn/text-base/modules.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/modules.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/net.h.svn-base b/arch/linux/m68k/.svn/text-base/net.h.svn-base deleted file mode 100644 index 2b4ac97a..00000000 --- a/arch/linux/m68k/.svn/text-base/net.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/net.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/nfs.h.svn-base b/arch/linux/m68k/.svn/text-base/nfs.h.svn-base deleted file mode 100644 index c10bd829..00000000 --- a/arch/linux/m68k/.svn/text-base/nfs.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/nfs.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/os.h.svn-base b/arch/linux/m68k/.svn/text-base/os.h.svn-base deleted file mode 100644 index 49613b1f..00000000 --- a/arch/linux/m68k/.svn/text-base/os.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/os.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/pci.h.svn-base b/arch/linux/m68k/.svn/text-base/pci.h.svn-base deleted file mode 100644 index 2386d2ad..00000000 --- a/arch/linux/m68k/.svn/text-base/pci.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/pci.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/samba.h.svn-base b/arch/linux/m68k/.svn/text-base/samba.h.svn-base deleted file mode 100644 index 246e9ed0..00000000 --- a/arch/linux/m68k/.svn/text-base/samba.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/samba.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/sensors.h.svn-base b/arch/linux/m68k/.svn/text-base/sensors.h.svn-base deleted file mode 100644 index 822de7b7..00000000 --- a/arch/linux/m68k/.svn/text-base/sensors.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/sensors.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/storage.h.svn-base b/arch/linux/m68k/.svn/text-base/storage.h.svn-base deleted file mode 100644 index 24568f89..00000000 --- a/arch/linux/m68k/.svn/text-base/storage.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/storage.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/uptime.h.svn-base b/arch/linux/m68k/.svn/text-base/uptime.h.svn-base deleted file mode 100644 index 25cc41e9..00000000 --- a/arch/linux/m68k/.svn/text-base/uptime.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/uptime.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/usb.h.svn-base b/arch/linux/m68k/.svn/text-base/usb.h.svn-base deleted file mode 100644 index 8aece87f..00000000 --- a/arch/linux/m68k/.svn/text-base/usb.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/usb.h
\ No newline at end of file diff --git a/arch/linux/m68k/battery.h b/arch/linux/m68k/battery.h new file mode 120000 index 00000000..e4c794f2 --- /dev/null +++ b/arch/linux/m68k/battery.h @@ -0,0 +1 @@ +../../linux/common/battery.h
\ No newline at end of file diff --git a/arch/linux/m68k/boots.h b/arch/linux/m68k/boots.h new file mode 120000 index 00000000..97384500 --- /dev/null +++ b/arch/linux/m68k/boots.h @@ -0,0 +1 @@ +../../../arch/linux/common/boots.h
\ No newline at end of file diff --git a/arch/linux/m68k/devmemory.h b/arch/linux/m68k/devmemory.h new file mode 120000 index 00000000..f8a833e7 --- /dev/null +++ b/arch/linux/m68k/devmemory.h @@ -0,0 +1 @@ +../../../arch/linux/common/devmemory.h
\ No newline at end of file diff --git a/arch/linux/m68k/processor.h b/arch/linux/m68k/processor.h index 0a1bab62..0fb59d24 100644 --- a/arch/linux/m68k/processor.h +++ b/arch/linux/m68k/processor.h @@ -16,8 +16,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static Processor * -computer_get_processor(void) +struct _Processor { + gchar *model_name; + gfloat bogomips, cpu_mhz; + + gchar *has_fpu; +}; + +static GSList * +__scan_processors(void) { Processor *processor; FILE *cpuinfo; @@ -51,12 +58,14 @@ computer_get_processor(void) fclose(cpuinfo); - return processor; + return g_slist_append(NULL, processor); } static gchar * -processor_get_info(Processor *processor) +processor_get_info(GSList *processors) { + Processor *processor = (Processor *)processors->data; + return g_strdup_printf("[Processor]\n" "Name=%s\n" "Frequency=%.2fMHz\n" diff --git a/arch/linux/mips/.svn/README.txt b/arch/linux/mips/.svn/README.txt deleted file mode 100644 index 271a8ce9..00000000 --- a/arch/linux/mips/.svn/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a Subversion working copy administrative directory. -Visit http://subversion.tigris.org/ for more information. diff --git a/arch/linux/mips/.svn/empty-file b/arch/linux/mips/.svn/empty-file deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/mips/.svn/empty-file +++ /dev/null diff --git a/arch/linux/mips/.svn/entries b/arch/linux/mips/.svn/entries deleted file mode 100644 index ff41e403..00000000 --- a/arch/linux/mips/.svn/entries +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<wc-entries - xmlns="svn:"> -<entry - committed-rev="4" - name="" - committed-date="2006-01-31T23:35:06.244169Z" - url="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo/trunk/hardinfo2/arch/linux/mips" - last-author="lafp" - kind="dir" - uuid="03931a0e-0c0b-0410-87e6-c9e79dddb921" - repos="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo" - revision="9"/> -<entry - committed-rev="4" - name="usb.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="0ed17ec7082ecf81bc512f4d2add7bec" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:25.000000Z"/> -<entry - committed-rev="4" - name="sensors.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="ba83966be8f142e8f9fbed44bfc77b7a" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:25.000000Z"/> -<entry - committed-rev="4" - name="inputdevices.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="1307b7aff245fa7fba84aa91f08d27fc" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="uptime.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="760f1adef4fbcec7d74200abc3a4f6eb" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="storage.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="602ef4aa9053cd983170660f53334cef" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="modules.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="45dfbaaabb31981ac06e021773429228" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="memory.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="765f1eed8d98b9bbb06c4c034ce9fa32" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="pci.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="cab1a2936974aed489c107f3643b3484" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:25.000000Z"/> -<entry - committed-rev="4" - name="loadavg.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="1c83a008e883018ff1092781358ec2da" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:25.000000Z"/> -<entry - committed-rev="4" - name="processor.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="2cfddc7b7aa4eb98ba1b6cfa30b03f28" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="alsa.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="dc249687377b2de88793ee09bf54f1f1" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="os.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="048c3f4b338d765be4f10b5067d8b50e" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="samba.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="b541109072721d735717a33724ce9127" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="filesystem.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="7f23b37be4cf5009414843bfe5c4e450" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="net.h" - text-time="2006-05-20T14:29:27.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="22e5b201692010dee02e9562ce6cba1b" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="13" - name="nfs.h" - text-time="2006-05-22T12:07:16.000000Z" - committed-date="2006-05-22T12:11:05.185078Z" - checksum="382976a6eab28131079a346dd16edcd7" - last-author="lafp" - kind="file" - prop-time="2006-05-22T12:07:36.000000Z" - revision="13"/> -</wc-entries> diff --git a/arch/linux/mips/.svn/format b/arch/linux/mips/.svn/format deleted file mode 100644 index b8626c4c..00000000 --- a/arch/linux/mips/.svn/format +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/arch/linux/mips/.svn/prop-base/alsa.h.svn-base b/arch/linux/mips/.svn/prop-base/alsa.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/alsa.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/filesystem.h.svn-base b/arch/linux/mips/.svn/prop-base/filesystem.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/filesystem.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/inputdevices.h.svn-base b/arch/linux/mips/.svn/prop-base/inputdevices.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/inputdevices.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/loadavg.h.svn-base b/arch/linux/mips/.svn/prop-base/loadavg.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/loadavg.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/memory.h.svn-base b/arch/linux/mips/.svn/prop-base/memory.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/memory.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/modules.h.svn-base b/arch/linux/mips/.svn/prop-base/modules.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/modules.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/net.h.svn-base b/arch/linux/mips/.svn/prop-base/net.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/net.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/nfs.h.svn-base b/arch/linux/mips/.svn/prop-base/nfs.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/nfs.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/os.h.svn-base b/arch/linux/mips/.svn/prop-base/os.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/os.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/pci.h.svn-base b/arch/linux/mips/.svn/prop-base/pci.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/pci.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/processor.h.svn-base b/arch/linux/mips/.svn/prop-base/processor.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/mips/.svn/prop-base/processor.h.svn-base +++ /dev/null diff --git a/arch/linux/mips/.svn/prop-base/samba.h.svn-base b/arch/linux/mips/.svn/prop-base/samba.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/samba.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/sensors.h.svn-base b/arch/linux/mips/.svn/prop-base/sensors.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/sensors.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/storage.h.svn-base b/arch/linux/mips/.svn/prop-base/storage.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/storage.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/uptime.h.svn-base b/arch/linux/mips/.svn/prop-base/uptime.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/uptime.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/prop-base/usb.h.svn-base b/arch/linux/mips/.svn/prop-base/usb.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/prop-base/usb.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/alsa.h.svn-work b/arch/linux/mips/.svn/props/alsa.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/alsa.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/filesystem.h.svn-work b/arch/linux/mips/.svn/props/filesystem.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/filesystem.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/inputdevices.h.svn-work b/arch/linux/mips/.svn/props/inputdevices.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/inputdevices.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/loadavg.h.svn-work b/arch/linux/mips/.svn/props/loadavg.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/loadavg.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/memory.h.svn-work b/arch/linux/mips/.svn/props/memory.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/memory.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/modules.h.svn-work b/arch/linux/mips/.svn/props/modules.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/modules.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/net.h.svn-work b/arch/linux/mips/.svn/props/net.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/net.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/nfs.h.svn-work b/arch/linux/mips/.svn/props/nfs.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/nfs.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/os.h.svn-work b/arch/linux/mips/.svn/props/os.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/os.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/pci.h.svn-work b/arch/linux/mips/.svn/props/pci.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/pci.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/processor.h.svn-work b/arch/linux/mips/.svn/props/processor.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/mips/.svn/props/processor.h.svn-work +++ /dev/null diff --git a/arch/linux/mips/.svn/props/samba.h.svn-work b/arch/linux/mips/.svn/props/samba.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/samba.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/sensors.h.svn-work b/arch/linux/mips/.svn/props/sensors.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/sensors.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/storage.h.svn-work b/arch/linux/mips/.svn/props/storage.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/storage.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/uptime.h.svn-work b/arch/linux/mips/.svn/props/uptime.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/uptime.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/props/usb.h.svn-work b/arch/linux/mips/.svn/props/usb.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/mips/.svn/props/usb.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/mips/.svn/text-base/alsa.h.svn-base b/arch/linux/mips/.svn/text-base/alsa.h.svn-base deleted file mode 100644 index e17b92c3..00000000 --- a/arch/linux/mips/.svn/text-base/alsa.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/alsa.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/filesystem.h.svn-base b/arch/linux/mips/.svn/text-base/filesystem.h.svn-base deleted file mode 100644 index 0d23c803..00000000 --- a/arch/linux/mips/.svn/text-base/filesystem.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/filesystem.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/inputdevices.h.svn-base b/arch/linux/mips/.svn/text-base/inputdevices.h.svn-base deleted file mode 100644 index 58695156..00000000 --- a/arch/linux/mips/.svn/text-base/inputdevices.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/inputdevices.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/loadavg.h.svn-base b/arch/linux/mips/.svn/text-base/loadavg.h.svn-base deleted file mode 100644 index 354f872f..00000000 --- a/arch/linux/mips/.svn/text-base/loadavg.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/loadavg.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/memory.h.svn-base b/arch/linux/mips/.svn/text-base/memory.h.svn-base deleted file mode 100644 index 2b2ad528..00000000 --- a/arch/linux/mips/.svn/text-base/memory.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/memory.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/modules.h.svn-base b/arch/linux/mips/.svn/text-base/modules.h.svn-base deleted file mode 100644 index d80f7d7a..00000000 --- a/arch/linux/mips/.svn/text-base/modules.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/modules.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/net.h.svn-base b/arch/linux/mips/.svn/text-base/net.h.svn-base deleted file mode 100644 index 2b4ac97a..00000000 --- a/arch/linux/mips/.svn/text-base/net.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/net.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/nfs.h.svn-base b/arch/linux/mips/.svn/text-base/nfs.h.svn-base deleted file mode 100644 index c10bd829..00000000 --- a/arch/linux/mips/.svn/text-base/nfs.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/nfs.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/os.h.svn-base b/arch/linux/mips/.svn/text-base/os.h.svn-base deleted file mode 100644 index 49613b1f..00000000 --- a/arch/linux/mips/.svn/text-base/os.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/os.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/pci.h.svn-base b/arch/linux/mips/.svn/text-base/pci.h.svn-base deleted file mode 100644 index 2386d2ad..00000000 --- a/arch/linux/mips/.svn/text-base/pci.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/pci.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/samba.h.svn-base b/arch/linux/mips/.svn/text-base/samba.h.svn-base deleted file mode 100644 index 246e9ed0..00000000 --- a/arch/linux/mips/.svn/text-base/samba.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/samba.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/sensors.h.svn-base b/arch/linux/mips/.svn/text-base/sensors.h.svn-base deleted file mode 100644 index 822de7b7..00000000 --- a/arch/linux/mips/.svn/text-base/sensors.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/sensors.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/storage.h.svn-base b/arch/linux/mips/.svn/text-base/storage.h.svn-base deleted file mode 100644 index 24568f89..00000000 --- a/arch/linux/mips/.svn/text-base/storage.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/storage.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/uptime.h.svn-base b/arch/linux/mips/.svn/text-base/uptime.h.svn-base deleted file mode 100644 index 25cc41e9..00000000 --- a/arch/linux/mips/.svn/text-base/uptime.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/uptime.h
\ No newline at end of file diff --git a/arch/linux/mips/.svn/text-base/usb.h.svn-base b/arch/linux/mips/.svn/text-base/usb.h.svn-base deleted file mode 100644 index 8aece87f..00000000 --- a/arch/linux/mips/.svn/text-base/usb.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/usb.h
\ No newline at end of file diff --git a/arch/linux/mips/battery.h b/arch/linux/mips/battery.h new file mode 120000 index 00000000..e4c794f2 --- /dev/null +++ b/arch/linux/mips/battery.h @@ -0,0 +1 @@ +../../linux/common/battery.h
\ No newline at end of file diff --git a/arch/linux/mips/boots.h b/arch/linux/mips/boots.h new file mode 120000 index 00000000..97384500 --- /dev/null +++ b/arch/linux/mips/boots.h @@ -0,0 +1 @@ +../../../arch/linux/common/boots.h
\ No newline at end of file diff --git a/arch/linux/mips/devmemory.h b/arch/linux/mips/devmemory.h new file mode 120000 index 00000000..f8a833e7 --- /dev/null +++ b/arch/linux/mips/devmemory.h @@ -0,0 +1 @@ +../../../arch/linux/common/devmemory.h
\ No newline at end of file diff --git a/arch/linux/mips/processor.h b/arch/linux/mips/processor.h index 8be922f9..1aa7794d 100644 --- a/arch/linux/mips/processor.h +++ b/arch/linux/mips/processor.h @@ -16,8 +16,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static Processor * -computer_get_processor(void) +struct _Processor { + gchar *model_name; + gchar *vendor_id; + gfloat bogomips, cpu_mhz; +}; + +static GSList * +__scan_processors(void) { Processor *processor; FILE *cpuinfo; @@ -45,12 +51,14 @@ computer_get_processor(void) fclose(cpuinfo); - return processor; + return g_slist_append(NULL, processor); } static gchar * -processor_get_info(Processor *processor) +processor_get_info(GSList *processors) { + Processor *processor = (Processor *)processors->data; + return g_strdup_printf("[Processor]\n" "System Type=%s\n" "CPU Model=%s\n" diff --git a/arch/linux/parisc/.svn/README.txt b/arch/linux/parisc/.svn/README.txt deleted file mode 100644 index 271a8ce9..00000000 --- a/arch/linux/parisc/.svn/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a Subversion working copy administrative directory. -Visit http://subversion.tigris.org/ for more information. diff --git a/arch/linux/parisc/.svn/empty-file b/arch/linux/parisc/.svn/empty-file deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/parisc/.svn/empty-file +++ /dev/null diff --git a/arch/linux/parisc/.svn/entries b/arch/linux/parisc/.svn/entries deleted file mode 100644 index 3d021fea..00000000 --- a/arch/linux/parisc/.svn/entries +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<wc-entries - xmlns="svn:"> -<entry - committed-rev="4" - name="" - committed-date="2006-01-31T23:35:06.244169Z" - url="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo/trunk/hardinfo2/arch/linux/parisc" - last-author="lafp" - kind="dir" - uuid="03931a0e-0c0b-0410-87e6-c9e79dddb921" - repos="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo" - revision="9"/> -<entry - committed-rev="4" - name="usb.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="0ed17ec7082ecf81bc512f4d2add7bec" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:18.000000Z"/> -<entry - committed-rev="4" - name="sensors.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="ba83966be8f142e8f9fbed44bfc77b7a" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:18.000000Z"/> -<entry - committed-rev="4" - name="inputdevices.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="1307b7aff245fa7fba84aa91f08d27fc" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:18.000000Z"/> -<entry - committed-rev="4" - name="uptime.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="760f1adef4fbcec7d74200abc3a4f6eb" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:19.000000Z"/> -<entry - committed-rev="4" - name="storage.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="602ef4aa9053cd983170660f53334cef" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:19.000000Z"/> -<entry - committed-rev="4" - name="modules.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="45dfbaaabb31981ac06e021773429228" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:19.000000Z"/> -<entry - committed-rev="4" - name="memory.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="765f1eed8d98b9bbb06c4c034ce9fa32" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:19.000000Z"/> -<entry - committed-rev="4" - name="pci.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="cab1a2936974aed489c107f3643b3484" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:18.000000Z"/> -<entry - committed-rev="4" - name="loadavg.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="1c83a008e883018ff1092781358ec2da" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:18.000000Z"/> -<entry - committed-rev="4" - name="processor.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="81c73d87c453b53e5016fcb0a627665c" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:18.000000Z"/> -<entry - committed-rev="4" - name="alsa.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="dc249687377b2de88793ee09bf54f1f1" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:18.000000Z"/> -<entry - committed-rev="4" - name="os.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="048c3f4b338d765be4f10b5067d8b50e" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:18.000000Z"/> -<entry - committed-rev="4" - name="samba.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="b541109072721d735717a33724ce9127" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:19.000000Z"/> -<entry - committed-rev="4" - name="filesystem.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="7f23b37be4cf5009414843bfe5c4e450" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:19.000000Z"/> -<entry - committed-rev="4" - name="net.h" - text-time="2006-05-20T14:29:19.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="22e5b201692010dee02e9562ce6cba1b" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:19.000000Z"/> -<entry - committed-rev="13" - name="nfs.h" - text-time="2006-05-22T12:07:19.000000Z" - committed-date="2006-05-22T12:11:05.185078Z" - checksum="382976a6eab28131079a346dd16edcd7" - last-author="lafp" - kind="file" - prop-time="2006-05-22T12:07:36.000000Z" - revision="13"/> -</wc-entries> diff --git a/arch/linux/parisc/.svn/format b/arch/linux/parisc/.svn/format deleted file mode 100644 index b8626c4c..00000000 --- a/arch/linux/parisc/.svn/format +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/arch/linux/parisc/.svn/prop-base/alsa.h.svn-base b/arch/linux/parisc/.svn/prop-base/alsa.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/alsa.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/filesystem.h.svn-base b/arch/linux/parisc/.svn/prop-base/filesystem.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/filesystem.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/inputdevices.h.svn-base b/arch/linux/parisc/.svn/prop-base/inputdevices.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/inputdevices.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/loadavg.h.svn-base b/arch/linux/parisc/.svn/prop-base/loadavg.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/loadavg.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/memory.h.svn-base b/arch/linux/parisc/.svn/prop-base/memory.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/memory.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/modules.h.svn-base b/arch/linux/parisc/.svn/prop-base/modules.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/modules.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/net.h.svn-base b/arch/linux/parisc/.svn/prop-base/net.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/net.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/nfs.h.svn-base b/arch/linux/parisc/.svn/prop-base/nfs.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/nfs.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/os.h.svn-base b/arch/linux/parisc/.svn/prop-base/os.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/os.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/pci.h.svn-base b/arch/linux/parisc/.svn/prop-base/pci.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/pci.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/processor.h.svn-base b/arch/linux/parisc/.svn/prop-base/processor.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/parisc/.svn/prop-base/processor.h.svn-base +++ /dev/null diff --git a/arch/linux/parisc/.svn/prop-base/samba.h.svn-base b/arch/linux/parisc/.svn/prop-base/samba.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/samba.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/sensors.h.svn-base b/arch/linux/parisc/.svn/prop-base/sensors.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/sensors.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/storage.h.svn-base b/arch/linux/parisc/.svn/prop-base/storage.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/storage.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/uptime.h.svn-base b/arch/linux/parisc/.svn/prop-base/uptime.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/uptime.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/prop-base/usb.h.svn-base b/arch/linux/parisc/.svn/prop-base/usb.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/prop-base/usb.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/alsa.h.svn-work b/arch/linux/parisc/.svn/props/alsa.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/alsa.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/filesystem.h.svn-work b/arch/linux/parisc/.svn/props/filesystem.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/filesystem.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/inputdevices.h.svn-work b/arch/linux/parisc/.svn/props/inputdevices.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/inputdevices.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/loadavg.h.svn-work b/arch/linux/parisc/.svn/props/loadavg.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/loadavg.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/memory.h.svn-work b/arch/linux/parisc/.svn/props/memory.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/memory.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/modules.h.svn-work b/arch/linux/parisc/.svn/props/modules.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/modules.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/net.h.svn-work b/arch/linux/parisc/.svn/props/net.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/net.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/nfs.h.svn-work b/arch/linux/parisc/.svn/props/nfs.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/nfs.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/os.h.svn-work b/arch/linux/parisc/.svn/props/os.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/os.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/pci.h.svn-work b/arch/linux/parisc/.svn/props/pci.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/pci.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/processor.h.svn-work b/arch/linux/parisc/.svn/props/processor.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/parisc/.svn/props/processor.h.svn-work +++ /dev/null diff --git a/arch/linux/parisc/.svn/props/samba.h.svn-work b/arch/linux/parisc/.svn/props/samba.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/samba.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/sensors.h.svn-work b/arch/linux/parisc/.svn/props/sensors.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/sensors.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/storage.h.svn-work b/arch/linux/parisc/.svn/props/storage.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/storage.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/uptime.h.svn-work b/arch/linux/parisc/.svn/props/uptime.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/uptime.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/props/usb.h.svn-work b/arch/linux/parisc/.svn/props/usb.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/parisc/.svn/props/usb.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/parisc/.svn/text-base/alsa.h.svn-base b/arch/linux/parisc/.svn/text-base/alsa.h.svn-base deleted file mode 100644 index e17b92c3..00000000 --- a/arch/linux/parisc/.svn/text-base/alsa.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/alsa.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/filesystem.h.svn-base b/arch/linux/parisc/.svn/text-base/filesystem.h.svn-base deleted file mode 100644 index 0d23c803..00000000 --- a/arch/linux/parisc/.svn/text-base/filesystem.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/filesystem.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/inputdevices.h.svn-base b/arch/linux/parisc/.svn/text-base/inputdevices.h.svn-base deleted file mode 100644 index 58695156..00000000 --- a/arch/linux/parisc/.svn/text-base/inputdevices.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/inputdevices.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/loadavg.h.svn-base b/arch/linux/parisc/.svn/text-base/loadavg.h.svn-base deleted file mode 100644 index 354f872f..00000000 --- a/arch/linux/parisc/.svn/text-base/loadavg.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/loadavg.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/memory.h.svn-base b/arch/linux/parisc/.svn/text-base/memory.h.svn-base deleted file mode 100644 index 2b2ad528..00000000 --- a/arch/linux/parisc/.svn/text-base/memory.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/memory.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/modules.h.svn-base b/arch/linux/parisc/.svn/text-base/modules.h.svn-base deleted file mode 100644 index d80f7d7a..00000000 --- a/arch/linux/parisc/.svn/text-base/modules.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/modules.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/net.h.svn-base b/arch/linux/parisc/.svn/text-base/net.h.svn-base deleted file mode 100644 index 2b4ac97a..00000000 --- a/arch/linux/parisc/.svn/text-base/net.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/net.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/nfs.h.svn-base b/arch/linux/parisc/.svn/text-base/nfs.h.svn-base deleted file mode 100644 index c10bd829..00000000 --- a/arch/linux/parisc/.svn/text-base/nfs.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/nfs.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/os.h.svn-base b/arch/linux/parisc/.svn/text-base/os.h.svn-base deleted file mode 100644 index 49613b1f..00000000 --- a/arch/linux/parisc/.svn/text-base/os.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/os.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/pci.h.svn-base b/arch/linux/parisc/.svn/text-base/pci.h.svn-base deleted file mode 100644 index 2386d2ad..00000000 --- a/arch/linux/parisc/.svn/text-base/pci.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/pci.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/processor.h.svn-base b/arch/linux/parisc/.svn/text-base/processor.h.svn-base deleted file mode 100644 index 41b628f4..00000000 --- a/arch/linux/parisc/.svn/text-base/processor.h.svn-base +++ /dev/null @@ -1,82 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static Processor * -computer_get_processor(void) -{ - Processor *processor; - FILE *cpuinfo; - gchar buffer[128]; - - cpuinfo = fopen("/proc/cpuinfo", "r"); - if (!cpuinfo) - return NULL; - - processor = g_new0(Processor, 1); - while (fgets(buffer, 128, cpuinfo)) { - gchar **tmp = g_strsplit(buffer, ":", 2); - - if (tmp[0] && tmp[1]) { - tmp[0] = g_strstrip(tmp[0]); - tmp[1] = g_strstrip(tmp[1]); - - get_str("cpu family", processor->model_name); - get_str("cpu", processor->vendor_id); - get_float("cpu MHz", processor->cpu_mhz); - get_float("bogomips", processor->bogomips); - - get_str("model name", processor->strmodel); - - get_int("I-cache", processor->has_fpu); - get_int("D-cache", processor->flags); - - } - g_strfreev(tmp); - } - - fclose(cpuinfo); - - return processor; -} - -static gchar * -processor_get_info(Processor *processor) -{ - return g_strdup_printf("[Processor]\n" - "CPU Family=%s\n" - "CPU=%s\n" - "Frequency=%.2fMHz\n" - "Bogomips=%.2f\n" - "Model Name=%s\n" - "Byte Order=%s\n" - "[Cache]\n" - "I-Cache=%s\n" - "D-Cache=%s\n", - processor->model_name, - processor->vendor_id, - processor->cpu_mhz, - processor->bogomips, - processor->strmodel, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - "Little Endian", -#else - "Big Endian", -#endif - processor->has_fpu, - processor->flags); -} diff --git a/arch/linux/parisc/.svn/text-base/samba.h.svn-base b/arch/linux/parisc/.svn/text-base/samba.h.svn-base deleted file mode 100644 index 246e9ed0..00000000 --- a/arch/linux/parisc/.svn/text-base/samba.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/samba.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/sensors.h.svn-base b/arch/linux/parisc/.svn/text-base/sensors.h.svn-base deleted file mode 100644 index 822de7b7..00000000 --- a/arch/linux/parisc/.svn/text-base/sensors.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/sensors.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/storage.h.svn-base b/arch/linux/parisc/.svn/text-base/storage.h.svn-base deleted file mode 100644 index 24568f89..00000000 --- a/arch/linux/parisc/.svn/text-base/storage.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/storage.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/uptime.h.svn-base b/arch/linux/parisc/.svn/text-base/uptime.h.svn-base deleted file mode 100644 index 25cc41e9..00000000 --- a/arch/linux/parisc/.svn/text-base/uptime.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/uptime.h
\ No newline at end of file diff --git a/arch/linux/parisc/.svn/text-base/usb.h.svn-base b/arch/linux/parisc/.svn/text-base/usb.h.svn-base deleted file mode 100644 index 8aece87f..00000000 --- a/arch/linux/parisc/.svn/text-base/usb.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/usb.h
\ No newline at end of file diff --git a/arch/linux/parisc/battery.h b/arch/linux/parisc/battery.h new file mode 120000 index 00000000..e4c794f2 --- /dev/null +++ b/arch/linux/parisc/battery.h @@ -0,0 +1 @@ +../../linux/common/battery.h
\ No newline at end of file diff --git a/arch/linux/parisc/boots.h b/arch/linux/parisc/boots.h new file mode 120000 index 00000000..97384500 --- /dev/null +++ b/arch/linux/parisc/boots.h @@ -0,0 +1 @@ +../../../arch/linux/common/boots.h
\ No newline at end of file diff --git a/arch/linux/parisc/devmemory.h b/arch/linux/parisc/devmemory.h new file mode 120000 index 00000000..f8a833e7 --- /dev/null +++ b/arch/linux/parisc/devmemory.h @@ -0,0 +1 @@ +../../../arch/linux/common/devmemory.h
\ No newline at end of file diff --git a/arch/linux/parisc/processor.h b/arch/linux/parisc/processor.h index 41b628f4..357f4d83 100644 --- a/arch/linux/parisc/processor.h +++ b/arch/linux/parisc/processor.h @@ -16,8 +16,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static Processor * -computer_get_processor(void) +struct _Processor { + gchar *model_name; + gchar *vendor_id; + gchar *flags; + gfloat bogomips, cpu_mhz; + + gchar *has_fpu; + + gchar *strmodel; +}; + +static GSList * +__scan_processors(void) { Processor *processor; FILE *cpuinfo; @@ -51,12 +62,14 @@ computer_get_processor(void) fclose(cpuinfo); - return processor; + return g_slist_append(NULL, processor); } static gchar * -processor_get_info(Processor *processor) +processor_get_info(GSList *processors) { + Processor *processor = (Processor *)processors->data; + return g_strdup_printf("[Processor]\n" "CPU Family=%s\n" "CPU=%s\n" diff --git a/arch/linux/ppc/.svn/README.txt b/arch/linux/ppc/.svn/README.txt deleted file mode 100644 index 271a8ce9..00000000 --- a/arch/linux/ppc/.svn/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a Subversion working copy administrative directory. -Visit http://subversion.tigris.org/ for more information. diff --git a/arch/linux/ppc/.svn/empty-file b/arch/linux/ppc/.svn/empty-file deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/ppc/.svn/empty-file +++ /dev/null diff --git a/arch/linux/ppc/.svn/entries b/arch/linux/ppc/.svn/entries deleted file mode 100644 index 15f4d581..00000000 --- a/arch/linux/ppc/.svn/entries +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<wc-entries - xmlns="svn:"> -<entry - committed-rev="4" - name="" - committed-date="2006-01-31T23:35:06.244169Z" - url="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo/trunk/hardinfo2/arch/linux/ppc" - last-author="lafp" - kind="dir" - uuid="03931a0e-0c0b-0410-87e6-c9e79dddb921" - repos="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo" - revision="9"/> -<entry - committed-rev="4" - name="usb.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="0ed17ec7082ecf81bc512f4d2add7bec" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:19.000000Z"/> -<entry - committed-rev="4" - name="sensors.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="ba83966be8f142e8f9fbed44bfc77b7a" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:19.000000Z"/> -<entry - committed-rev="4" - name="inputdevices.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="1307b7aff245fa7fba84aa91f08d27fc" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="uptime.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="760f1adef4fbcec7d74200abc3a4f6eb" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="storage.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="602ef4aa9053cd983170660f53334cef" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="modules.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="45dfbaaabb31981ac06e021773429228" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="memory.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="765f1eed8d98b9bbb06c4c034ce9fa32" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="pci.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="cab1a2936974aed489c107f3643b3484" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:19.000000Z"/> -<entry - committed-rev="4" - name="loadavg.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="1c83a008e883018ff1092781358ec2da" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="processor.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="dbc927e55d8803ea8a133a2b837dac06" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="alsa.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="dc249687377b2de88793ee09bf54f1f1" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="os.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="048c3f4b338d765be4f10b5067d8b50e" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="samba.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="b541109072721d735717a33724ce9127" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="filesystem.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="7f23b37be4cf5009414843bfe5c4e450" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="4" - name="net.h" - text-time="2006-05-20T14:29:20.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="22e5b201692010dee02e9562ce6cba1b" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:20.000000Z"/> -<entry - committed-rev="13" - name="nfs.h" - text-time="2006-05-22T12:07:23.000000Z" - committed-date="2006-05-22T12:11:05.185078Z" - checksum="382976a6eab28131079a346dd16edcd7" - last-author="lafp" - kind="file" - prop-time="2006-05-22T12:07:36.000000Z" - revision="13"/> -</wc-entries> diff --git a/arch/linux/ppc/.svn/format b/arch/linux/ppc/.svn/format deleted file mode 100644 index b8626c4c..00000000 --- a/arch/linux/ppc/.svn/format +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/arch/linux/ppc/.svn/prop-base/alsa.h.svn-base b/arch/linux/ppc/.svn/prop-base/alsa.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/alsa.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/filesystem.h.svn-base b/arch/linux/ppc/.svn/prop-base/filesystem.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/filesystem.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/inputdevices.h.svn-base b/arch/linux/ppc/.svn/prop-base/inputdevices.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/inputdevices.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/loadavg.h.svn-base b/arch/linux/ppc/.svn/prop-base/loadavg.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/loadavg.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/memory.h.svn-base b/arch/linux/ppc/.svn/prop-base/memory.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/memory.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/modules.h.svn-base b/arch/linux/ppc/.svn/prop-base/modules.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/modules.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/net.h.svn-base b/arch/linux/ppc/.svn/prop-base/net.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/net.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/nfs.h.svn-base b/arch/linux/ppc/.svn/prop-base/nfs.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/nfs.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/os.h.svn-base b/arch/linux/ppc/.svn/prop-base/os.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/os.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/pci.h.svn-base b/arch/linux/ppc/.svn/prop-base/pci.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/pci.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/processor.h.svn-base b/arch/linux/ppc/.svn/prop-base/processor.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/ppc/.svn/prop-base/processor.h.svn-base +++ /dev/null diff --git a/arch/linux/ppc/.svn/prop-base/samba.h.svn-base b/arch/linux/ppc/.svn/prop-base/samba.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/samba.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/sensors.h.svn-base b/arch/linux/ppc/.svn/prop-base/sensors.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/sensors.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/storage.h.svn-base b/arch/linux/ppc/.svn/prop-base/storage.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/storage.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/uptime.h.svn-base b/arch/linux/ppc/.svn/prop-base/uptime.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/uptime.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/prop-base/usb.h.svn-base b/arch/linux/ppc/.svn/prop-base/usb.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/prop-base/usb.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/alsa.h.svn-work b/arch/linux/ppc/.svn/props/alsa.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/alsa.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/filesystem.h.svn-work b/arch/linux/ppc/.svn/props/filesystem.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/filesystem.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/inputdevices.h.svn-work b/arch/linux/ppc/.svn/props/inputdevices.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/inputdevices.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/loadavg.h.svn-work b/arch/linux/ppc/.svn/props/loadavg.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/loadavg.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/memory.h.svn-work b/arch/linux/ppc/.svn/props/memory.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/memory.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/modules.h.svn-work b/arch/linux/ppc/.svn/props/modules.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/modules.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/net.h.svn-work b/arch/linux/ppc/.svn/props/net.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/net.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/nfs.h.svn-work b/arch/linux/ppc/.svn/props/nfs.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/nfs.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/os.h.svn-work b/arch/linux/ppc/.svn/props/os.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/os.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/pci.h.svn-work b/arch/linux/ppc/.svn/props/pci.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/pci.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/processor.h.svn-work b/arch/linux/ppc/.svn/props/processor.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/ppc/.svn/props/processor.h.svn-work +++ /dev/null diff --git a/arch/linux/ppc/.svn/props/samba.h.svn-work b/arch/linux/ppc/.svn/props/samba.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/samba.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/sensors.h.svn-work b/arch/linux/ppc/.svn/props/sensors.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/sensors.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/storage.h.svn-work b/arch/linux/ppc/.svn/props/storage.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/storage.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/uptime.h.svn-work b/arch/linux/ppc/.svn/props/uptime.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/uptime.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/props/usb.h.svn-work b/arch/linux/ppc/.svn/props/usb.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/ppc/.svn/props/usb.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/ppc/.svn/text-base/alsa.h.svn-base b/arch/linux/ppc/.svn/text-base/alsa.h.svn-base deleted file mode 100644 index e17b92c3..00000000 --- a/arch/linux/ppc/.svn/text-base/alsa.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/alsa.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/filesystem.h.svn-base b/arch/linux/ppc/.svn/text-base/filesystem.h.svn-base deleted file mode 100644 index 0d23c803..00000000 --- a/arch/linux/ppc/.svn/text-base/filesystem.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/filesystem.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/inputdevices.h.svn-base b/arch/linux/ppc/.svn/text-base/inputdevices.h.svn-base deleted file mode 100644 index 58695156..00000000 --- a/arch/linux/ppc/.svn/text-base/inputdevices.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/inputdevices.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/loadavg.h.svn-base b/arch/linux/ppc/.svn/text-base/loadavg.h.svn-base deleted file mode 100644 index 354f872f..00000000 --- a/arch/linux/ppc/.svn/text-base/loadavg.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/loadavg.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/memory.h.svn-base b/arch/linux/ppc/.svn/text-base/memory.h.svn-base deleted file mode 100644 index 2b2ad528..00000000 --- a/arch/linux/ppc/.svn/text-base/memory.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/memory.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/modules.h.svn-base b/arch/linux/ppc/.svn/text-base/modules.h.svn-base deleted file mode 100644 index d80f7d7a..00000000 --- a/arch/linux/ppc/.svn/text-base/modules.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/modules.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/net.h.svn-base b/arch/linux/ppc/.svn/text-base/net.h.svn-base deleted file mode 100644 index 2b4ac97a..00000000 --- a/arch/linux/ppc/.svn/text-base/net.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/net.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/nfs.h.svn-base b/arch/linux/ppc/.svn/text-base/nfs.h.svn-base deleted file mode 100644 index c10bd829..00000000 --- a/arch/linux/ppc/.svn/text-base/nfs.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/nfs.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/os.h.svn-base b/arch/linux/ppc/.svn/text-base/os.h.svn-base deleted file mode 100644 index 49613b1f..00000000 --- a/arch/linux/ppc/.svn/text-base/os.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/os.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/pci.h.svn-base b/arch/linux/ppc/.svn/text-base/pci.h.svn-base deleted file mode 100644 index 2386d2ad..00000000 --- a/arch/linux/ppc/.svn/text-base/pci.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/pci.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/samba.h.svn-base b/arch/linux/ppc/.svn/text-base/samba.h.svn-base deleted file mode 100644 index 246e9ed0..00000000 --- a/arch/linux/ppc/.svn/text-base/samba.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/samba.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/sensors.h.svn-base b/arch/linux/ppc/.svn/text-base/sensors.h.svn-base deleted file mode 100644 index 822de7b7..00000000 --- a/arch/linux/ppc/.svn/text-base/sensors.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/sensors.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/storage.h.svn-base b/arch/linux/ppc/.svn/text-base/storage.h.svn-base deleted file mode 100644 index 24568f89..00000000 --- a/arch/linux/ppc/.svn/text-base/storage.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/storage.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/uptime.h.svn-base b/arch/linux/ppc/.svn/text-base/uptime.h.svn-base deleted file mode 100644 index 25cc41e9..00000000 --- a/arch/linux/ppc/.svn/text-base/uptime.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/uptime.h
\ No newline at end of file diff --git a/arch/linux/ppc/.svn/text-base/usb.h.svn-base b/arch/linux/ppc/.svn/text-base/usb.h.svn-base deleted file mode 100644 index 8aece87f..00000000 --- a/arch/linux/ppc/.svn/text-base/usb.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/usb.h
\ No newline at end of file diff --git a/arch/linux/ppc/battery.h b/arch/linux/ppc/battery.h new file mode 120000 index 00000000..e4c794f2 --- /dev/null +++ b/arch/linux/ppc/battery.h @@ -0,0 +1 @@ +../../linux/common/battery.h
\ No newline at end of file diff --git a/arch/linux/ppc/boots.h b/arch/linux/ppc/boots.h new file mode 120000 index 00000000..97384500 --- /dev/null +++ b/arch/linux/ppc/boots.h @@ -0,0 +1 @@ +../../../arch/linux/common/boots.h
\ No newline at end of file diff --git a/arch/linux/ppc/devmemory.h b/arch/linux/ppc/devmemory.h new file mode 120000 index 00000000..f8a833e7 --- /dev/null +++ b/arch/linux/ppc/devmemory.h @@ -0,0 +1 @@ +../../../arch/linux/common/devmemory.h
\ No newline at end of file diff --git a/arch/linux/ppc/processor.h b/arch/linux/ppc/processor.h index f4ff5b0e..6aa0f4ef 100644 --- a/arch/linux/ppc/processor.h +++ b/arch/linux/ppc/processor.h @@ -16,8 +16,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static Processor * -computer_get_processor(void) +struct _Processor { + gchar *model_name; + gchar *vendor_id; + gint cache_size; + gfloat bogomips, cpu_mhz; +}; + +static GSList * +__scan_processors(void) { Processor *processor; FILE *cpuinfo; @@ -45,24 +52,28 @@ computer_get_processor(void) g_strfreev(tmp); } - gchar *tmp = g_strconcat("PowerPC ", processor->model_name, NULL); + gchar *tmp = g_strdup_printf("PowerPC %s (%.2fMHz)", + processor->model_name, + processor->cpu_mhz); g_free(processor->model_name); processor->model_name = tmp; fclose(cpuinfo); - return processor; + return g_slist_append(NULL, processor); } static gchar * -processor_get_info(Processor *processor) +processor_get_info(GSList *processors) { + Processor *processor = (Processor *)processors->data; + return g_strdup_printf("[Processor]\n" "Machine=%s\n" "CPU=%s\n" - "L2 Cache=%.2f\n" + "L2 Cache=%dkB\n" "Frequency=%.2fMHz\n" - "BogoMips=%.2f" + "BogoMips=%.2f\n" "Byte Order=%s\n", processor->vendor_id, processor->model_name, diff --git a/arch/linux/s390/alsa.h b/arch/linux/s390/alsa.h new file mode 120000 index 00000000..ede8a364 --- /dev/null +++ b/arch/linux/s390/alsa.h @@ -0,0 +1 @@ +../../../arch/linux/common/alsa.h
\ No newline at end of file diff --git a/arch/linux/s390/boots.h b/arch/linux/s390/boots.h new file mode 120000 index 00000000..97384500 --- /dev/null +++ b/arch/linux/s390/boots.h @@ -0,0 +1 @@ +../../../arch/linux/common/boots.h
\ No newline at end of file diff --git a/arch/linux/s390/devmemory.h b/arch/linux/s390/devmemory.h new file mode 120000 index 00000000..f8a833e7 --- /dev/null +++ b/arch/linux/s390/devmemory.h @@ -0,0 +1 @@ +../../../arch/linux/common/devmemory.h
\ No newline at end of file diff --git a/arch/linux/s390/filesystem.h b/arch/linux/s390/filesystem.h new file mode 120000 index 00000000..d884bcd0 --- /dev/null +++ b/arch/linux/s390/filesystem.h @@ -0,0 +1 @@ +../../../arch/linux/common/filesystem.h
\ No newline at end of file diff --git a/arch/linux/s390/inputdevices.h b/arch/linux/s390/inputdevices.h new file mode 120000 index 00000000..0f594231 --- /dev/null +++ b/arch/linux/s390/inputdevices.h @@ -0,0 +1 @@ +../../../arch/linux/common/inputdevices.h
\ No newline at end of file diff --git a/arch/linux/s390/loadavg.h b/arch/linux/s390/loadavg.h new file mode 120000 index 00000000..1f64e107 --- /dev/null +++ b/arch/linux/s390/loadavg.h @@ -0,0 +1 @@ +../../../arch/linux/common/loadavg.h
\ No newline at end of file diff --git a/arch/linux/s390/memory.h b/arch/linux/s390/memory.h new file mode 120000 index 00000000..64c6e0ed --- /dev/null +++ b/arch/linux/s390/memory.h @@ -0,0 +1 @@ +../../../arch/linux/common/memory.h
\ No newline at end of file diff --git a/arch/linux/s390/modules.h b/arch/linux/s390/modules.h new file mode 120000 index 00000000..d21c9a20 --- /dev/null +++ b/arch/linux/s390/modules.h @@ -0,0 +1 @@ +../../../arch/linux/common/modules.h
\ No newline at end of file diff --git a/arch/linux/s390/net.h b/arch/linux/s390/net.h new file mode 120000 index 00000000..488b5ae3 --- /dev/null +++ b/arch/linux/s390/net.h @@ -0,0 +1 @@ +../../../arch/linux/common/net.h
\ No newline at end of file diff --git a/arch/linux/s390/nfs.h b/arch/linux/s390/nfs.h new file mode 120000 index 00000000..73e0b8c9 --- /dev/null +++ b/arch/linux/s390/nfs.h @@ -0,0 +1 @@ +../../../arch/linux/common/nfs.h
\ No newline at end of file diff --git a/arch/linux/s390/os.h b/arch/linux/s390/os.h new file mode 120000 index 00000000..44051626 --- /dev/null +++ b/arch/linux/s390/os.h @@ -0,0 +1 @@ +../../../arch/linux/common/os.h
\ No newline at end of file diff --git a/arch/linux/s390/pci.h b/arch/linux/s390/pci.h new file mode 120000 index 00000000..8df04a0e --- /dev/null +++ b/arch/linux/s390/pci.h @@ -0,0 +1 @@ +../../../arch/linux/common/pci.h
\ No newline at end of file diff --git a/arch/linux/m68k/.svn/text-base/processor.h.svn-base b/arch/linux/s390/processor.h index 0a1bab62..ee72b029 100644 --- a/arch/linux/m68k/.svn/text-base/processor.h.svn-base +++ b/arch/linux/s390/processor.h @@ -16,8 +16,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static Processor * -computer_get_processor(void) +struct _Processor { + gchar *vendor_id, *model_name; + gint cache_size; + gfloat bogomips; +}; + +static GSList * +__scan_processors(void) { Processor *processor; FILE *cpuinfo; @@ -35,40 +41,39 @@ computer_get_processor(void) tmp[0] = g_strstrip(tmp[0]); tmp[1] = g_strstrip(tmp[1]); - get_str("CPU", processor->model_name); - get_float("Clocking", processor->cpu_mhz); - get_float("bogomips", processor->bogomips); + get_str("vendor_id", processor->vendor_id); + get_float("# processors", processor->cache_size); + get_int("bogomips per cpu", processor->bogomips); - get_str("FPU", processor->has_fpu); } g_strfreev(tmp); } - gchar *tmp; - tmp = g_strconcat("Motorola ", processor->model_name, NULL); - g_free(processor->model_name); - processor->model_name = tmp; - + processor->model_name = g_strconcat("S390 ", processor->vendor_id, NULL); + g_free(processor->vendor_id); + fclose(cpuinfo); - return processor; + return g_slist_append(NULL, processor); } static gchar * -processor_get_info(Processor *processor) +processor_get_info(GSList *processors) { + Processor *processor = (Processor *)processors->data; + return g_strdup_printf("[Processor]\n" - "Name=%s\n" - "Frequency=%.2fMHz\n" - "BogoMips=%.2f\n" - "Byte Order=%s\n", + "Model=%s\n" + "Processors=%d\n" + "BogoMips per CPU=%.2f" + "Byte Order=%s\n", processor->model_name, - processor->cpu_mhz, + processor->cache_size, processor->bogomips, #if G_BYTE_ORDER == G_LITTLE_ENDIAN "Little Endian" #else "Big Endian" #endif - ); + ); } diff --git a/arch/linux/s390/samba.h b/arch/linux/s390/samba.h new file mode 120000 index 00000000..ebab9b11 --- /dev/null +++ b/arch/linux/s390/samba.h @@ -0,0 +1 @@ +../../../arch/linux/common/samba.h
\ No newline at end of file diff --git a/arch/linux/s390/sensors.h b/arch/linux/s390/sensors.h new file mode 120000 index 00000000..3b799377 --- /dev/null +++ b/arch/linux/s390/sensors.h @@ -0,0 +1 @@ +../../../arch/linux/common/sensors.h
\ No newline at end of file diff --git a/arch/linux/s390/storage.h b/arch/linux/s390/storage.h new file mode 120000 index 00000000..3ea886ce --- /dev/null +++ b/arch/linux/s390/storage.h @@ -0,0 +1 @@ +../../../arch/linux/common/storage.h
\ No newline at end of file diff --git a/arch/linux/s390/uptime.h b/arch/linux/s390/uptime.h new file mode 120000 index 00000000..a5bac980 --- /dev/null +++ b/arch/linux/s390/uptime.h @@ -0,0 +1 @@ +../../../arch/linux/common/uptime.h
\ No newline at end of file diff --git a/arch/linux/s390/usb.h b/arch/linux/s390/usb.h new file mode 120000 index 00000000..aee3046c --- /dev/null +++ b/arch/linux/s390/usb.h @@ -0,0 +1 @@ +../../../arch/linux/common/usb.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/README.txt b/arch/linux/sparc/.svn/README.txt deleted file mode 100644 index 271a8ce9..00000000 --- a/arch/linux/sparc/.svn/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a Subversion working copy administrative directory. -Visit http://subversion.tigris.org/ for more information. diff --git a/arch/linux/sparc/.svn/empty-file b/arch/linux/sparc/.svn/empty-file deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/sparc/.svn/empty-file +++ /dev/null diff --git a/arch/linux/sparc/.svn/entries b/arch/linux/sparc/.svn/entries deleted file mode 100644 index d52d0e04..00000000 --- a/arch/linux/sparc/.svn/entries +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<wc-entries - xmlns="svn:"> -<entry - committed-rev="4" - name="" - committed-date="2006-01-31T23:35:06.244169Z" - url="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo/trunk/hardinfo2/arch/linux/sparc" - last-author="lafp" - kind="dir" - uuid="03931a0e-0c0b-0410-87e6-c9e79dddb921" - repos="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo" - revision="9"/> -<entry - committed-rev="4" - name="usb.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="0ed17ec7082ecf81bc512f4d2add7bec" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="sensors.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="ba83966be8f142e8f9fbed44bfc77b7a" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="inputdevices.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="1307b7aff245fa7fba84aa91f08d27fc" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z"/> -<entry - committed-rev="4" - name="uptime.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="760f1adef4fbcec7d74200abc3a4f6eb" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z"/> -<entry - committed-rev="4" - name="storage.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="602ef4aa9053cd983170660f53334cef" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z"/> -<entry - committed-rev="4" - name="modules.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="45dfbaaabb31981ac06e021773429228" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z"/> -<entry - committed-rev="4" - name="memory.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="765f1eed8d98b9bbb06c4c034ce9fa32" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z"/> -<entry - committed-rev="4" - name="pci.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="cab1a2936974aed489c107f3643b3484" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="loadavg.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="1c83a008e883018ff1092781358ec2da" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="processor.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="0e4fd7cef17e29f7ec00899e4ecef751" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="alsa.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="dc249687377b2de88793ee09bf54f1f1" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="os.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="048c3f4b338d765be4f10b5067d8b50e" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:27.000000Z"/> -<entry - committed-rev="4" - name="samba.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="b541109072721d735717a33724ce9127" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z"/> -<entry - committed-rev="4" - name="filesystem.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="7f23b37be4cf5009414843bfe5c4e450" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z"/> -<entry - committed-rev="4" - name="net.h" - text-time="2006-05-20T14:29:28.000000Z" - committed-date="2006-01-31T23:35:06.244169Z" - checksum="22e5b201692010dee02e9562ce6cba1b" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:28.000000Z"/> -<entry - committed-rev="13" - name="nfs.h" - text-time="2006-05-22T12:07:28.000000Z" - committed-date="2006-05-22T12:11:05.185078Z" - checksum="382976a6eab28131079a346dd16edcd7" - last-author="lafp" - kind="file" - prop-time="2006-05-22T12:07:36.000000Z" - revision="13"/> -</wc-entries> diff --git a/arch/linux/sparc/.svn/format b/arch/linux/sparc/.svn/format deleted file mode 100644 index b8626c4c..00000000 --- a/arch/linux/sparc/.svn/format +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/arch/linux/sparc/.svn/prop-base/alsa.h.svn-base b/arch/linux/sparc/.svn/prop-base/alsa.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/alsa.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/filesystem.h.svn-base b/arch/linux/sparc/.svn/prop-base/filesystem.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/filesystem.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/inputdevices.h.svn-base b/arch/linux/sparc/.svn/prop-base/inputdevices.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/inputdevices.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/loadavg.h.svn-base b/arch/linux/sparc/.svn/prop-base/loadavg.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/loadavg.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/memory.h.svn-base b/arch/linux/sparc/.svn/prop-base/memory.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/memory.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/modules.h.svn-base b/arch/linux/sparc/.svn/prop-base/modules.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/modules.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/net.h.svn-base b/arch/linux/sparc/.svn/prop-base/net.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/net.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/nfs.h.svn-base b/arch/linux/sparc/.svn/prop-base/nfs.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/nfs.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/os.h.svn-base b/arch/linux/sparc/.svn/prop-base/os.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/os.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/pci.h.svn-base b/arch/linux/sparc/.svn/prop-base/pci.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/pci.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/processor.h.svn-base b/arch/linux/sparc/.svn/prop-base/processor.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/sparc/.svn/prop-base/processor.h.svn-base +++ /dev/null diff --git a/arch/linux/sparc/.svn/prop-base/samba.h.svn-base b/arch/linux/sparc/.svn/prop-base/samba.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/samba.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/sensors.h.svn-base b/arch/linux/sparc/.svn/prop-base/sensors.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/sensors.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/storage.h.svn-base b/arch/linux/sparc/.svn/prop-base/storage.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/storage.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/uptime.h.svn-base b/arch/linux/sparc/.svn/prop-base/uptime.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/uptime.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/prop-base/usb.h.svn-base b/arch/linux/sparc/.svn/prop-base/usb.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/prop-base/usb.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/alsa.h.svn-work b/arch/linux/sparc/.svn/props/alsa.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/alsa.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/filesystem.h.svn-work b/arch/linux/sparc/.svn/props/filesystem.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/filesystem.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/inputdevices.h.svn-work b/arch/linux/sparc/.svn/props/inputdevices.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/inputdevices.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/loadavg.h.svn-work b/arch/linux/sparc/.svn/props/loadavg.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/loadavg.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/memory.h.svn-work b/arch/linux/sparc/.svn/props/memory.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/memory.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/modules.h.svn-work b/arch/linux/sparc/.svn/props/modules.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/modules.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/net.h.svn-work b/arch/linux/sparc/.svn/props/net.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/net.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/nfs.h.svn-work b/arch/linux/sparc/.svn/props/nfs.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/nfs.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/os.h.svn-work b/arch/linux/sparc/.svn/props/os.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/os.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/pci.h.svn-work b/arch/linux/sparc/.svn/props/pci.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/pci.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/processor.h.svn-work b/arch/linux/sparc/.svn/props/processor.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/sparc/.svn/props/processor.h.svn-work +++ /dev/null diff --git a/arch/linux/sparc/.svn/props/samba.h.svn-work b/arch/linux/sparc/.svn/props/samba.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/samba.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/sensors.h.svn-work b/arch/linux/sparc/.svn/props/sensors.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/sensors.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/storage.h.svn-work b/arch/linux/sparc/.svn/props/storage.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/storage.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/uptime.h.svn-work b/arch/linux/sparc/.svn/props/uptime.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/uptime.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/props/usb.h.svn-work b/arch/linux/sparc/.svn/props/usb.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/sparc/.svn/props/usb.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/sparc/.svn/text-base/alsa.h.svn-base b/arch/linux/sparc/.svn/text-base/alsa.h.svn-base deleted file mode 100644 index e17b92c3..00000000 --- a/arch/linux/sparc/.svn/text-base/alsa.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/alsa.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/filesystem.h.svn-base b/arch/linux/sparc/.svn/text-base/filesystem.h.svn-base deleted file mode 100644 index 0d23c803..00000000 --- a/arch/linux/sparc/.svn/text-base/filesystem.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/filesystem.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/inputdevices.h.svn-base b/arch/linux/sparc/.svn/text-base/inputdevices.h.svn-base deleted file mode 100644 index 58695156..00000000 --- a/arch/linux/sparc/.svn/text-base/inputdevices.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/inputdevices.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/loadavg.h.svn-base b/arch/linux/sparc/.svn/text-base/loadavg.h.svn-base deleted file mode 100644 index 354f872f..00000000 --- a/arch/linux/sparc/.svn/text-base/loadavg.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/loadavg.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/memory.h.svn-base b/arch/linux/sparc/.svn/text-base/memory.h.svn-base deleted file mode 100644 index 2b2ad528..00000000 --- a/arch/linux/sparc/.svn/text-base/memory.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/memory.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/modules.h.svn-base b/arch/linux/sparc/.svn/text-base/modules.h.svn-base deleted file mode 100644 index d80f7d7a..00000000 --- a/arch/linux/sparc/.svn/text-base/modules.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/modules.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/net.h.svn-base b/arch/linux/sparc/.svn/text-base/net.h.svn-base deleted file mode 100644 index 2b4ac97a..00000000 --- a/arch/linux/sparc/.svn/text-base/net.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/net.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/nfs.h.svn-base b/arch/linux/sparc/.svn/text-base/nfs.h.svn-base deleted file mode 100644 index c10bd829..00000000 --- a/arch/linux/sparc/.svn/text-base/nfs.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/nfs.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/os.h.svn-base b/arch/linux/sparc/.svn/text-base/os.h.svn-base deleted file mode 100644 index 49613b1f..00000000 --- a/arch/linux/sparc/.svn/text-base/os.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/os.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/pci.h.svn-base b/arch/linux/sparc/.svn/text-base/pci.h.svn-base deleted file mode 100644 index 2386d2ad..00000000 --- a/arch/linux/sparc/.svn/text-base/pci.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/pci.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/processor.h.svn-base b/arch/linux/sparc/.svn/text-base/processor.h.svn-base deleted file mode 100644 index 211ea56b..00000000 --- a/arch/linux/sparc/.svn/text-base/processor.h.svn-base +++ /dev/null @@ -1,59 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -static Processor * -computer_get_processor(void) -{ - Processor *processor; - FILE *cpuinfo; - gchar buffer[128]; - - cpuinfo = fopen("/proc/cpuinfo", "r"); - if (!cpuinfo) - return NULL; - - processor = g_new0(Processor, 1); - while (fgets(buffer, 128, cpuinfo)) { - gchar **tmp = g_strsplit(buffer, ":", 2); - - if (tmp[0] && tmp[1]) { - tmp[0] = g_strstrip(tmp[0]); - tmp[1] = g_strstrip(tmp[1]); - - get_str("cpu", processor->model_name); - get_str("fpu", processor->has_fpu); - } - g_strfreev(tmp); - } - - get_processor_strfamily(processor); - - fclose(cpuinfo); - - return processor; -} - -static gchar * -processor_get_info(Processor *processor) -{ - return g_strdup_printf("[Processor]\n" - "CPU=%s\n" - "FPU=%s\n", - processor->model_name, - processor->has_fpu); -} diff --git a/arch/linux/sparc/.svn/text-base/samba.h.svn-base b/arch/linux/sparc/.svn/text-base/samba.h.svn-base deleted file mode 100644 index 246e9ed0..00000000 --- a/arch/linux/sparc/.svn/text-base/samba.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/samba.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/sensors.h.svn-base b/arch/linux/sparc/.svn/text-base/sensors.h.svn-base deleted file mode 100644 index 822de7b7..00000000 --- a/arch/linux/sparc/.svn/text-base/sensors.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/sensors.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/storage.h.svn-base b/arch/linux/sparc/.svn/text-base/storage.h.svn-base deleted file mode 100644 index 24568f89..00000000 --- a/arch/linux/sparc/.svn/text-base/storage.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/storage.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/uptime.h.svn-base b/arch/linux/sparc/.svn/text-base/uptime.h.svn-base deleted file mode 100644 index 25cc41e9..00000000 --- a/arch/linux/sparc/.svn/text-base/uptime.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/uptime.h
\ No newline at end of file diff --git a/arch/linux/sparc/.svn/text-base/usb.h.svn-base b/arch/linux/sparc/.svn/text-base/usb.h.svn-base deleted file mode 100644 index 8aece87f..00000000 --- a/arch/linux/sparc/.svn/text-base/usb.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/usb.h
\ No newline at end of file diff --git a/arch/linux/sparc/battery.h b/arch/linux/sparc/battery.h new file mode 120000 index 00000000..e4c794f2 --- /dev/null +++ b/arch/linux/sparc/battery.h @@ -0,0 +1 @@ +../../linux/common/battery.h
\ No newline at end of file diff --git a/arch/linux/sparc/boots.h b/arch/linux/sparc/boots.h new file mode 120000 index 00000000..97384500 --- /dev/null +++ b/arch/linux/sparc/boots.h @@ -0,0 +1 @@ +../../../arch/linux/common/boots.h
\ No newline at end of file diff --git a/arch/linux/sparc/devmemory.h b/arch/linux/sparc/devmemory.h new file mode 120000 index 00000000..f8a833e7 --- /dev/null +++ b/arch/linux/sparc/devmemory.h @@ -0,0 +1 @@ +../../../arch/linux/common/devmemory.h
\ No newline at end of file diff --git a/arch/linux/sparc/processor.h b/arch/linux/sparc/processor.h index 211ea56b..04e38c33 100644 --- a/arch/linux/sparc/processor.h +++ b/arch/linux/sparc/processor.h @@ -16,8 +16,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -static Processor * -computer_get_processor(void) +struct _Processor { + gchar *model_name; + gchar *has_fpu; +}; + +static GSList * +__scan_processors(void) { Processor *processor; FILE *cpuinfo; @@ -41,16 +46,16 @@ computer_get_processor(void) g_strfreev(tmp); } - get_processor_strfamily(processor); - fclose(cpuinfo); - return processor; + return g_slist_append(NULL, processor); } static gchar * -processor_get_info(Processor *processor) +processor_get_info(GSList *processors) { + Processor *processor = (Processor *)processors->data; + return g_strdup_printf("[Processor]\n" "CPU=%s\n" "FPU=%s\n", diff --git a/arch/linux/x86/.svn/README.txt b/arch/linux/x86/.svn/README.txt deleted file mode 100644 index 271a8ce9..00000000 --- a/arch/linux/x86/.svn/README.txt +++ /dev/null @@ -1,2 +0,0 @@ -This is a Subversion working copy administrative directory. -Visit http://subversion.tigris.org/ for more information. diff --git a/arch/linux/x86/.svn/empty-file b/arch/linux/x86/.svn/empty-file deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/x86/.svn/empty-file +++ /dev/null diff --git a/arch/linux/x86/.svn/entries b/arch/linux/x86/.svn/entries deleted file mode 100644 index 098b3a34..00000000 --- a/arch/linux/x86/.svn/entries +++ /dev/null @@ -1,160 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<wc-entries - xmlns="svn:"> -<entry - committed-rev="4" - name="" - committed-date="2006-01-31T23:35:06.244169Z" - url="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo/trunk/hardinfo2/arch/linux/x86" - last-author="lafp" - kind="dir" - uuid="03931a0e-0c0b-0410-87e6-c9e79dddb921" - repos="svn+ssh://lafp@svn.berlios.de/svnroot/repos/hardinfo" - revision="9"/> -<entry - committed-rev="1" - name="usb.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="0ed17ec7082ecf81bc512f4d2add7bec" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="1" - name="sensors.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="ba83966be8f142e8f9fbed44bfc77b7a" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="1" - name="inputdevices.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="1307b7aff245fa7fba84aa91f08d27fc" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="1" - name="uptime.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="760f1adef4fbcec7d74200abc3a4f6eb" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="1" - name="storage.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="602ef4aa9053cd983170660f53334cef" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="1" - name="memory.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="765f1eed8d98b9bbb06c4c034ce9fa32" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="1" - name="modules.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="45dfbaaabb31981ac06e021773429228" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="1" - name="pci.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="cab1a2936974aed489c107f3643b3484" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="1" - name="loadavg.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="1c83a008e883018ff1092781358ec2da" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="18" - name="processor.h" - text-time="2006-06-15T14:36:55.000000Z" - committed-date="2006-06-16T14:09:52.687901Z" - checksum="d9e2705aa2ed9d80913de5d5b4a025b0" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z" - revision="18"/> -<entry - committed-rev="1" - name="alsa.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="dc249687377b2de88793ee09bf54f1f1" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="1" - name="os.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="048c3f4b338d765be4f10b5067d8b50e" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="1" - name="samba.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="b541109072721d735717a33724ce9127" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="1" - name="filesystem.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-23T22:38:33.949992Z" - checksum="7f23b37be4cf5009414843bfe5c4e450" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="3" - name="net.h" - text-time="2006-05-20T14:29:23.000000Z" - committed-date="2006-01-26T19:39:15.288417Z" - checksum="22e5b201692010dee02e9562ce6cba1b" - last-author="lafp" - kind="file" - prop-time="2006-05-20T14:29:23.000000Z"/> -<entry - committed-rev="13" - name="nfs.h" - text-time="2006-05-22T12:06:58.000000Z" - committed-date="2006-05-22T12:11:05.185078Z" - checksum="382976a6eab28131079a346dd16edcd7" - last-author="lafp" - kind="file" - prop-time="2006-05-22T12:07:36.000000Z" - revision="13"/> -</wc-entries> diff --git a/arch/linux/x86/.svn/format b/arch/linux/x86/.svn/format deleted file mode 100644 index b8626c4c..00000000 --- a/arch/linux/x86/.svn/format +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/arch/linux/x86/.svn/prop-base/alsa.h.svn-base b/arch/linux/x86/.svn/prop-base/alsa.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/alsa.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/filesystem.h.svn-base b/arch/linux/x86/.svn/prop-base/filesystem.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/filesystem.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/inputdevices.h.svn-base b/arch/linux/x86/.svn/prop-base/inputdevices.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/inputdevices.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/loadavg.h.svn-base b/arch/linux/x86/.svn/prop-base/loadavg.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/loadavg.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/memory.h.svn-base b/arch/linux/x86/.svn/prop-base/memory.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/memory.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/modules.h.svn-base b/arch/linux/x86/.svn/prop-base/modules.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/modules.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/net.h.svn-base b/arch/linux/x86/.svn/prop-base/net.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/net.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/nfs.h.svn-base b/arch/linux/x86/.svn/prop-base/nfs.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/nfs.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/os.h.svn-base b/arch/linux/x86/.svn/prop-base/os.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/os.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/pci.h.svn-base b/arch/linux/x86/.svn/prop-base/pci.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/pci.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/processor.h.svn-base b/arch/linux/x86/.svn/prop-base/processor.h.svn-base deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/x86/.svn/prop-base/processor.h.svn-base +++ /dev/null diff --git a/arch/linux/x86/.svn/prop-base/samba.h.svn-base b/arch/linux/x86/.svn/prop-base/samba.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/samba.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/sensors.h.svn-base b/arch/linux/x86/.svn/prop-base/sensors.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/sensors.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/storage.h.svn-base b/arch/linux/x86/.svn/prop-base/storage.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/storage.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/uptime.h.svn-base b/arch/linux/x86/.svn/prop-base/uptime.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/uptime.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/prop-base/usb.h.svn-base b/arch/linux/x86/.svn/prop-base/usb.h.svn-base deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/prop-base/usb.h.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/alsa.h.svn-work b/arch/linux/x86/.svn/props/alsa.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/alsa.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/filesystem.h.svn-work b/arch/linux/x86/.svn/props/filesystem.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/filesystem.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/inputdevices.h.svn-work b/arch/linux/x86/.svn/props/inputdevices.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/inputdevices.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/loadavg.h.svn-work b/arch/linux/x86/.svn/props/loadavg.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/loadavg.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/memory.h.svn-work b/arch/linux/x86/.svn/props/memory.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/memory.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/modules.h.svn-work b/arch/linux/x86/.svn/props/modules.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/modules.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/net.h.svn-work b/arch/linux/x86/.svn/props/net.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/net.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/nfs.h.svn-work b/arch/linux/x86/.svn/props/nfs.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/nfs.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/os.h.svn-work b/arch/linux/x86/.svn/props/os.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/os.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/pci.h.svn-work b/arch/linux/x86/.svn/props/pci.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/pci.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/processor.h.svn-work b/arch/linux/x86/.svn/props/processor.h.svn-work deleted file mode 100644 index e69de29b..00000000 --- a/arch/linux/x86/.svn/props/processor.h.svn-work +++ /dev/null diff --git a/arch/linux/x86/.svn/props/samba.h.svn-work b/arch/linux/x86/.svn/props/samba.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/samba.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/sensors.h.svn-work b/arch/linux/x86/.svn/props/sensors.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/sensors.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/storage.h.svn-work b/arch/linux/x86/.svn/props/storage.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/storage.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/uptime.h.svn-work b/arch/linux/x86/.svn/props/uptime.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/uptime.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/props/usb.h.svn-work b/arch/linux/x86/.svn/props/usb.h.svn-work deleted file mode 100644 index d2224698..00000000 --- a/arch/linux/x86/.svn/props/usb.h.svn-work +++ /dev/null @@ -1,5 +0,0 @@ -K 11 -svn:special -V 1 -* -END diff --git a/arch/linux/x86/.svn/text-base/alsa.h.svn-base b/arch/linux/x86/.svn/text-base/alsa.h.svn-base deleted file mode 100644 index e17b92c3..00000000 --- a/arch/linux/x86/.svn/text-base/alsa.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/alsa.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/filesystem.h.svn-base b/arch/linux/x86/.svn/text-base/filesystem.h.svn-base deleted file mode 100644 index 0d23c803..00000000 --- a/arch/linux/x86/.svn/text-base/filesystem.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/filesystem.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/inputdevices.h.svn-base b/arch/linux/x86/.svn/text-base/inputdevices.h.svn-base deleted file mode 100644 index 58695156..00000000 --- a/arch/linux/x86/.svn/text-base/inputdevices.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/inputdevices.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/loadavg.h.svn-base b/arch/linux/x86/.svn/text-base/loadavg.h.svn-base deleted file mode 100644 index 354f872f..00000000 --- a/arch/linux/x86/.svn/text-base/loadavg.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/loadavg.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/memory.h.svn-base b/arch/linux/x86/.svn/text-base/memory.h.svn-base deleted file mode 100644 index 2b2ad528..00000000 --- a/arch/linux/x86/.svn/text-base/memory.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/memory.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/modules.h.svn-base b/arch/linux/x86/.svn/text-base/modules.h.svn-base deleted file mode 100644 index d80f7d7a..00000000 --- a/arch/linux/x86/.svn/text-base/modules.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/modules.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/net.h.svn-base b/arch/linux/x86/.svn/text-base/net.h.svn-base deleted file mode 100644 index 2b4ac97a..00000000 --- a/arch/linux/x86/.svn/text-base/net.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/net.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/nfs.h.svn-base b/arch/linux/x86/.svn/text-base/nfs.h.svn-base deleted file mode 100644 index c10bd829..00000000 --- a/arch/linux/x86/.svn/text-base/nfs.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/nfs.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/os.h.svn-base b/arch/linux/x86/.svn/text-base/os.h.svn-base deleted file mode 100644 index 49613b1f..00000000 --- a/arch/linux/x86/.svn/text-base/os.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/os.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/pci.h.svn-base b/arch/linux/x86/.svn/text-base/pci.h.svn-base deleted file mode 100644 index 2386d2ad..00000000 --- a/arch/linux/x86/.svn/text-base/pci.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/pci.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/processor.h.svn-base b/arch/linux/x86/.svn/text-base/processor.h.svn-base deleted file mode 100644 index aba623bf..00000000 --- a/arch/linux/x86/.svn/text-base/processor.h.svn-base +++ /dev/null @@ -1,303 +0,0 @@ -/* - * HardInfo - Displays System Information - * Copyright (C) 2003-2006 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 - * the Free Software Foundation, version 2. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * This function is partly based on x86cpucaps - * by Osamu Kayasono <jacobi@jcom.home.ne.jp> - */ -static void -get_processor_strfamily(Processor *processor) -{ - gint family = processor->family; - gint model = processor->model; - - if (g_str_equal(processor->vendor_id, "GenuineIntel")) { - if (family == 4) { - processor->strmodel = g_strdup("i486 series"); - } else if (family == 5) { - if (model < 4) { - processor->strmodel = g_strdup("Pentium Classic"); - } else { - processor->strmodel = g_strdup("Pentium MMX"); - } - } else if (family == 6) { - if (model <= 1) { - processor->strmodel = g_strdup("Pentium Pro"); - } else if (model < 7) { - processor->strmodel = g_strdup("Pentium II/Pentium II Xeon/Celeron"); - } else if (model == 9) { - processor->strmodel = g_strdup("Pentium M"); - } else { - processor->strmodel = g_strdup("Pentium III/Pentium III Xeon/Celeron"); - } - } else if (family > 6) { - processor->strmodel = g_strdup("Pentium 4"); - } else { - processor->strmodel = g_strdup("i386 class"); - } - } else if (g_str_equal(processor->vendor_id, "AuthenticAMD")) { - if (family == 4) { - if (model <= 9) { - processor->strmodel = g_strdup("AMD i80486 series"); - } else { - processor->strmodel = g_strdup("AMD 5x86"); - } - } else if (family == 5) { - if (model <= 3) { - processor->strmodel = g_strdup("AMD K5"); - } else if (model <= 7) { - processor->strmodel = g_strdup("AMD K6"); - } else if (model == 8) { - processor->strmodel = g_strdup("AMD K6-2"); - } else if (model == 9) { - processor->strmodel = g_strdup("AMD K6-III"); - } else { - processor->strmodel = g_strdup("AMD K6-2+/III+"); - } - } else if (family == 6) { - if (model == 1) { - processor->strmodel = g_strdup("AMD Athlon (K7"); - } else if (model == 2) { - processor->strmodel = g_strdup("AMD Athlon (K75)"); - } else if (model == 3) { - processor->strmodel = g_strdup("AMD Duron (Spitfire)"); - } else if (model == 4) { - processor->strmodel = g_strdup("AMD Athlon (Thunderbird)"); - } else if (model == 6) { - processor->strmodel = g_strdup("AMD Athlon XP/MP/4 (Palomino)"); - } else if (model == 7) { - processor->strmodel = g_strdup("AMD Duron (Morgan)"); - } else if (model == 8) { - processor->strmodel = g_strdup("AMD Athlon XP/MP (Thoroughbred)"); - } else if (model == 10) { - processor->strmodel = g_strdup("AMD Athlon XP/MP (Barton)"); - } else { - processor->strmodel = g_strdup("AMD Athlon (unknown)"); - } - } else if (family > 6) { - processor->strmodel = g_strdup("AMD Opteron/Athlon64/FX"); - } else { - processor->strmodel = g_strdup("AMD i386 class"); - } - } else if (g_str_equal(processor->vendor_id, "CyrixInstead")) { - if (family == 4) { - processor->strmodel = g_strdup("Cyrix 5x86"); - } else if (family == 5) { - processor->strmodel = g_strdup("Cyrix M1 (6x86)"); - } else if (family == 6) { - if (model == 0) { - processor->strmodel = g_strdup("Cyrix M2 (6x86MX)"); - } else if (model <= 5) { - processor->strmodel = g_strdup("VIA Cyrix III (M2 core)"); - } else if (model == 6) { - processor->strmodel = g_strdup("VIA Cyrix III (WinChip C5A)"); - } else if (model == 7) { - processor->strmodel = g_strdup("VIA Cyrix III (WinChip C5B/C)"); - } else { - processor->strmodel = g_strdup("VIA Cyrix III (WinChip C5C-T)"); - } - } else { - processor->strmodel = g_strdup("Cyrix i386 class"); - } - } else if (g_str_equal(processor->vendor_id, "CentaurHauls")) { - if (family == 5) { - if (model <= 4) { - processor->strmodel = g_strdup("Centaur WinChip C6"); - } else if (model <= 8) { - processor->strmodel = g_strdup("Centaur WinChip 2"); - } else { - processor->strmodel = g_strdup("Centaur WinChip 2A"); - } - } else { - processor->strmodel = g_strdup("Centaur i386 class"); - } - } else if (g_str_equal(processor->vendor_id, "GenuineTMx86")) { - processor->strmodel = g_strdup("Transmeta Crusoe TM3x00/5x00"); - } else { - processor->strmodel = g_strdup("Unknown"); - } -} - -static Processor * -computer_get_processor(void) -{ - Processor *processor; - FILE *cpuinfo; - gchar buffer[128]; - - cpuinfo = fopen("/proc/cpuinfo", "r"); - if (!cpuinfo) - return NULL; - - processor = g_new0(Processor, 1); - while (fgets(buffer, 128, cpuinfo)) { - gchar **tmp = g_strsplit(buffer, ":", 2); - - if (tmp[0] && tmp[1]) { - tmp[0] = g_strstrip(tmp[0]); - tmp[1] = g_strstrip(tmp[1]); - - get_str("model name", processor->model_name); - get_str("vendor_id", processor->vendor_id); - get_str("flags", processor->flags); - get_int("cache size", processor->cache_size); - get_float("cpu MHz", processor->cpu_mhz); - get_float("bogomips", processor->bogomips); - - get_str("fpu", processor->has_fpu); - - get_str("fdiv_bug", processor->bug_fdiv); - get_str("hlt_bug", processor->bug_hlt); - get_str("f00f_bug", processor->bug_f00f); - get_str("coma_bug", processor->bug_coma); - - get_int("model", processor->model); - get_int("cpu family", processor->family); - get_int("stepping", processor->stepping); - } - g_strfreev(tmp); - } - - get_processor_strfamily(processor); - - fclose(cpuinfo); - - return processor; -} - -static struct { - char *name, *meaning; -} flag_meaning[] = { - { "3dnow", "3DNow! Technology" }, - { "3dnowext", "Extended 3DNow! Technology" }, - { "fpu", "Floating Point Unit" }, - { "vme", "Virtual 86 Mode Extension" }, - { "de", "Debug Extensions - I/O breakpoints" }, - { "pse", "Page Size Extensions (4MB pages)" }, - { "tsc", "Time Stamp Counter and RDTSC instruction" }, - { "msr", "Model Specific Registers" }, - { "pae", "Physical Address Extensions (36-bit address, 2MB pages)" }, - { "mce", "Machine Check Architeture" }, - { "cx8", "CMPXCHG8 instruction" }, - { "apic", "Advanced Programmable Interrupt Controller" }, - { "sep", "Fast System Call (SYSENTER/SYSEXIT instructions)" }, - { "mtrr", "Memory Type Range Registers" }, - { "pge", "Page Global Enable" }, - { "mca", "Machine Check Architecture" }, - { "cmov", "Conditional Move instruction" }, - { "pat", "Page Attribute Table" }, - { "pse36", "36bit Page Size Extensions" }, - { "psn", "96 bit Processor Serial Number" }, - { "mmx", "MMX technology" }, - { "mmxext", "Extended MMX Technology" }, - { "cflush", "Cache Flush" }, - { "dtes", "Debug Trace Store" }, - { "fxsr", "FXSAVE and FXRSTOR instructions" }, - { "kni", "Streaming SIMD instructions" }, - { "xmm", "Streaming SIMD instructions" }, - { "ht", "HyperThreading" }, - { "mp", "Multiprocessing Capable" }, - { "sse", "SSE instructions" }, - { "sse2", "SSE2 (WNI) instructions" }, - { "acc", "Automatic Clock Control" }, - { "ia64", "IA64 Instructions" }, - { "syscall", "SYSCALL and SYSEXIT instructions" }, - { "nx", "No-execute Page Protection" }, - { "xd", "Execute Disable" }, - { "clflush", "Cache Line Flush instruction" }, - { "acpi", "Thermal Monitor and Software Controlled Clock Facilities" }, - { "dts", "Debug Store" }, - { "ss", "Self Snoop" }, - { "tm", "Thermal Monitor" }, - { "pbe", "Pending Break Enable" }, - { "pb", "Pending Break Enable" }, - { NULL, NULL} -}; - -gchar * -processor_get_capabilities_from_flags(gchar * strflags) -{ - /* FIXME: * Separate between processor capabilities, additional instructions and whatnot. */ - gchar **flags, **old; - gchar *tmp = ""; - gint i, j = 0; - - flags = g_strsplit(strflags, " ", 0); - old = flags; - - while (flags[j]) { - gchar *meaning = ""; - for (i = 0; flag_meaning[i].name != NULL; i++) { - if (!strcmp(flags[j], flag_meaning[i].name)) { - meaning = flag_meaning[i].meaning; - break; - } - } - - tmp = g_strdup_printf("%s%s=%s\n", tmp, flags[j], meaning); - j++; - } - - g_strfreev(old); - return tmp; -} - -static gchar * -processor_get_info(Processor *processor) -{ - gchar *tmp = processor_get_capabilities_from_flags(processor-> - flags); - gchar *ret = g_strdup_printf("[Processor]\n" - "Name=%s\n" - "Specification=%s\n" - "Family, model, stepping=%d, %d, %d\n" - "Vendor=%s\n" - "Cache Size=%dkb\n" - "Frequency=%.2fMHz\n" - "BogoMips=%.2f\n" - "Byte Order=%s\n" - "[Features]\n" - "FDIV Bug=%s\n" - "HLT Bug=%s\n" - "F00F Bug=%s\n" - "Coma Bug=%s\n" - "Has FPU=%s\n" - "[Capabilities]\n" "%s", - processor->strmodel, - processor->model_name, - processor->family, - processor->model, - processor->stepping, - processor->vendor_id, - processor->cache_size, - processor->cpu_mhz, - processor->bogomips, -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - "Little Endian", -#else - "Big Endian", -#endif - processor->bug_fdiv, - processor->bug_hlt, - processor->bug_f00f, - processor->bug_coma, - processor->has_fpu, - tmp); - g_free(tmp); - return ret; -} diff --git a/arch/linux/x86/.svn/text-base/samba.h.svn-base b/arch/linux/x86/.svn/text-base/samba.h.svn-base deleted file mode 100644 index 246e9ed0..00000000 --- a/arch/linux/x86/.svn/text-base/samba.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/samba.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/sensors.h.svn-base b/arch/linux/x86/.svn/text-base/sensors.h.svn-base deleted file mode 100644 index 822de7b7..00000000 --- a/arch/linux/x86/.svn/text-base/sensors.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/sensors.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/storage.h.svn-base b/arch/linux/x86/.svn/text-base/storage.h.svn-base deleted file mode 100644 index 24568f89..00000000 --- a/arch/linux/x86/.svn/text-base/storage.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/storage.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/uptime.h.svn-base b/arch/linux/x86/.svn/text-base/uptime.h.svn-base deleted file mode 100644 index 25cc41e9..00000000 --- a/arch/linux/x86/.svn/text-base/uptime.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/uptime.h
\ No newline at end of file diff --git a/arch/linux/x86/.svn/text-base/usb.h.svn-base b/arch/linux/x86/.svn/text-base/usb.h.svn-base deleted file mode 100644 index 8aece87f..00000000 --- a/arch/linux/x86/.svn/text-base/usb.h.svn-base +++ /dev/null @@ -1 +0,0 @@ -link ../../linux/common/usb.h
\ No newline at end of file diff --git a/arch/linux/x86/battery.h b/arch/linux/x86/battery.h new file mode 120000 index 00000000..e4c794f2 --- /dev/null +++ b/arch/linux/x86/battery.h @@ -0,0 +1 @@ +../../linux/common/battery.h
\ No newline at end of file diff --git a/arch/linux/x86/boots.h b/arch/linux/x86/boots.h new file mode 120000 index 00000000..97384500 --- /dev/null +++ b/arch/linux/x86/boots.h @@ -0,0 +1 @@ +../../../arch/linux/common/boots.h
\ No newline at end of file diff --git a/arch/linux/x86/devmemory.h b/arch/linux/x86/devmemory.h new file mode 120000 index 00000000..f8a833e7 --- /dev/null +++ b/arch/linux/x86/devmemory.h @@ -0,0 +1 @@ +../../../arch/linux/common/devmemory.h
\ No newline at end of file diff --git a/arch/linux/x86/net.h b/arch/linux/x86/net.h index 72d77b26..488b5ae3 120000 --- a/arch/linux/x86/net.h +++ b/arch/linux/x86/net.h @@ -1 +1 @@ -../../linux/common/net.h
\ No newline at end of file +../../../arch/linux/common/net.h
\ No newline at end of file diff --git a/arch/linux/x86/processor.h b/arch/linux/x86/processor.h index aba623bf..918bac7c 100644 --- a/arch/linux/x86/processor.h +++ b/arch/linux/x86/processor.h @@ -16,138 +16,161 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +struct _Processor { + gchar *model_name; + gchar *vendor_id; + gchar *flags; + gint cache_size; + gfloat bogomips, cpu_mhz; + + gchar *has_fpu; + gchar *bug_fdiv, *bug_hlt, *bug_f00f, *bug_coma; + + gint model, family, stepping; + gchar *strmodel; + + gint id; +}; + /* * This function is partly based on x86cpucaps * by Osamu Kayasono <jacobi@jcom.home.ne.jp> - */ -static void -get_processor_strfamily(Processor *processor) + */ +static void get_processor_strfamily(Processor * processor) { gint family = processor->family; gint model = processor->model; if (g_str_equal(processor->vendor_id, "GenuineIntel")) { - if (family == 4) { - processor->strmodel = g_strdup("i486 series"); - } else if (family == 5) { - if (model < 4) { - processor->strmodel = g_strdup("Pentium Classic"); - } else { - processor->strmodel = g_strdup("Pentium MMX"); - } - } else if (family == 6) { - if (model <= 1) { - processor->strmodel = g_strdup("Pentium Pro"); - } else if (model < 7) { - processor->strmodel = g_strdup("Pentium II/Pentium II Xeon/Celeron"); - } else if (model == 9) { - processor->strmodel = g_strdup("Pentium M"); - } else { - processor->strmodel = g_strdup("Pentium III/Pentium III Xeon/Celeron"); - } - } else if (family > 6) { - processor->strmodel = g_strdup("Pentium 4"); - } else { - processor->strmodel = g_strdup("i386 class"); - } + if (family == 4) { + processor->strmodel = g_strdup("i486 series"); + } else if (family == 5) { + if (model < 4) { + processor->strmodel = g_strdup("Pentium Classic"); + } else { + processor->strmodel = g_strdup("Pentium MMX"); + } + } else if (family == 6) { + if (model <= 1) { + processor->strmodel = g_strdup("Pentium Pro"); + } else if (model < 7) { + processor->strmodel = g_strdup("Pentium II/Pentium II Xeon/Celeron"); + } else if (model == 9) { + processor->strmodel = g_strdup("Pentium M"); + } else { + processor->strmodel = g_strdup("Pentium III/Pentium III Xeon/Celeron"); + } + } else if (family > 6) { + processor->strmodel = g_strdup("Pentium 4"); + } else { + processor->strmodel = g_strdup("i386 class"); + } } else if (g_str_equal(processor->vendor_id, "AuthenticAMD")) { - if (family == 4) { - if (model <= 9) { - processor->strmodel = g_strdup("AMD i80486 series"); - } else { - processor->strmodel = g_strdup("AMD 5x86"); - } - } else if (family == 5) { - if (model <= 3) { - processor->strmodel = g_strdup("AMD K5"); - } else if (model <= 7) { - processor->strmodel = g_strdup("AMD K6"); - } else if (model == 8) { - processor->strmodel = g_strdup("AMD K6-2"); - } else if (model == 9) { - processor->strmodel = g_strdup("AMD K6-III"); - } else { - processor->strmodel = g_strdup("AMD K6-2+/III+"); - } - } else if (family == 6) { - if (model == 1) { - processor->strmodel = g_strdup("AMD Athlon (K7"); - } else if (model == 2) { - processor->strmodel = g_strdup("AMD Athlon (K75)"); - } else if (model == 3) { - processor->strmodel = g_strdup("AMD Duron (Spitfire)"); - } else if (model == 4) { - processor->strmodel = g_strdup("AMD Athlon (Thunderbird)"); - } else if (model == 6) { - processor->strmodel = g_strdup("AMD Athlon XP/MP/4 (Palomino)"); - } else if (model == 7) { - processor->strmodel = g_strdup("AMD Duron (Morgan)"); - } else if (model == 8) { - processor->strmodel = g_strdup("AMD Athlon XP/MP (Thoroughbred)"); - } else if (model == 10) { - processor->strmodel = g_strdup("AMD Athlon XP/MP (Barton)"); - } else { - processor->strmodel = g_strdup("AMD Athlon (unknown)"); - } - } else if (family > 6) { - processor->strmodel = g_strdup("AMD Opteron/Athlon64/FX"); - } else { - processor->strmodel = g_strdup("AMD i386 class"); - } + if (family == 4) { + if (model <= 9) { + processor->strmodel = g_strdup("AMD i80486 series"); + } else { + processor->strmodel = g_strdup("AMD 5x86"); + } + } else if (family == 5) { + if (model <= 3) { + processor->strmodel = g_strdup("AMD K5"); + } else if (model <= 7) { + processor->strmodel = g_strdup("AMD K6"); + } else if (model == 8) { + processor->strmodel = g_strdup("AMD K6-2"); + } else if (model == 9) { + processor->strmodel = g_strdup("AMD K6-III"); + } else { + processor->strmodel = g_strdup("AMD K6-2+/III+"); + } + } else if (family == 6) { + if (model == 1) { + processor->strmodel = g_strdup("AMD Athlon (K7)"); + } else if (model == 2) { + processor->strmodel = g_strdup("AMD Athlon (K75)"); + } else if (model == 3) { + processor->strmodel = g_strdup("AMD Duron (Spitfire)"); + } else if (model == 4) { + processor->strmodel = g_strdup("AMD Athlon (Thunderbird)"); + } else if (model == 6) { + processor->strmodel = g_strdup("AMD Athlon XP/MP/4 (Palomino)"); + } else if (model == 7) { + processor->strmodel = g_strdup("AMD Duron (Morgan)"); + } else if (model == 8) { + processor->strmodel = g_strdup("AMD Athlon XP/MP (Thoroughbred)"); + } else if (model == 10) { + processor->strmodel = g_strdup("AMD Athlon XP/MP (Barton)"); + } else { + processor->strmodel = g_strdup("AMD Athlon (unknown)"); + } + } else if (family > 6) { + processor->strmodel = g_strdup("AMD Opteron/Athlon64/FX"); + } else { + processor->strmodel = g_strdup("AMD i386 class"); + } } else if (g_str_equal(processor->vendor_id, "CyrixInstead")) { - if (family == 4) { - processor->strmodel = g_strdup("Cyrix 5x86"); - } else if (family == 5) { - processor->strmodel = g_strdup("Cyrix M1 (6x86)"); - } else if (family == 6) { - if (model == 0) { - processor->strmodel = g_strdup("Cyrix M2 (6x86MX)"); - } else if (model <= 5) { - processor->strmodel = g_strdup("VIA Cyrix III (M2 core)"); - } else if (model == 6) { - processor->strmodel = g_strdup("VIA Cyrix III (WinChip C5A)"); - } else if (model == 7) { - processor->strmodel = g_strdup("VIA Cyrix III (WinChip C5B/C)"); - } else { - processor->strmodel = g_strdup("VIA Cyrix III (WinChip C5C-T)"); - } - } else { - processor->strmodel = g_strdup("Cyrix i386 class"); - } + if (family == 4) { + processor->strmodel = g_strdup("Cyrix 5x86"); + } else if (family == 5) { + processor->strmodel = g_strdup("Cyrix M1 (6x86)"); + } else if (family == 6) { + if (model == 0) { + processor->strmodel = g_strdup("Cyrix M2 (6x86MX)"); + } else if (model <= 5) { + processor->strmodel = g_strdup("VIA Cyrix III (M2 core)"); + } else if (model == 6) { + processor->strmodel = g_strdup("VIA Cyrix III (WinChip C5A)"); + } else if (model == 7) { + processor->strmodel = g_strdup("VIA Cyrix III (WinChip C5B/C)"); + } else { + processor->strmodel = g_strdup("VIA Cyrix III (WinChip C5C-T)"); + } + } else { + processor->strmodel = g_strdup("Cyrix i386 class"); + } } else if (g_str_equal(processor->vendor_id, "CentaurHauls")) { - if (family == 5) { - if (model <= 4) { - processor->strmodel = g_strdup("Centaur WinChip C6"); - } else if (model <= 8) { - processor->strmodel = g_strdup("Centaur WinChip 2"); - } else { - processor->strmodel = g_strdup("Centaur WinChip 2A"); - } - } else { - processor->strmodel = g_strdup("Centaur i386 class"); - } + if (family == 5) { + if (model <= 4) { + processor->strmodel = g_strdup("Centaur WinChip C6"); + } else if (model <= 8) { + processor->strmodel = g_strdup("Centaur WinChip 2"); + } else { + processor->strmodel = g_strdup("Centaur WinChip 2A"); + } + } else { + processor->strmodel = g_strdup("Centaur i386 class"); + } } else if (g_str_equal(processor->vendor_id, "GenuineTMx86")) { - processor->strmodel = g_strdup("Transmeta Crusoe TM3x00/5x00"); + processor->strmodel = g_strdup("Transmeta Crusoe TM3x00/5x00"); } else { - processor->strmodel = g_strdup("Unknown"); + processor->strmodel = g_strdup("Unknown"); } } -static Processor * -computer_get_processor(void) +static GSList *__scan_processors(void) { - Processor *processor; + GSList *procs = NULL; + Processor *processor = NULL; FILE *cpuinfo; - gchar buffer[128]; + gchar buffer[256]; cpuinfo = fopen("/proc/cpuinfo", "r"); if (!cpuinfo) return NULL; - processor = g_new0(Processor, 1); - while (fgets(buffer, 128, cpuinfo)) { + while (fgets(buffer, 256, cpuinfo)) { gchar **tmp = g_strsplit(buffer, ":", 2); + if (g_str_has_prefix(tmp[0], "processor")) { + if (processor) { + get_processor_strfamily(processor); + procs = g_slist_append(procs, processor); + } + + processor = g_new0(Processor, 1); + } + if (tmp[0] && tmp[1]) { tmp[0] = g_strstrip(tmp[0]); tmp[1] = g_strstrip(tmp[1]); @@ -165,74 +188,81 @@ computer_get_processor(void) get_str("hlt_bug", processor->bug_hlt); get_str("f00f_bug", processor->bug_f00f); get_str("coma_bug", processor->bug_coma); - + get_int("model", processor->model); get_int("cpu family", processor->family); get_int("stepping", processor->stepping); + + get_int("processor", processor->id); } g_strfreev(tmp); } - get_processor_strfamily(processor); + if (processor) { + get_processor_strfamily(processor); + procs = g_slist_append(procs, processor); + } fclose(cpuinfo); - return processor; + return procs; } static struct { char *name, *meaning; } flag_meaning[] = { - { "3dnow", "3DNow! Technology" }, - { "3dnowext", "Extended 3DNow! Technology" }, - { "fpu", "Floating Point Unit" }, - { "vme", "Virtual 86 Mode Extension" }, - { "de", "Debug Extensions - I/O breakpoints" }, - { "pse", "Page Size Extensions (4MB pages)" }, - { "tsc", "Time Stamp Counter and RDTSC instruction" }, - { "msr", "Model Specific Registers" }, - { "pae", "Physical Address Extensions (36-bit address, 2MB pages)" }, - { "mce", "Machine Check Architeture" }, - { "cx8", "CMPXCHG8 instruction" }, - { "apic", "Advanced Programmable Interrupt Controller" }, - { "sep", "Fast System Call (SYSENTER/SYSEXIT instructions)" }, - { "mtrr", "Memory Type Range Registers" }, - { "pge", "Page Global Enable" }, - { "mca", "Machine Check Architecture" }, - { "cmov", "Conditional Move instruction" }, - { "pat", "Page Attribute Table" }, - { "pse36", "36bit Page Size Extensions" }, - { "psn", "96 bit Processor Serial Number" }, - { "mmx", "MMX technology" }, - { "mmxext", "Extended MMX Technology" }, - { "cflush", "Cache Flush" }, - { "dtes", "Debug Trace Store" }, - { "fxsr", "FXSAVE and FXRSTOR instructions" }, - { "kni", "Streaming SIMD instructions" }, - { "xmm", "Streaming SIMD instructions" }, - { "ht", "HyperThreading" }, - { "mp", "Multiprocessing Capable" }, - { "sse", "SSE instructions" }, - { "sse2", "SSE2 (WNI) instructions" }, - { "acc", "Automatic Clock Control" }, - { "ia64", "IA64 Instructions" }, - { "syscall", "SYSCALL and SYSEXIT instructions" }, - { "nx", "No-execute Page Protection" }, - { "xd", "Execute Disable" }, - { "clflush", "Cache Line Flush instruction" }, - { "acpi", "Thermal Monitor and Software Controlled Clock Facilities" }, - { "dts", "Debug Store" }, - { "ss", "Self Snoop" }, - { "tm", "Thermal Monitor" }, - { "pbe", "Pending Break Enable" }, - { "pb", "Pending Break Enable" }, - { NULL, NULL} + { "3dnow", "3DNow! Technology" }, + { "3dnowext", "Extended 3DNow! Technology" }, + { "fpu", "Floating Point Unit" }, + { "vme", "Virtual 86 Mode Extension" }, + { "de", "Debug Extensions - I/O breakpoints" }, + { "pse", "Page Size Extensions (4MB pages)" }, + { "tsc", "Time Stamp Counter and RDTSC instruction" }, + { "msr", "Model Specific Registers" }, + { "pae", "Physical Address Extensions" }, + { "mce", "Machine Check Architeture" }, + { "cx8", "CMPXCHG8 instruction" }, + { "apic", "Advanced Programmable Interrupt Controller" }, + { "sep", "Fast System Call (SYSENTER/SYSEXIT)" }, + { "mtrr", "Memory Type Range Registers" }, + { "pge", "Page Global Enable" }, + { "mca", "Machine Check Architecture" }, + { "cmov", "Conditional Move instruction" }, + { "pat", "Page Attribute Table" }, + { "pse36", "36bit Page Size Extensions" }, + { "psn", "96 bit Processor Serial Number" }, + { "mmx", "MMX technology" }, + { "mmxext", "Extended MMX Technology" }, + { "cflush", "Cache Flush" }, + { "dtes", "Debug Trace Store" }, + { "fxsr", "FXSAVE and FXRSTOR instructions" }, + { "kni", "Streaming SIMD instructions" }, + { "xmm", "Streaming SIMD instructions" }, + { "ht", "HyperThreading" }, + { "mp", "Multiprocessing Capable" }, + { "sse", "SSE instructions" }, + { "sse2", "SSE2 (WNI) instructions" }, + { "acc", "Automatic Clock Control" }, + { "ia64", "IA64 Instructions" }, + { "syscall", "SYSCALL and SYSEXIT instructions" }, + { "nx", "No-execute Page Protection" }, + { "xd", "Execute Disable" }, + { "clflush", "Cache Line Flush instruction" }, + { "acpi", "Thermal Monitor and Software Controlled Clock" }, + { "dts", "Debug Store" }, + { "ss", "Self Snoop" }, + { "tm", "Thermal Monitor" }, + { "pbe", "Pending Break Enable" }, + { "pb", "Pending Break Enable" }, + { NULL, NULL }, }; -gchar * -processor_get_capabilities_from_flags(gchar * strflags) +gchar *processor_get_capabilities_from_flags(gchar * strflags) { - /* FIXME: * Separate between processor capabilities, additional instructions and whatnot. */ + /* FIXME: + * - Separate between processor capabilities, additional instructions and whatnot. + * - Use binary search or something faster than this O(n) cruft + */ gchar **flags, **old; gchar *tmp = ""; gint i, j = 0; @@ -243,7 +273,7 @@ processor_get_capabilities_from_flags(gchar * strflags) while (flags[j]) { gchar *meaning = ""; for (i = 0; flag_meaning[i].name != NULL; i++) { - if (!strcmp(flags[j], flag_meaning[i].name)) { + if (g_str_equal(flags[j], flag_meaning[i].name)) { meaning = flag_meaning[i].meaning; break; } @@ -257,47 +287,84 @@ processor_get_capabilities_from_flags(gchar * strflags) return tmp; } -static gchar * -processor_get_info(Processor *processor) +static gchar *processor_get_detailed_info(Processor * processor) { - gchar *tmp = processor_get_capabilities_from_flags(processor-> - flags); - gchar *ret = g_strdup_printf("[Processor]\n" - "Name=%s\n" - "Specification=%s\n" - "Family, model, stepping=%d, %d, %d\n" - "Vendor=%s\n" - "Cache Size=%dkb\n" - "Frequency=%.2fMHz\n" - "BogoMips=%.2f\n" - "Byte Order=%s\n" - "[Features]\n" - "FDIV Bug=%s\n" - "HLT Bug=%s\n" - "F00F Bug=%s\n" - "Coma Bug=%s\n" - "Has FPU=%s\n" - "[Capabilities]\n" "%s", - processor->strmodel, - processor->model_name, - processor->family, - processor->model, - processor->stepping, - processor->vendor_id, - processor->cache_size, - processor->cpu_mhz, - processor->bogomips, + gchar *tmp, *ret; + + tmp = processor_get_capabilities_from_flags(processor->flags); + ret = g_strdup_printf("[Processor]\n" + "Name=%s\n" + "Family, model, stepping=%d, %d, %d (%s)\n" + "Vendor=%s\n" + "[Configuration]\n" + "Cache Size=%dkb\n" + "Frequency=%.2fMHz\n" + "BogoMIPS=%.2f\n" + "Byte Order=%s\n" + "[Features]\n" + "FDIV Bug=%s\n" + "HLT Bug=%s\n" + "F00F Bug=%s\n" + "Coma Bug=%s\n" + "Has FPU=%s\n" + "[Capabilities]\n" + "%s", + processor->model_name, + processor->family, + processor->model, + processor->stepping, + processor->strmodel, + vendor_get_name(processor->vendor_id), + processor->cache_size, + processor->cpu_mhz, processor->bogomips, #if G_BYTE_ORDER == G_LITTLE_ENDIAN - "Little Endian", + "Little Endian", #else - "Big Endian", + "Big Endian", #endif - processor->bug_fdiv, - processor->bug_hlt, - processor->bug_f00f, - processor->bug_coma, - processor->has_fpu, - tmp); - g_free(tmp); - return ret; + processor->bug_fdiv ? processor->bug_fdiv : "yes", + processor->bug_hlt ? processor->bug_hlt : "yes", + processor->bug_f00f ? processor->bug_f00f : "yes", + processor->bug_coma ? processor->bug_coma : "yes", + processor->has_fpu ? processor->has_fpu : "no", + tmp); + g_free(tmp); + return ret; + +} + +static gchar *processor_get_info(GSList * processors) +{ + Processor *processor; + + if (g_slist_length(processors) > 1) { + gchar *ret, *tmp, *hashkey; + GSList *l; + + tmp = g_strdup(""); + + for (l = processors; l; l = l->next) { + processor = (Processor *) l->data; + + tmp = g_strdup_printf("%s$CPU%d$%s=%.2fMHz\n", + tmp, processor->id, + processor->model_name, + processor->cpu_mhz); + + hashkey = g_strdup_printf("CPU%d", processor->id); + g_hash_table_insert(moreinfo, hashkey, + processor_get_detailed_info(processor)); + } + + ret = g_strdup_printf("[$ShellParam$]\n" + "ViewType=1\n" + "[Processors]\n" + "%s", tmp); + g_free(tmp); + + return ret; + } + + processor = (Processor *) processors->data; + return processor_get_detailed_info(processor); } |