summaryrefslogtreecommitdiff
path: root/lib/configfs.c
AgeCommit message (Collapse)Author
2018-07-31lib: configfs: Detect configfs mount pointKieran Bingham
Parse /proc/mounts to identify the correct mount location of the ConfigFS filesystem. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-07-31lib: configfs: Globalize nested configfs callback functionsPaul Elder
Android now uses clang as the default C compiler, and gcc support is deprecated. clang doesn't support nested functions, which were used to implement callback functions in the ConfigFS code. We thus move the callbacks to the global scope. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-07-31lib: configfs: Fix asprintf return value usageKieran Bingham
The asprintf function returns -1, and leaves the first parameter undefined in case of an allocation error. This conflicts with the code's assumption that the parameter is set NULL on error. Check all return values of asprintf, and ensure that the string parameter is not used as a return value on error paths. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-06-12Split UVC gadget into a library and test applicationLaurent Pinchart
Split the project into a UVC gadget library and a test application. To avoid rolling out a custom build system, switch to CMake. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>