aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-07-12 14:21:50 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-07-13 12:19:11 +0200
commit889d3adeaf5572cb87cc005c18f9fdf74f1b9cab (patch)
tree69022807b1ada1394323d53f7017eb371289c4b1
parent93d8d6f69399dacbb43c0780ebccc378b4f44880 (diff)
afb-config: Fix wrong error message and more info
The wrong value of the log option wasn't displayed. The output of --version now prints more compile options. Change-Id: I09b8b66279a10cd4b2b6d460b3dbaeb370b3dadd Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afb-config.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/afb-config.c b/src/afb-config.c
index aa223e60..3029777d 100644
--- a/src/afb-config.c
+++ b/src/afb-config.c
@@ -52,6 +52,21 @@
#else
# define HAS_DBUS 0
#endif
+#if defined(WITH_LEGACY_BINDING_V1)
+# define HAS_BINDING_V1 1
+#else
+# define HAS_BINDING_V1 0
+#endif
+#if defined(WITH_LEGACY_BINDING_VDYN)
+# define HAS_BINDING_VDYN 1
+#else
+# define HAS_BINDING_VDYN 0
+#endif
+#if defined(WITH_SUPERVISION)
+# define HAS_SUPERVISION 1
+#else
+# define HAS_SUPERVISION 0
+#endif
/**
* The default timeout of sessions in seconds
@@ -305,11 +320,14 @@ static void printVersion(FILE * file)
static char pm[2] = { '-', '+' };
fprintf(file,
"\n"
- " AGL Framework Binder [AFB %s] %cDBUS %cMONITOR\n"
+ " AGL Framework Binder [AFB %s] %cDBUS %cMONITOR %cSUPERVISION [BINDINGS %cV1 %cVDYN +V2 +V3]\n"
"\n",
AFB_VERSION,
pm[HAS_DBUS],
- pm[HAS_MONITORING]
+ pm[HAS_MONITORING],
+ pm[HAS_SUPERVISION],
+ pm[HAS_BINDING_V1],
+ pm[HAS_BINDING_VDYN]
);
fprintf(file,
" Copyright (C) 2015-2018 \"IoT.bzh\"\n"
@@ -534,7 +552,7 @@ static void set_log(char *args)
*p = 0;
lvl = verbose_level_of_name(i);
if (lvl < 0) {
- i = strdupa(p);
+ i = strdupa(i);
*p = s;
ERROR("Bad log name '%s' in %s", i, args);
exit(1);