Fix include file ordering of generic headers

This commit is contained in:
Nathan Scott 2021-03-04 09:00:34 +11:00
parent 61ef1134d9
commit adaf748ab6
11 changed files with 21 additions and 18 deletions

View File

@ -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 "generic/openzfs_sysctl.h"
#include "zfs/ZfsArcStats.h"

View File

@ -16,11 +16,11 @@ in the source distribution for its full text.
#include "CPUMeter.h"
#include "DarwinProcess.h"
#include "DiskIOMeter.h"
#include "generic/hostname.h"
#include "generic/uname.h"
#include "NetworkIOMeter.h"
#include "ProcessLocksScreen.h"
#include "SignalsPanel.h"
#include "generic/hostname.h"
#include "generic/uname.h"
extern const ProcessField Platform_defaultFields[];

View File

@ -14,11 +14,11 @@ in the source distribution for its full text.
#include "Action.h"
#include "BatteryMeter.h"
#include "DiskIOMeter.h"
#include "generic/hostname.h"
#include "generic/uname.h"
#include "NetworkIOMeter.h"
#include "ProcessLocksScreen.h"
#include "SignalsPanel.h"
#include "generic/hostname.h"
#include "generic/uname.h"
extern const ProcessField Platform_defaultFields[];

View File

@ -30,13 +30,13 @@ 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"
#include "ProcessList.h"
#include "Settings.h"
#include "XUtils.h"
#include "generic/openzfs_sysctl.h"
#include "zfs/ZfsArcStats.h"

View File

@ -13,13 +13,13 @@ in the source distribution for its full text.
#include "Action.h"
#include "BatteryMeter.h"
#include "DiskIOMeter.h"
#include "generic/hostname.h"
#include "generic/uname.h"
#include "Meter.h"
#include "NetworkIOMeter.h"
#include "Process.h"
#include "ProcessLocksScreen.h"
#include "SignalsPanel.h"
#include "generic/hostname.h"
#include "generic/uname.h"
extern const ProcessField Platform_defaultFields[];

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include <stddef.h>
void Generic_hostname(char* buffer, size_t size);
#endif

View File

@ -9,6 +9,7 @@ in the source distribution for its full text.
#include "zfs/ZfsArcStats.h"
void openzfs_sysctl_init(ZfsArcStats* stats);
void openzfs_sysctl_updateArcStats(ZfsArcStats* stats);

View File

@ -61,18 +61,19 @@ static void parseOSRelease(char* buffer, size_t bufferLen) {
snprintf(buffer, bufferLen, "%s%s%s", name[0] ? name : "", name[0] && version[0] ? " " : "", version);
}
char* Generic_uname(void) {
static char savedString[
/* uname structure fields - manpages recommend sizeof */
sizeof(uname_info.sysname) +
sizeof(uname_info.release) +
sizeof(uname_info.machine) +
sizeof(((struct utsname*)0)->sysname) +
sizeof(((struct utsname*)0)->release) +
sizeof(((struct utsname*)0)->machine) +
16/*markup*/ +
128/*distro*/] = {'\0'};
static bool loaded_data = false;
if (!loaded_data) {
struct utsname uname_info;
int uname_result = uname(&uname_info);
char distro[128];

View File

@ -14,13 +14,13 @@ in the source distribution for its full text.
#include "Action.h"
#include "BatteryMeter.h"
#include "DiskIOMeter.h"
#include "generic/hostname.h"
#include "generic/uname.h"
#include "Meter.h"
#include "NetworkIOMeter.h"
#include "Process.h"
#include "ProcessLocksScreen.h"
#include "SignalsPanel.h"
#include "generic/hostname.h"
#include "generic/uname.h"
/* GNU/Hurd does not have PATH_MAX in limits.h */
#ifndef PATH_MAX

View File

@ -14,13 +14,13 @@ in the source distribution for its full text.
#include "Action.h"
#include "BatteryMeter.h"
#include "DiskIOMeter.h"
#include "generic/hostname.h"
#include "generic/uname.h"
#include "Meter.h"
#include "NetworkIOMeter.h"
#include "Process.h"
#include "ProcessLocksScreen.h"
#include "SignalsPanel.h"
#include "generic/hostname.h"
#include "generic/uname.h"
extern const ProcessField Platform_defaultFields[];

View File

@ -19,11 +19,11 @@ in the source distribution for its full text.
#include "Action.h"
#include "BatteryMeter.h"
#include "DiskIOMeter.h"
#include "generic/hostname.h"
#include "generic/uname.h"
#include "NetworkIOMeter.h"
#include "ProcessLocksScreen.h"
#include "SignalsPanel.h"
#include "generic/hostname.h"
#include "generic/uname.h"
#define kill(pid, signal) kill(pid / 1024, signal)