Skip to content

Commit

Permalink
* manual/errno.texi (Error Codes): Add ENOKEY, EKEYEXPIRED,
Browse files Browse the repository at this point in the history
	EKEYREVOKED, EKEYREJECTED.
	* sysdeps/unix/sysv/linux/Versions (libc: GLIBC_2.3.4): New errlist.
	* sysdeps/gnu/errlist.c: Regenerated

	* sysdeps/gnu/errlist-compat.awk: Don't bail if Versions gives a count
	higher than ERR_MAX reports.  Instead, emit a #define ERR_MAX.
	* sysdeps/gnu/Makefile ($(objpfx)errlist-compat.h): New target.
	(generated): Add errlist-compat.h.
	* sysdeps/gnu/errlist.awk: Make output #include <errlist-compat.h> to
	define ERR_MAX and use that for table size.
  • Loading branch information
Roland McGrath committed Oct 20, 2004
1 parent 4b359a2 commit cb57664
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 1 deletion.
14 changes: 14 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
2004-10-20 Roland McGrath <roland@redhat.com>

* manual/errno.texi (Error Codes): Add ENOKEY, EKEYEXPIRED,
EKEYREVOKED, EKEYREJECTED.
* sysdeps/unix/sysv/linux/Versions (libc: GLIBC_2.3.4): New errlist.
* sysdeps/gnu/errlist.c: Regenerated

* sysdeps/gnu/errlist-compat.awk: Don't bail if Versions gives a count
higher than ERR_MAX reports. Instead, emit a #define ERR_MAX.
* sysdeps/gnu/Makefile ($(objpfx)errlist-compat.h): New target.
(generated): Add errlist-compat.h.
* sysdeps/gnu/errlist.awk: Make output #include <errlist-compat.h> to
define ERR_MAX and use that for table size.

2004-10-20 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/syscalls.list: Add entries for setaltroot,
Expand Down
24 changes: 24 additions & 0 deletions manual/errno.texi
Original file line number Diff line number Diff line change
Expand Up @@ -1229,6 +1229,30 @@ They are not yet documented.}
@comment errno ???/???
@end deftypevr

@comment errno.h
@comment Linux???: Required key not available
@deftypevr Macro int ENOKEY
@comment errno ???/???
@end deftypevr

@comment errno.h
@comment Linux???: Key has expired
@deftypevr Macro int EKEYEXPIRED
@comment errno ???/???
@end deftypevr

@comment errno.h
@comment Linux???: Key has been revoked
@deftypevr Macro int EKEYREVOKED
@comment errno ???/???
@end deftypevr

@comment errno.h
@comment Linux???: Key was rejected by service
@deftypevr Macro int EKEYREJECTED
@comment errno ???/???
@end deftypevr

@node Error Messages, , Error Codes, Error Reporting
@section Error Messages

Expand Down
42 changes: 41 additions & 1 deletion sysdeps/gnu/errlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@
# define ERR_REMAP(n) n
#endif

const char *const _sys_errlist_internal[] =
#if !defined EMIT_ERR_MAX && !defined ERRLIST_NO_COMPAT
# include <errlist-compat.h>
#endif
#ifdef ERR_MAX
# define ERRLIST_SIZE ERR_MAX + 1
#else
# define ERRLIST_SIZE
#endif
const char *const _sys_errlist_internal[ERRLIST_SIZE] =
{
[0] = N_("Success"),
#ifdef EPERM
Expand Down Expand Up @@ -1399,6 +1407,38 @@ TRANS error; @pxref{Cancel AIO Operations}. */
# undef ERR_MAX
# define ERR_MAX EMEDIUMTYPE
# endif
#endif
#ifdef ENOKEY
/* */
[ERR_REMAP (ENOKEY)] = N_("Required key not available"),
# if ENOKEY > ERR_MAX
# undef ERR_MAX
# define ERR_MAX ENOKEY
# endif
#endif
#ifdef EKEYEXPIRED
/* */
[ERR_REMAP (EKEYEXPIRED)] = N_("Key has expired"),
# if EKEYEXPIRED > ERR_MAX
# undef ERR_MAX
# define ERR_MAX EKEYEXPIRED
# endif
#endif
#ifdef EKEYREVOKED
/* */
[ERR_REMAP (EKEYREVOKED)] = N_("Key has been revoked"),
# if EKEYREVOKED > ERR_MAX
# undef ERR_MAX
# define ERR_MAX EKEYREVOKED
# endif
#endif
#ifdef EKEYREJECTED
/* */
[ERR_REMAP (EKEYREJECTED)] = N_("Key was rejected by service"),
# if EKEYREJECTED > ERR_MAX
# undef ERR_MAX
# define ERR_MAX EKEYREJECTED
# endif
#endif
};

Expand Down
3 changes: 3 additions & 0 deletions sysdeps/unix/sysv/linux/Versions
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ libc {

# new syscalls
setaltroot; add_key; request_key; keyctl;

#errlist-compat 129
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
}
GLIBC_PRIVATE {
# functions used in other libraries
Expand Down

0 comments on commit cb57664

Please sign in to comment.