Dear Matt, Please excuse me my passivity after discussuon about libusbg some time ago. I had to close some other issues before taking up this one. Recently I looked into code of libusbg, build it and found some errors which are fixed in attached patches. Moreover I have done some clean up and minor refactoring. I hope that you will accept enclosed patched and update the repository. -- Best regards, Krzysztof Opasiak Samsung R&D Institute Poland Samsung Electronics --- Changes since v1: - replace memcpy with direct structure assignment - Change goto lables on more meaningful in example - Remove additional check in gadget_read_string Krzysztof Opasiak (12): libusbg: Surround header with include guards. libusbg: Add missing return statement in non-void functions. libusbg: Fix gadget-acm-ecm example to cleanup at exit. libusbg: Move directory creation before writing attributes. libusbg: Fix memory leak when unable to create directory. libusbg: Add error handling to gadget_read_string. libusbg: Add missing config attrs parsing while new config creation. libusbg: Separate parsing gadget attributes and strings. libusbg: Initialize gadget attributes and strings while gadget creation libusbg: Move symlink creation after memory allocation. libusbg: Replace memcpy with structure assign. libusbg: Replace directory names with defines. examples/gadget-acm-ecm.c | 20 ++++----- include/gadget/gadget.h | 4 ++ src/gadget.c | 110 +++++++++++++++++++++++++++++---------------- 3 files changed, 86 insertions(+), 48 deletions(-) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html