The cpu-boosting.h has described its return value as a type of enum
resource_error_e, but the header hasn't included the actual definition.
Rather, the definition was at the common.h that was a header not being
exported. This caused build error where the only <cpu-boosting.h> was
included as a header for cpu boosting. To fix it, move the definition to
cpu-boosting-type.h.
/home/abuild/rpmbuild/BUILD/dbus-tools-0.1/stress-test/src/test-main.c:127:28:
error: 'RESOURCE_ERROR_NONE' undeclared (first use in this function);
did you mean 'G_IO_ERROR_NONE'?
127 | if (ret != RESOURCE_ERROR_NONE) {
| ^~~~~~~~~~~~~~~~~~~
| G_IO_ERROR_NONE
Change-Id: Ibcc59281a28e03cf1a16c8f3a4f466ebb16f465a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
86ab6acf2720e37e7b27384b11fed3f388935575)
#define __TIZEN_SYSTEM_COMMON_H__
#include <dlog.h>
-#include <tizen.h>
#ifdef __cplusplus
extern "C" {
#define API __attribute__ ((visibility ("default")))
#endif
-typedef enum {
- RESOURCE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
- RESOURCE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_INVALID_OPERATION, /**< Not supported */
- RESOURCE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
- RESOURCE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
- RESOURCE_ERROR_OPERATION_FAILED = TIZEN_ERROR_IO_ERROR, /**< Operation failed */
- RESOURCE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
- RESOURCE_ERROR_NO_SUCH_FILE = TIZEN_ERROR_NO_SUCH_FILE /**< No such file */
-} resource_error_e;
-
#ifdef __cplusplus
}
#endif
#define __TIZEN_SYSTEM_CPU_BOOSTING_TYPE_H__
#include <sys/types.h>
+#include <tizen.h>
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ * @brief Enumeration for cpu boosting error.
+ * @since_tizen 6.5
+ */
+typedef enum {
+ RESOURCE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
+ RESOURCE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_INVALID_OPERATION, /**< Not supported */
+ RESOURCE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
+ RESOURCE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+ RESOURCE_ERROR_OPERATION_FAILED = TIZEN_ERROR_IO_ERROR, /**< Operation failed */
+ RESOURCE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+ RESOURCE_ERROR_NO_SUCH_FILE = TIZEN_ERROR_NO_SUCH_FILE /**< No such file */
+} resource_error_e;
+
/**
* @brief Enumeration for cpu boosting flag.
* @since_tizen 6.5