summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-02-13 09:29:12 +0100
committerHans Dedecker <dedeckeh@gmail.com>2017-02-13 09:40:37 +0100
commit51c756cfc15c63322df9fdb70d5c701cfb6b9a9f (patch)
treeeefe419dc38472fa5237bb23916fbcc9815870f6 /src
parent68ee0b59040625d2ab5830b1c1cc8eca2da0dcf1 (diff)
odhcpd: display correct default log level in usage text
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/odhcpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/odhcpd.c b/src/odhcpd.c
index ed96178..9a76e4d 100644
--- a/src/odhcpd.c
+++ b/src/odhcpd.c
@@ -52,7 +52,7 @@
static int ioctl_sock;
static struct nl_sock *rtnl_socket = NULL;
static int urandom_fd = -1;
-
+static int log_level = LOG_INFO;
static void sighandler(_unused int signal)
{
@@ -65,7 +65,7 @@ static void print_usage(const char *app)
"== %s Usage ==\n\n"
" -h, --help Print this help\n"
" -l level Specify log level 0..7 (default %d)\n",
- app, LOG_WARNING
+ app, log_level
);
}
@@ -73,7 +73,7 @@ int main(int argc, char **argv)
{
openlog("odhcpd", LOG_PERROR | LOG_PID, LOG_DAEMON);
int opt;
- int log_level = LOG_INFO;
+
while ((opt = getopt(argc, argv, "hl:")) != -1) {
switch (opt) {
case 'h':