summaryrefslogtreecommitdiffstats
path: root/solaris
diff options
context:
space:
mode:
authorVolodymyr Vasiutyk <volodymyr.vasiutyk@gmail.com>2021-10-06 10:45:07 +0300
committerBenBE <BenBE@geshi.org>2021-10-31 15:07:00 +0100
commit2ef70ad7f692686710091132978129b614f6dd1a (patch)
tree448c24ac798a6ab5bc18ac37cd9517bddc9f3a73 /solaris
parent2977414d540c9cb78baa3d7fc612fcb4d6ecc72f (diff)
Early program termination only from main()
Diffstat (limited to 'solaris')
-rw-r--r--solaris/Platform.c3
-rw-r--r--solaris/Platform.h7
2 files changed, 6 insertions, 4 deletions
diff --git a/solaris/Platform.c b/solaris/Platform.c
index eabbab59..cdc79ae4 100644
--- a/solaris/Platform.c
+++ b/solaris/Platform.c
@@ -122,8 +122,9 @@ const MeterClass* const Platform_meterTypes[] = {
NULL
};
-void Platform_init(void) {
+bool Platform_init(void) {
/* no platform-specific setup needed */
+ return true;
}
void Platform_done(void) {
diff --git a/solaris/Platform.h b/solaris/Platform.h
index a60b9784..b140788d 100644
--- a/solaris/Platform.h
+++ b/solaris/Platform.h
@@ -35,6 +35,7 @@ in the source distribution for its full text.
#include "NetworkIOMeter.h"
#include "ProcessLocksScreen.h"
#include "SignalsPanel.h"
+#include "CommandLine.h"
#include "generic/gettime.h"
#include "generic/hostname.h"
#include "generic/uname.h"
@@ -59,7 +60,7 @@ extern const ProcessField Platform_defaultFields[];
extern const MeterClass* const Platform_meterTypes[];
-void Platform_init(void);
+bool Platform_init(void);
void Platform_done(void);
@@ -105,8 +106,8 @@ static inline void Platform_getRelease(char** string) {
static inline void Platform_longOptionsUsage(ATTR_UNUSED const char* name) { }
-static inline bool Platform_getLongOption(ATTR_UNUSED int opt, ATTR_UNUSED int argc, ATTR_UNUSED char** argv) {
- return false;
+static inline CommandLineStatus Platform_getLongOption(ATTR_UNUSED int opt, ATTR_UNUSED int argc, ATTR_UNUSED char** argv) {
+ return STATUS_ERROR_EXIT;
}
static inline void Platform_gettime_realtime(struct timeval* tv, uint64_t* msec) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy