errno.h 426 B

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