]> sigrok.org Git - libsigrok.git/blobdiff - error.c
error.c: Add SR_ERR_DEV_CLOSED.
[libsigrok.git] / error.c
diff --git a/error.c b/error.c
index ce1b0401ddbad2a8dc2aeb54d4d62335ec2db31d..d7d792d53bd5f8c6c7dd53170c723648404a8e97 100644 (file)
--- a/error.c
+++ b/error.c
@@ -55,7 +55,7 @@ SR_API const char *sr_strerror(int error_code)
        const char *str;
 
        /*
-        * Note: All defined SR_* error macros from libsigrok.h should have
+        * Note: All defined SR_* error macros from libsigrok.h must have
         * an entry in this function, as well as in sr_strerror_name().
         */
 
@@ -81,6 +81,9 @@ SR_API const char *sr_strerror(int error_code)
        case SR_ERR_NA:
                str = "not applicable";
                break;
+       case SR_ERR_DEV_CLOSED:
+               str = "device closed but should be open";
+               break;
        default:
                str = "unknown error";
                break;
@@ -112,7 +115,7 @@ SR_API const char *sr_strerror_name(int error_code)
        const char *str;
 
        /*
-        * Note: All defined SR_* error macros from libsigrok.h should have
+        * Note: All defined SR_* error macros from libsigrok.h must have
         * an entry in this function, as well as in sr_strerror().
         */
 
@@ -138,6 +141,9 @@ SR_API const char *sr_strerror_name(int error_code)
        case SR_ERR_NA:
                str = "SR_ERR_NA";
                break;
+       case SR_ERR_DEV_CLOSED:
+               str = "SR_ERR_DEV_CLOSED";
+               break;
        default:
                str = "unknown error code";
                break;