Signed-off-by: Krzysztof Opasiak <[email protected]>
---
include/usbg/usbg.h | 4 ++++
src/usbg.c | 24 ++++++++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/include/usbg/usbg.h b/include/usbg/usbg.h
index 3a66ae3..3d3cba0 100644
--- a/include/usbg/usbg.h
+++ b/include/usbg/usbg.h
@@ -217,6 +217,10 @@ typedef enum {
USBG_ERROR_BUSY = -8,
USBG_ERROR_NOT_SUPPORTED = -9,
USBG_ERROR_PATH_TOO_LONG = -10,
+ USBG_ERROR_INVALID_FORMAT = -11,
+ USBG_ERROR_MISSING_TAG = -12,
+ USBG_ERROR_INVALID_TYPE = -13,
+ USBG_ERROR_INVALID_VALUE = -14,
USBG_ERROR_OTHER_ERROR = -99
} usbg_error;
diff --git a/src/usbg.c b/src/usbg.c
index 764cc03..f6841f4 100644
--- a/src/usbg.c
+++ b/src/usbg.c
@@ -226,6 +226,18 @@ const char *usbg_error_name(usbg_error e)
case USBG_ERROR_PATH_TOO_LONG:
ret = "USBG_ERROR_PATH_TOO_LONG";
break;
+ case USBG_ERROR_INVALID_FORMAT:
+ ret = "USBG_ERROR_INVALID_FORMAT";
+ break;
+ case USBG_ERROR_MISSING_TAG:
+ ret = "USBG_ERROR_MISSING_TAG";
+ break;
+ case USBG_ERROR_INVALID_TYPE:
+ ret = "USBG_ERROR_INVALUD_TYPE";
+ break;
+ case USBG_ERROR_INVALID_VALUE:
+ ret = "USBG_ERROR_INVALID_VALUE";
+ break;
case USBG_ERROR_OTHER_ERROR:
ret = "USBG_ERROR_OTHER_ERROR";
break;
@@ -272,6 +284,18 @@ const char *usbg_strerror(usbg_error e)
case USBG_ERROR_PATH_TOO_LONG:
ret = "Created path was too long to process it.";
break;
+ case USBG_ERROR_INVALID_FORMAT:
+ ret = "Given file has incompatible format.";
+ break;
+ case USBG_ERROR_MISSING_TAG:
+ ret = "One of mandatory tags is missing.";
+ break;
+ case USBG_ERROR_INVALID_TYPE:
+ ret = "One of attributs has incompatible type";
+ break;
+ case USBG_ERROR_INVALID_VALUE:
+ ret = "Incorrect value provided as attribute.";
+ break;
case USBG_ERROR_OTHER_ERROR:
ret = "Other error";
break;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html