Skip to content

Commit

Permalink
Update all Platforms to support FlexMeter
Browse files Browse the repository at this point in the history
Signed-off-by: Stoyan Bogdanov <[email protected]>
  • Loading branch information
bogdanovs committed Jan 9, 2025
1 parent f10d435 commit 71eed8e
Show file tree
Hide file tree
Showing 18 changed files with 28 additions and 23 deletions.
3 changes: 2 additions & 1 deletion darwin/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ in the source distribution for its full text.
#include "DateMeter.h"
#include "DateTimeMeter.h"
#include "FileDescriptorMeter.h"
#include "FlexMeter.h"
#include "HostnameMeter.h"
#include "LoadAverageMeter.h"
#include "Macros.h"
Expand Down Expand Up @@ -112,7 +113,7 @@ const SignalItem Platform_signals[] = {

const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);

const MeterClass* const Platform_meterTypes[] = {
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
&CPUMeter_class,
&ClockMeter_class,
&DateMeter_class,
Expand Down
2 changes: 1 addition & 1 deletion darwin/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern const SignalItem Platform_signals[];

extern const unsigned int Platform_numberOfSignals;

extern const MeterClass* const Platform_meterTypes[];
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];

bool Platform_init(void);

Expand Down
4 changes: 2 additions & 2 deletions dragonflybsd/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ in the source distribution for its full text.
#include "DateMeter.h"
#include "DateTimeMeter.h"
#include "FileDescriptorMeter.h"
#include "FlexMeter.h"
#include "HostnameMeter.h"
#include "LoadAverageMeter.h"
#include "Macros.h"
Expand All @@ -43,7 +44,6 @@ in the source distribution for its full text.
#include "dragonflybsd/DragonFlyBSDProcessTable.h"
#include "generic/fdstat_sysctl.h"


