SR_ERR_IO: new error code

Add new error code which can be used to notify the user about
general input/output errors.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
Bartosz Golaszewski 2015-02-09 18:31:14 +01:00 committed by Uwe Hermann
parent 3cdff6cd2d
commit 3c5582595a
2 changed files with 3 additions and 0 deletions

View File

@ -76,6 +76,7 @@ enum sr_error_code {
SR_ERR_TIMEOUT = -8, /**< A timeout occurred. */
SR_ERR_CHANNEL_GROUP = -9, /**< A channel group must be specified. */
SR_ERR_DATA =-10, /**< Data is invalid. */
SR_ERR_IO =-11, /**< Input/output error. */
/*
* Note: When adding entries here, don't forget to also update the

View File

@ -82,6 +82,8 @@ SR_API const char *sr_strerror(int error_code)
return "no channel group specified";
case SR_ERR_DATA:
return "data is invalid";
case SR_ERR_IO:
return "input/output error";
default:
return "unknown error";
}