sr_exit(): Return int to be able to report errors.

This commit is contained in:
Uwe Hermann 2011-02-22 18:13:32 +01:00
parent f5a443f27a
commit cd009d5561
2 changed files with 14 additions and 3 deletions

View File

@ -21,13 +21,24 @@
#include <sigrok.h>
#include <sigrok-internal.h>
/**
* 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)
{
sr_device_close_all();
return SR_OK;
}

View File

@ -23,7 +23,7 @@
/*--- backend.c -------------------------------------------------------------*/
int sr_init(void);
void sr_exit(void);
int sr_exit(void);
/*--- datastore.c -----------------------------------------------------------*/