netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=f4abba9a656efd731ac28588592829a9edcd07a2

commit f4abba9a656efd731ac28588592829a9edcd07a2
Author: Alastair Poole <nets...@gmail.com>
Date:   Wed Dec 23 14:59:22 2020 +0000

    machine: remove generic func
---
 src/bin/system/machine.c | 69 ------------------------------------------------
 src/bin/system/machine.h | 24 -----------------
 2 files changed, 93 deletions(-)

diff --git a/src/bin/system/machine.c b/src/bin/system/machine.c
index b11074d..866d21c 100644
--- a/src/bin/system/machine.c
+++ b/src/bin/system/machine.c
@@ -70,72 +70,3 @@
 #include "machine/sensors.bogox"
 #include "machine/network.bogox"
 
-void
-system_info_all_free(Sys_Info *info)
-{
-   sensor_t *snsr;
-   int i;
-
-   for (i = 0; i < info->cpu_count; i++)
-     free(info->cores[i]);
-   free(info->cores);
-
-   for (i = 0; i < info->sensor_count; i++) {
-        snsr = info->sensors[i];
-        if (snsr->name)
-          free(snsr->name);
-        if (snsr->child_name)
-          free(snsr->child_name);
-        free(snsr);
-     }
-   if (info->sensors)
-     free(info->sensors);
-
-   for (i = 0; i < info->power.battery_count; i++) {
-        if (info->power.batteries[i]->name)
-          free(info->power.batteries[i]->name);
-#if defined(__OpenBSD__)
-        if (info->power.batteries[i]->mibs)
-          free(info->power.batteries[i]->mibs);
-#endif
-        free(info->power.batteries[i]);
-     }
-   if (info->power.batteries)
-     free(info->power.batteries);
-
-   free(info);
-}
-
-Sys_Info *
-system_info_basic_get(void)
-{
-   Sys_Info *info = calloc(1, sizeof(Sys_Info));
-   if (!info) return NULL;
-
-   info->cores = system_cpu_usage_get(&info->cpu_count);
-
-   system_memory_usage_get(&info->memory);
-   system_power_state_get(&info->power);
-
-   return info;
-}
-
-Sys_Info *
-system_info_all_get(void)
-{
-   Sys_Info *info;
-
-   info = calloc(1, sizeof(Sys_Info));
-   if (!info) return NULL;
-
-   info->cores = system_cpu_usage_get(&info->cpu_count);
-
-   system_memory_usage_get(&info->memory);
-
-   system_power_state_get(&info->power);
-
-   info->sensors = system_sensors_thermal_get(&info->sensor_count);
-
-   return info;
-}
-
diff --git a/src/bin/system/machine.h b/src/bin/system/machine.h
index 5387057..5170dbc 100644
--- a/src/bin/system/machine.h
+++ b/src/bin/system/machine.h
@@ -82,30 +82,6 @@ typedef struct
    uint64_t outgoing;
 } network_t;
 
-typedef struct Sys_Info Sys_Info;
-struct Sys_Info
-{
-   int           cpu_count;
-   cpu_core_t  **cores;
-
-   meminfo_t     memory;
-   power_t       power;
-
-   int           sensor_count;
-   sensor_t    **sensors;
-
-   network_t     network_usage;
-};
-
-Sys_Info *
-system_info_all_get(void);
-
-Sys_Info *
-system_info_basic_get(void);
-
-void
-system_info_all_free(Sys_Info *);
-
 int
 system_cpu_online_count_get(void);
 

-- 


Reply via email to