[Openvpn-devel] Changes open vpn exit code defines

Message ID 20220917140518.2497-1-a@unstable.cc
State Changes Requested
Headers show
Series [Openvpn-devel] Changes open vpn exit code defines | expand

Commit Message

Antonio Quartulli Sept. 17, 2022, 4:05 a.m. UTC
From: Alexandr Kutashov <kutashov.alexandr@yandex.ru>

It's better to have distinct enums for more straightforward debug of exit function.

Signed-off-by: Alexandr Kutashov <kutashov.alexandr@yandex.ru>
---
 src/openvpn/error.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Gert Doering Sept. 17, 2022, 4:40 a.m. UTC | #1
Hi,

On Sat, Sep 17, 2022 at 04:05:18PM +0200, Antonio Quartulli wrote:
> From: Alexandr Kutashov <kutashov.alexandr@yandex.ru>
> 
> It's better to have distinct enums for more straightforward debug of exit function.
> 
> Signed-off-by: Alexandr Kutashov <kutashov.alexandr@yandex.ru>

Not sure this is important.  But if we do so, we should document which
exit code means what (outside error.h)

gert

Patch

diff --git a/src/openvpn/error.h b/src/openvpn/error.h
index 89adb3e6..6289c0d8 100644
--- a/src/openvpn/error.h
+++ b/src/openvpn/error.h
@@ -58,8 +58,8 @@  struct gc_arena;
 
 #define OPENVPN_EXIT_STATUS_GOOD                    0
 #define OPENVPN_EXIT_STATUS_ERROR                   1
-#define OPENVPN_EXIT_STATUS_USAGE                   1
-#define OPENVPN_EXIT_STATUS_CANNOT_OPEN_DEBUG_FILE  1
+#define OPENVPN_EXIT_STATUS_USAGE                   2
+#define OPENVPN_EXIT_STATUS_CANNOT_OPEN_DEBUG_FILE  3
 
 /*
  * Special command line debugging mode.