sr_exit(): Return int to be able to report errors.
This commit is contained in:
parent
f5a443f27a
commit
cd009d5561
15
backend.c
15
backend.c
|
@ -21,13 +21,24 @@
|
||||||
#include <sigrok.h>
|
#include <sigrok.h>
|
||||||
#include <sigrok-internal.h>
|
#include <sigrok-internal.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize libsigrok.
|
||||||
|
*
|
||||||
|
* @return SR_OK upon success, a (negative) error code otherwise.
|
||||||
|
*/
|
||||||
int sr_init(void)
|
int sr_init(void)
|
||||||
{
|
{
|
||||||
return load_hwplugins();
|
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();
|
sr_device_close_all();
|
||||||
|
|
||||||
|
return SR_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
/*--- backend.c -------------------------------------------------------------*/
|
/*--- backend.c -------------------------------------------------------------*/
|
||||||
|
|
||||||
int sr_init(void);
|
int sr_init(void);
|
||||||
void sr_exit(void);
|
int sr_exit(void);
|
||||||
|
|
||||||
/*--- datastore.c -----------------------------------------------------------*/
|
/*--- datastore.c -----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue