]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Bump sys_errlist size to keep ABI backward-compatible for some time.
authorkib <kib@FreeBSD.org>
Thu, 27 Dec 2018 13:02:15 +0000 (13:02 +0000)
committerkib <kib@FreeBSD.org>
Thu, 27 Dec 2018 13:02:15 +0000 (13:02 +0000)
commitfe53027f42ad629e091c71f54f77b436e4e1c781
tree0da004c533fd2d244e46f7f695698860bfa58adc
parent0b666203a28138ebd40af9b848bbf4b99bd57363
Bump sys_errlist size to keep ABI backward-compatible for some time.

Addition of the new errno values requires adding new elements to
sys_errlist array, which is actually ABI-incompatible, since ELF
records the object size.  Expand array in advance to 150 elements so
that we have our users to go over the issue only once, at least until
more than 53 new errors are added.

I did not bumped the symbol version, same as it was not done for
previous increases of the array size.  Runtime linker only copies as
much data into binary object on copy relocation as the binary'object
specifies.  This is not fixable for binaries which access sys_errlist
directly.

While there, correct comment and calculation of the temporary buffer
size for the message printed for unknown error.  The on-stack buffer
is used only for the number and delimiter since r108603.

Requested by: mckusick
Reviewed by: mckusick, yuripv
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D18656
lib/libc/gen/errlst.c
lib/libc/include/errlst.h
lib/libc/string/strerror.c