From 61ef1134d97dbcf8b4ee069b36addf3c706ff55c Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 3 Mar 2021 10:59:28 +1100 Subject: Move generic (shared) code into its own sub-directory Code that is shared across some (but not all) platforms is moved into a 'generic' home. Makefile.am cleanups to match plus some minor alphabetic reordering/formatting. As discussed in https://github.com/htop-dev/htop/pull/553 --- darwin/DarwinProcessList.c | 2 +- darwin/Platform.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'darwin') diff --git a/darwin/DarwinProcessList.c b/darwin/DarwinProcessList.c index 43337100..c8f89e9b 100644 --- a/darwin/DarwinProcessList.c +++ b/darwin/DarwinProcessList.c @@ -20,9 +20,9 @@ in the source distribution for its full text. #include "CRT.h" #include "DarwinProcess.h" +#include "generic/openzfs_sysctl.h" #include "Platform.h" #include "ProcessList.h" -#include "zfs/openzfs_sysctl.h" #include "zfs/ZfsArcStats.h" diff --git a/darwin/Platform.h b/darwin/Platform.h index 59c2b9c7..c329c608 100644 --- a/darwin/Platform.h +++ b/darwin/Platform.h @@ -16,7 +16,8 @@ in the source distribution for its full text. #include "CPUMeter.h" #include "DarwinProcess.h" #include "DiskIOMeter.h" -#include "Generic.h" +#include "generic/hostname.h" +#include "generic/uname.h" #include "NetworkIOMeter.h" #include "ProcessLocksScreen.h" #include "SignalsPanel.h" @@ -69,11 +70,11 @@ bool Platform_getNetworkIO(NetworkIOData* data); void Platform_getBattery(double *percent, ACPresence *isOnAC); static inline void Platform_getHostname(char* buffer, size_t size) { - Generic_Hostname(buffer, size); + Generic_hostname(buffer, size); } static inline void Platform_getRelease(char** string) { - *string = Generic_OSRelease(); + *string = Generic_uname(); } #endif -- cgit v1.2.3