Blame view

include/errno.h 426 Bytes
00e9e6d1f   Simon Glass   errno: Add copyri...
1
2
3
4
5
6
  /*
   * Copyright (C) 2014 Samsung Electronics
   * Przemyslaw Marczak <p.marczak@samsung.com>
   *
   * SPDX-License-Identifier:	GPL-2.0+
   */
65cd3fa81   Wolfgang Denk   Add basic errno s...
7
  #ifndef _ERRNO_H
00e9e6d1f   Simon Glass   errno: Add copyri...
8
  #define _ERRNO_H
65cd3fa81   Wolfgang Denk   Add basic errno s...
9

5d97dff04   Masahiro Yamada   treewide: replace...
10
  #include <linux/errno.h>
65cd3fa81   Wolfgang Denk   Add basic errno s...
11
12
13
14
  
  extern int errno;
  
  #define __set_errno(val) do { errno = val; } while (0)
59345b1f0   Przemyslaw Marczak   lib: errno: intro...
15
16
  #ifdef CONFIG_ERRNO_STR
  const char *errno_str(int errno);
862887d88   Simon Glass   errno: Allow errn...
17
18
19
20
21
  #else
  static inline const char *errno_str(int errno)
  {
  	return 0;
  }
59345b1f0   Przemyslaw Marczak   lib: errno: intro...
22
  #endif
65cd3fa81   Wolfgang Denk   Add basic errno s...
23
  #endif /* _ERRNO_H */