diff options
author | 2019-04-09 16:43:37 +0300 | |
---|---|---|
committer | 2019-04-09 16:43:37 +0300 | |
commit | 66dea0ba9ac413819059606c748cb5446ccbb5d1 (patch) | |
tree | 6faf48f973b222103fdfb3639b4fa5f56f5af2d7 /src/daemon | |
parent | bb736d606a28d4ab7d6d8d9f939c003fdf273274 (diff) | |
download | usurpation-66dea0ba9ac413819059606c748cb5446ccbb5d1.tar.gz usurpation-66dea0ba9ac413819059606c748cb5446ccbb5d1.tar.bz2 usurpation-66dea0ba9ac413819059606c748cb5446ccbb5d1.zip |
daemon: added verbose flag.
Stub implementation.
This commit closes ticket 23.
Signed-off-by: Ramūnas Mažeikis <ramunasnezinomas@gmail.com>
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/settings.c | 6 | ||||
-rw-r--r-- | src/daemon/settings_private.h | 2 |
2 files changed, 8 insertions, 0 deletions
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; |