summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2014-02-28 11:53:02 +0100
committerKrzysztof Opasiak <k.opasiak@samsung.com>2015-12-22 20:35:21 +0100
commit709c04fab9ba0c33d194df972ec1d7eb5d8640d1 (patch)
tree6b21e2d8e10b5f8e99a65d1999624cc63b995024 /examples
parent5ab3f478654c4a4a060b1b690ceec1037b2eb2af (diff)
downloadlibusbg-709c04fab9ba0c33d194df972ec1d7eb5d8640d1.tar.gz
libusbg-709c04fab9ba0c33d194df972ec1d7eb5d8640d1.tar.bz2
libusbg-709c04fab9ba0c33d194df972ec1d7eb5d8640d1.zip
libusbgx: Add return value to config related functions.
Each usbg_set_config_*() may fail so it should have a return value to notify user about reason of failure. To be consistent with rest of API usbg_create_config() should also return error code to notify user about reasons of failure instead of binary information (NULL or not). Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> [Port from libusbg and update description] Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/gadget-acm-ecm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/gadget-acm-ecm.c b/examples/gadget-acm-ecm.c
index 678514c..cda3808 100644
--- a/examples/gadget-acm-ecm.c
+++ b/examples/gadget-acm-ecm.c
@@ -87,8 +87,8 @@ int main(void)
goto out2;
}
- c = usbg_create_config(g, "c.1", NULL /* use defaults */, &c_strs);
- if (!c) {
+ usbg_ret = usbg_create_config(g, "c.1", NULL /* use defaults */, &c_strs, &c);
+ if (usbg_ret != USBG_SUCCESS) {
fprintf(stderr, "Error creating config\n");
goto out2;
}