/* See COPYRIGHT for copyright information. */
-#ifndef ROS_INC_ERROR_H
-#define ROS_INC_ERROR_H
+#pragma once
#include <ros/errno.h>
typedef int error_t;
-/* The special format for printk %e takes an integer
- * error code and prints a string describing the error.
- * The integer may be positive or negative,
- * so that -ENOMEM and ENOMEM are equivalent.
- */
+#define MAX_ERRNO 4095
-static const char *const error_string[] =
-{
- #include <errstrings.h>
-};
-
-#endif // !ROS_INC_ERROR_H */
+#define ERR_PTR(err) ((void *)((intptr_t)(err)))
+#define PTR_ERR(ptr) ((intptr_t)(ptr))
+#define IS_ERR(ptr) (-(intptr_t)(ptr) <= MAX_ERRNO)