macro: add error string 59/167459/3
authorBoram Park <boram1288.park@samsung.com>
Wed, 17 Jan 2018 23:38:17 +0000 (08:38 +0900)
committerBoram Park <boram1288.park@samsung.com>
Thu, 18 Jan 2018 00:25:09 +0000 (09:25 +0900)
to make debugging easier

Change-Id: I08b618f77afb06e4986f71a22b75af23dd87c54a

src/tdm_macro.h

index 428b38f..4ac6a4f 100644 (file)
@@ -156,6 +156,22 @@ static inline const char * tdm_##res##_str(int type)       \
        return "(invalid)";                             \
 }
 
+static struct tdm_type_name tdm_error_names[] = {
+       { TDM_ERROR_NONE, "Success" },
+       { TDM_ERROR_BAD_REQUEST, "bad request" },
+       { TDM_ERROR_OPERATION_FAILED, "operaion failed" },
+       { TDM_ERROR_INVALID_PARAMETER, "wrong input parameter" },
+       { TDM_ERROR_PERMISSION_DENIED, "access denied" },
+       { TDM_ERROR_BUSY, "hardware resource busy" },
+       { TDM_ERROR_OUT_OF_MEMORY, "no free memory" },
+       { TDM_ERROR_BAD_MODULE, "bad backend module" },
+       { TDM_ERROR_NOT_IMPLEMENTED, "not implemented" },
+       { TDM_ERROR_NO_CAPABILITY, "no capability" },
+       { TDM_ERROR_DPMS_OFF, "dpms off" },
+       { TDM_ERROR_OUTPUT_DISCONNECTED, "output disconnected" },
+};
+TDM_TYPE_NAME_FN(error)
+
 static struct tdm_type_name tdm_dpms_names[] = {
        { TDM_OUTPUT_DPMS_ON, "on" },
        { TDM_OUTPUT_DPMS_STANDBY, "standby" },