Re-implemented. Fixed segfault on SMP. Stores keys in cpuinfo->labels

* sysinfo.c: (init_sysinfo): Re-implemented.
	Fixed segfault on SMP.
	Stores keys in cpuinfo->labels
This commit is contained in:
Benoît Dejean
2004-06-13 08:19:28 +00:00
parent 3881c09b51
commit 16bcad422c
2 changed files with 3 additions and 2 deletions

View File

@@ -5,8 +5,8 @@
(proc_file_to_buffer): Uninlined. (proc_file_to_buffer): Uninlined.
* sysinfo.c: (init_sysinfo): Re-implemented. * sysinfo.c: (init_sysinfo): Re-implemented.
Fixed segfault on SMP.
* sysinfo.c: (init_sysinfo): Fixed segfault on SMP. Stores keys in cpuinfo->labels.
2004-06-12 Benoît Dejean <tazforever@dlfp.org> 2004-06-12 Benoît Dejean <tazforever@dlfp.org>

View File

@@ -91,6 +91,7 @@ init_sysinfo (glibtop *server)
gchar * const key = g_strstrip( *p ); gchar * const key = g_strstrip( *p );
gchar * const value = g_strstrip( *(p+1) ); gchar * const value = g_strstrip( *(p+1) );
g_ptr_array_add(cpuinfo->labels, key);
g_hash_table_insert(cpuinfo->values, key, value); g_hash_table_insert(cpuinfo->values, key, value);
} }