mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Minor cleanups to platform-specific init and done
Move platform-specific code out of the htop.c main function and into the platform sub-directories - primarily this is the Linux procfs path check and sensors setup/teardown; not needed on any other platforms. No functional changes here.
This commit is contained in:
@ -89,10 +89,6 @@ const SignalItem Platform_signals[] = {
|
||||
|
||||
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
|
||||
|
||||
void Platform_setBindings(Htop_Action* keys) {
|
||||
(void) keys;
|
||||
}
|
||||
|
||||
const MeterClass* const Platform_meterTypes[] = {
|
||||
&CPUMeter_class,
|
||||
&ClockMeter_class,
|
||||
@ -122,6 +118,19 @@ const MeterClass* const Platform_meterTypes[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
void Platform_init(void) {
|
||||
/* no platform-specific setup needed */
|
||||
}
|
||||
|
||||
void Platform_done(void) {
|
||||
/* no platform-specific cleanup needed */
|
||||
}
|
||||
|
||||
void Platform_setBindings(Htop_Action* keys) {
|
||||
/* no platform-specific key bindings */
|
||||
(void) keys;
|
||||
}
|
||||
|
||||
// preserved from FreeBSD port
|
||||
int Platform_getUptime() {
|
||||
struct timeval bootTime, currTime;
|
||||
|
Reference in New Issue
Block a user