errno.h 426 B

1234567891011121314151617181920212223
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2014 Samsung Electronics
  4. * Przemyslaw Marczak <p.marczak@samsung.com>
  5. */
  6. #ifndef _ERRNO_H
  7. #define _ERRNO_H
  8. #include <linux/errno.h>
  9. extern int errno;
  10. #define __set_errno(val) do { errno = val; } while (0)
  11. #ifdef CONFIG_ERRNO_STR
  12. const char *errno_str(int errno);
  13. #else
  14. static inline const char *errno_str(int errno)
  15. {
  16. return 0;
  17. }
  18. #endif
  19. #endif /* _ERRNO_H */