From 2ef70ad7f692686710091132978129b614f6dd1a Mon Sep 17 00:00:00 2001 From: Volodymyr Vasiutyk Date: Wed, 6 Oct 2021 10:45:07 +0300 Subject: Early program termination only from main() --- netbsd/Platform.c | 3 ++- netbsd/Platform.h | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'netbsd') diff --git a/netbsd/Platform.c b/netbsd/Platform.c index ac814642..3b27548d 100644 --- a/netbsd/Platform.c +++ b/netbsd/Platform.c @@ -174,8 +174,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/netbsd/Platform.h b/netbsd/Platform.h index 1d1115e7..e650bcda 100644 --- a/netbsd/Platform.h +++ b/netbsd/Platform.h @@ -24,6 +24,7 @@ in the source distribution for its full text. #include "Process.h" #include "ProcessLocksScreen.h" #include "SignalsPanel.h" +#include "CommandLine.h" #include "generic/gettime.h" #include "generic/hostname.h" #include "generic/uname.h" @@ -42,7 +43,7 @@ extern const unsigned int Platform_numberOfSignals; extern const MeterClass* const Platform_meterTypes[]; -void Platform_init(void); +bool Platform_init(void); void Platform_done(void); @@ -82,8 +83,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) { -- cgit v1.2.3