diff options
author | Nathan Scott <nathans@redhat.com> | 2021-03-03 10:59:28 +1100 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2021-03-04 13:40:59 +1100 |
commit | 61ef1134d97dbcf8b4ee069b36addf3c706ff55c (patch) | |
tree | 2cc478d92938b01f1d861350538742df6cea7e9e /freebsd | |
parent | 5b50ae3aa3a418f3f84ff2fdb172ab447753814f (diff) |
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
Diffstat (limited to 'freebsd')
-rw-r--r-- | freebsd/FreeBSDProcessList.c | 2 | ||||
-rw-r--r-- | freebsd/Platform.h | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c index 91e1d4ca..622403be 100644 --- a/freebsd/FreeBSDProcessList.c +++ b/freebsd/FreeBSDProcessList.c @@ -30,6 +30,7 @@ in the source distribution for its full text. #include "CRT.h" #include "Compat.h" #include "FreeBSDProcess.h" +#include "generic/openzfs_sysctl.h" #include "Macros.h" #include "Object.h" #include "Process.h" @@ -37,7 +38,6 @@ in the source distribution for its full text. #include "Settings.h" #include "XUtils.h" #include "zfs/ZfsArcStats.h" -#include "zfs/openzfs_sysctl.h" static int MIB_hw_physmem[2]; diff --git a/freebsd/Platform.h b/freebsd/Platform.h index 4ec130d7..79dfe0bd 100644 --- a/freebsd/Platform.h +++ b/freebsd/Platform.h @@ -13,7 +13,8 @@ in the source distribution for its full text. #include "Action.h" #include "BatteryMeter.h" #include "DiskIOMeter.h" -#include "Generic.h" +#include "generic/hostname.h" +#include "generic/uname.h" #include "Meter.h" #include "NetworkIOMeter.h" #include "Process.h" @@ -64,11 +65,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 |