gadget: Add printing configs on recursive gadget show
authorPawel Szewczyk <p.szewczyk@samsung.com>
Tue, 11 Aug 2015 14:39:27 +0000 (16:39 +0200)
committerPawel Szewczyk <p.szewczyk@samsung.com>
Mon, 21 Sep 2015 15:24:36 +0000 (17:24 +0200)
Change-Id: I772387a06a1ada66c4421cb1b90336fc54ad3925
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
source/gadget/CMakeLists.txt
source/gadget/src/gadget_libusbg.c

index 5120fa6..6287620 100644 (file)
@@ -1,6 +1,7 @@
 
 INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/include
-                       ${CMAKE_SOURCE_DIR}/function/include )
+                       ${CMAKE_SOURCE_DIR}/function/include
+                       ${CMAKE_SOURCE_DIR}/config/include )
 
 SET( GADGET_SRC
        ${CMAKE_CURRENT_SOURCE_DIR}/src/gadget.c
index 1930ac2..7fb1ebd 100644 (file)
@@ -24,6 +24,7 @@
 #include "common.h"
 #include "settings.h"
 #include "function.h"
+#include "configuration.h"
 
 /**
  * @brief Get implicite gadget
@@ -290,6 +291,7 @@ static int print_gadget(usbg_gadget *g, int opts)
        usbg_gadget_attrs g_attrs;
        usbg_udc *u;
        usbg_function *f;
+       usbg_config *c;
        int usbg_ret;
        const char *name;
 
@@ -328,7 +330,9 @@ static int print_gadget(usbg_gadget *g, int opts)
                        gt_print_function_libusbg(f, opts);
                }
 
-               /* TODO print config */
+               usbg_for_each_config(c, g) {
+                       gt_print_config_libusbg(c, opts);
+               }
        }
 
        return 0;