afb-args: Fix output of --version 40/21840/1
authorJosé Bollo <jose.bollo@iot.bzh>
Tue, 9 Jul 2019 16:05:31 +0000 (18:05 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 9 Jul 2019 16:07:57 +0000 (18:07 +0200)
The legacy V1 and V2 versions of bindings are no
more printed if absent.

The support of dynamic bindings is fixed.

Bug-AGL: SPEC-2617

Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Change-Id: I429c0e2cdfcbfba6e0f1e639dbcbc2ca90a345ed

src/afb-args.c

index 6036074..50bdc97 100644 (file)
@@ -375,29 +375,21 @@ static void printVersion(FILE * file)
 
                "["
 #if WITH_DYNAMIC_BINDING
-               "BINDINGS "
                "+"
 #else
                "-"
 #endif
+               "BINDINGS "
 #if WITH_LEGACY_BINDING_V1
-               "+"
-#else
-               "-"
+               "+V1 "
 #endif
-               "V1 "
 #if WITH_LEGACY_BINDING_VDYN
-               "+"
-#else
-               "-"
+               "+VDYN "
 #endif
-               "VDYN "
 #if WITH_LEGACY_BINDING_V2
-               "+"
-#else
-               "-"
+               "+V2 "
 #endif
-               "V2 +V3]\n"
+               "+V3]\n"
                "\n",
                AFB_VERSION
        );