This brings error reporting back to the usual: either return codes
are SR_OK (0) or they are < 1 indicating an error.
This fixes bug #633.
/** Status/error codes returned by libsigrok functions. */
enum sr_error_code {
- SR_OK_CONTINUE = 1, /**< Keep going. */
SR_OK = 0, /**< No error. */
SR_ERR = -1, /**< Generic/unspecified error. */
SR_ERR_MALLOC = -2, /**< Malloc/calloc/realloc error. */
*/
switch (error_code) {
- case SR_OK_CONTINUE:
- return "not enough data to decide error status yet";
case SR_OK:
return "no error";
case SR_ERR:
*/
switch (error_code) {
- case SR_OK_CONTINUE:
- return "SR_OK_CONTINUE";
case SR_OK:
return "SR_OK";
case SR_ERR: