aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/arch
diff options
context:
space:
mode:
authorAndrey Esin <gmlastik@gmail.com>2009-08-27 00:18:07 +0800
committerLeandro A. F. Pereira <leandro@hardinfo.org>2009-08-27 10:55:42 +0800
commit320113eae2bda4f16ffc5729911c2c58e142f808 (patch)
tree544d186d7d242b8c016c9073678187620217e391 /hardinfo2/arch
parente72031d655875beeebac612c66f7d8fbf42aebe2 (diff)
get_os_compiled_date in os.h is the same function as
uname(&utsbuf); utsbuf.version; But i think it is not date of compiling kernel, because lastik@llaptop:~$ uname -v #45-Ubuntu SMP Tue Jun 30 19:49:51 UTC 2009 So i have renamed it in whole project in Kernel Version. Signed-off-by: Leandro A. F. Pereira <leandro@hardinfo.org>
Diffstat (limited to 'hardinfo2/arch')
-rw-r--r--hardinfo2/arch/linux/common/os.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/hardinfo2/arch/linux/common/os.h b/hardinfo2/arch/linux/common/os.h
index 21f62296..e83b3f74 100644
--- a/hardinfo2/arch/linux/common/os.h
+++ b/hardinfo2/arch/linux/common/os.h
@@ -42,23 +42,6 @@ get_libc_version(void)
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");
-
- (void)fgets(buf, 512, procversion);
- fclose(procversion);
-
- return g_strdup(buf);
-}
-
-
#include <gdk/gdkx.h>
void
@@ -140,8 +123,6 @@ computer_get_os(void)
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)) {
@@ -206,6 +187,7 @@ computer_get_os(void)
/* Kernel and hostname info */
uname(&utsbuf);
+ os->kernel_version = g_strdup(utsbuf.version);
os->kernel = g_strdup_printf("%s %s (%s)", utsbuf.sysname,
utsbuf.release, utsbuf.machine);
os->hostname = g_strdup(utsbuf.nodename);