static Computer * computer_get_info(void) { Computer *computer; computer = g_new0(Computer, 1); if (moreinfo) { #ifdef g_hash_table_unref g_hash_table_unref(moreinfo); #else g_free(moreinfo); #endif } moreinfo = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); shell_status_update("Getting processor information..."); computer->processor = computer_get_processor(); shell_status_update("Getting memory information..."); computer->memory = computer_get_memory(); shell_status_update("Getting operating system information..."); computer->os = computer_get_os(); shell_status_update("Getting display information..."); computer->display = computer_get_display(); shell_status_update("Getting sound card information..."); computer->alsa = computer_get_alsainfo(); shell_status_update("Getting mounted file system information..."); scan_filesystems(); shell_status_update("Getting shared directories..."); scan_shared_directories(); shell_status_update("Reading sensors..."); read_sensors(); shell_status_update("Obtaining network information..."); scan_net_interfaces(); computer->date_time = "..."; return computer; }
void scan_os(gboolean reload) { SCAN_START(); computer->os = computer_get_os(); SCAN_END(); }