const ScreenDefaults Platform_defaultScreens[] = {
{
.name = "Main",
Expand Down Expand Up @@ -93,7 +93,7 @@ const SignalItem Platform_signals[] = {

const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);

const MeterClass* const Platform_meterTypes[] = {
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
&CPUMeter_class,
&ClockMeter_class,
&DateMeter_class,
Expand Down
2 changes: 1 addition & 1 deletion dragonflybsd/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extern const SignalItem Platform_signals[];

extern const unsigned int Platform_numberOfSignals;

extern const MeterClass* const Platform_meterTypes[];
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];

bool Platform_init(void);

Expand Down
3 changes: 2 additions & 1 deletion freebsd/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ in the source distribution for its full text.
#include "DateTimeMeter.h"
#include "DiskIOMeter.h"
#include "FileDescriptorMeter.h"
#include "FlexMeter.h"
#include "HostnameMeter.h"
#include "LoadAverageMeter.h"
#include "Machine.h"
Expand Down Expand Up @@ -100,7 +101,7 @@ const SignalItem Platform_signals[] = {

const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);

const MeterClass* const Platform_meterTypes[] = {
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
&CPUMeter_class,
&ClockMeter_class,
&DateMeter_class,
Expand Down
2 changes: 1 addition & 1 deletion freebsd/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern const SignalItem Platform_signals[];

extern const unsigned int Platform_numberOfSignals;

extern const MeterClass* const Platform_meterTypes[];
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];

bool Platform_init(void);

Expand Down
3 changes: 2 additions & 1 deletion linux/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ in the source distribution for its full text.
#include "DateTimeMeter.h"
#include "DiskIOMeter.h"
#include "FileDescriptorMeter.h"
#include "FlexMeter.h"
#include "HostnameMeter.h"
#include "HugePageMeter.h"
#include "LoadAverageMeter.h"
Expand Down Expand Up @@ -209,7 +210,7 @@ void Platform_setBindings(Htop_Action* keys) {
keys[KEY_F(20)] = Platform_actionHigherAutogroupPriority; // Shift-F8
}

const MeterClass* const Platform_meterTypes[] = {
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
&CPUMeter_class,
&ClockMeter_class,
&DateMeter_class,
Expand Down
3 changes: 2 additions & 1 deletion linux/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ extern const SignalItem Platform_signals[];

extern const unsigned int Platform_numberOfSignals;

extern const MeterClass* const Platform_meterTypes[];
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];


bool Platform_init(void);
void Platform_done(void);
Expand Down
3 changes: 2 additions & 1 deletion netbsd/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ in the source distribution for its full text.
#include "DateMeter.h"
#include "DateTimeMeter.h"
#include "FileDescriptorMeter.h"
#include "FlexMeter.h"
#include "HostnameMeter.h"
#include "LoadAverageMeter.h"
#include "Macros.h"
Expand Down Expand Up @@ -152,7 +153,7 @@ const SignalItem Platform_signals[] = {

const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);

const MeterClass* const Platform_meterTypes[] = {
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
&CPUMeter_class,
&ClockMeter_class,
&DateMeter_class,
Expand Down
2 changes: 1 addition & 1 deletion netbsd/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extern const SignalItem Platform_signals[];

extern const unsigned int Platform_numberOfSignals;

extern const MeterClass* const Platform_meterTypes[];
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];

bool Platform_init(void);

Expand Down
4 changes: 2 additions & 2 deletions openbsd/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ in the source distribution for its full text.
#include "DateMeter.h"
#include "DateTimeMeter.h"
#include "FileDescriptorMeter.h"
#include "FlexMeter.h"
#include "HostnameMeter.h"
#include "LoadAverageMeter.h"
#include "Macros.h"
Expand All @@ -47,7 +48,6 @@ in the source distribution for its full text.
#include "openbsd/OpenBSDMachine.h"
#include "openbsd/OpenBSDProcess.h"


const ScreenDefaults Platform_defaultScreens[] = {
{
.name = "Main",
Expand Down Expand Up @@ -100,7 +100,7 @@ const SignalItem Platform_signals[] = {

const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);

const MeterClass* const Platform_meterTypes[] = {
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
&CPUMeter_class,
&ClockMeter_class,
&DateMeter_class,
Expand Down
2 changes: 1 addition & 1 deletion openbsd/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extern const SignalItem Platform_signals[];

extern const unsigned int Platform_numberOfSignals;

extern const MeterClass* const Platform_meterTypes[];
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];

bool Platform_init(void);

Expand Down
4 changes: 2 additions & 2 deletions pcp/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ in the source distribution for its full text.
#include "DynamicMeter.h"
#include "DynamicScreen.h"
#include "FileDescriptorMeter.h"
#include "FlexMeter.h"
#include "HostnameMeter.h"
#include "LoadAverageMeter.h"
#include "Macros.h"
Expand Down Expand Up @@ -55,7 +56,6 @@ in the source distribution for its full text.
#include "zfs/ZfsArcStats.h"
#include "zfs/ZfsCompressedArcMeter.h"


Platform* pcp;

const ScreenDefaults Platform_defaultScreens[] = {
Expand All @@ -79,7 +79,7 @@ const SignalItem Platform_signals[] = {

const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);

const MeterClass* const Platform_meterTypes[] = {
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
&CPUMeter_class,
&DynamicMeter_class,
&ClockMeter_class,
Expand Down
2 changes: 1 addition & 1 deletion pcp/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extern const SignalItem Platform_signals[];

extern const unsigned int Platform_numberOfSignals;

extern const MeterClass* const Platform_meterTypes[];
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];

bool Platform_init(void);

Expand Down
4 changes: 2 additions & 2 deletions solaris/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ in the source distribution for its full text.
#include "ClockMeter.h"
#include "DateMeter.h"
#include "DateTimeMeter.h"
#include "FlexMeter.h"
#include "HostnameMeter.h"
#include "SysArchMeter.h"
#include "UptimeMeter.h"
Expand All @@ -43,7 +44,6 @@ in the source distribution for its full text.
#include "zfs/ZfsArcMeter.h"
#include "zfs/ZfsCompressedArcMeter.h"


const ScreenDefaults Platform_defaultScreens[] = {
{
.name = "Default",
Expand Down Expand Up @@ -101,7 +101,7 @@ const SignalItem Platform_signals[] = {

const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);

const MeterClass* const Platform_meterTypes[] = {
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
&CPUMeter_class,
&ClockMeter_class,
&DateMeter_class,
Expand Down
2 changes: 1 addition & 1 deletion solaris/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extern const SignalItem Platform_signals[];

extern const unsigned int Platform_numberOfSignals;

extern const MeterClass* const Platform_meterTypes[];
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];

bool Platform_init(void);

Expand Down
4 changes: 2 additions & 2 deletions unsupported/Platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ in the source distribution for its full text.
#include "DateMeter.h"
#include "DateTimeMeter.h"
#include "FileDescriptorMeter.h"
#include "FlexMeter.h"
#include "HostnameMeter.h"
#include "LoadAverageMeter.h"
#include "Macros.h"
Expand All @@ -27,7 +28,6 @@ in the source distribution for its full text.
#include "TasksMeter.h"
#include "UptimeMeter.h"


const ScreenDefaults Platform_defaultScreens[] = {
{
.name = "Main",
Expand All @@ -44,7 +44,7 @@ const SignalItem Platform_signals[] = {

const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);

const MeterClass* const Platform_meterTypes[] = {
const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS] = {
&CPUMeter_class,
&ClockMeter_class,
&DateMeter_class,
Expand Down
2 changes: 1 addition & 1 deletion unsupported/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern const SignalItem Platform_signals[];

extern const unsigned int Platform_numberOfSignals;

extern const MeterClass* const Platform_meterTypes[];
extern const MeterClass* Platform_meterTypes[MAX_PLATFORM_METERS];

bool Platform_init(void);

Expand Down

0 comments on commit 71eed8e

Please sign in to comment.