diff options
-rw-r--r-- | include/settings.h | 2 | ||||
-rw-r--r-- | src/daemon/settings.c | 6 | ||||
-rw-r--r-- | src/daemon/settings_private.h | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/include/settings.h b/include/settings.h index f4bb914..72addd0 100644 --- a/include/settings.h +++ b/include/settings.h @@ -2,6 +2,7 @@ * Usurpation – server daemon settings handling, header * * Copyright (C) 2019 Gediminas Jakutis + * Copyright (C) 2019 Ramūnas Mažeikis * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,5 +25,6 @@ void settings_init(void); int setting_detach(void); unsigned short int setting_port(void); +int setting_verbose(void); #endif /* USURPATION_SETTINGS_H */ diff --git a/src/daemon/settings.c b/src/daemon/settings.c index 9c4011f..622915a 100644 --- a/src/daemon/settings.c +++ b/src/daemon/settings.c @@ -2,6 +2,7 @@ * Usurpation – server daemon settings handling * * Copyright (C) 2019 Gediminas Jakutis + * Copyright (C) 2019 Ramūnas Mažeikis * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -36,6 +37,11 @@ int setting_detach(void) return test_flag(flag_daemonize); } +int setting_verbose(void) +{ + return test_flag(flag_verbose); +} + unsigned short int setting_port(void) { return settings.port; diff --git a/src/daemon/settings_private.h b/src/daemon/settings_private.h index 57ad24c..336c151 100644 --- a/src/daemon/settings_private.h +++ b/src/daemon/settings_private.h @@ -2,6 +2,7 @@ * Usurpation – server daemon settings handling, private header * * Copyright (C) 2019 Gediminas Jakutis + * Copyright (C) 2019 Ramūnas Mažeikis * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,6 +23,7 @@ #define USURPATION_SETTINGS_PRIVATE_H static const unsigned int flag_daemonize = 1 << 0; /* 1st bit */ +static const unsigned int flag_verbose = 1 << 1; static struct settings { unsigned int flags; |