]> sigrok.org Git - libsigrok.git/blobdiff - src/error.c
Constify a lot more items.
[libsigrok.git] / src / error.c
index d4e22d5ae5ea42ac08e610455e34f7d3130d6e3f..fcdfe5debbebcebbf92773c582b1eb246634e7fc 100644 (file)
@@ -18,7 +18,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#include "libsigrok.h"
+#include <config.h>
+#include <libsigrok/libsigrok.h>
 
 /**
  * @file
@@ -58,8 +59,6 @@ SR_API const char *sr_strerror(int error_code)
         */
 
        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:
@@ -82,6 +81,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";
        }
@@ -113,8 +114,6 @@ SR_API const char *sr_strerror_name(int error_code)
         */
 
        switch (error_code) {
-       case SR_OK_CONTINUE:
-               return "SR_OK_CONTINUE";
        case SR_OK:
                return "SR_OK";
        case SR_ERR:
@@ -137,6 +136,8 @@ SR_API const char *sr_strerror_name(int error_code)
                return "SR_ERR_CHANNEL_GROUP";
        case SR_ERR_DATA:
                return "SR_ERR_DATA";
+       case SR_ERR_IO:
+               return "SR_ERR_IO";
        default:
                return "unknown error code";
        }