X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=backend.c;h=c3c3087a9d11315a28744db990cc6da4bf31f7f2;hb=cc8a7d250cf7daff452ce376224c9853529204ca;hp=eb23ad229bd36238380b17fd4c37a89a636ed8a9;hpb=01d9dc35ad8ba6817170ac9cca6c7e4fce989b78;p=libsigrok.git diff --git a/backend.c b/backend.c index eb23ad22..c3c3087a 100644 --- a/backend.c +++ b/backend.c @@ -19,14 +19,27 @@ #include #include +#include +/** + * Initialize libsigrok. + * + * @return SR_OK upon success, a (negative) error code otherwise. + */ int sr_init(void) { return load_hwplugins(); } -/* TODO: Should return int to be able to report back error codes. */ -void sr_exit(void) +/** + * Shutdown libsigrok. + * + * @return SR_OK upon success, a (negative) error code otherwise. + */ +int sr_exit(void) { - device_close_all(); + + sr_cleanup_hwplugins(); + + return SR_OK; }