]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Share a single bsd-linux errno table across MD consumers
authoremaste <emaste@FreeBSD.org>
Fri, 16 Mar 2018 14:46:38 +0000 (14:46 +0000)
committeremaste <emaste@FreeBSD.org>
Fri, 16 Mar 2018 14:46:38 +0000 (14:46 +0000)
commit566c3d41cc5ef0926a69504a2161b17e5810f75c
treea7925d8d87225d5a35202e44696ae8b9d0db31b8
parenteea3e874314603ad160776075e208471401a7b51
Share a single bsd-linux errno table across MD consumers

Three copies of the linuxulator linux_sysvec.c contained identical
BSD to Linux errno translation tables, and future work to support other
architectures will also use the same table.  Move the table to a common
file to be used by all.  Make it 'const int' to place it in .rodata.

(Some existing Linux architectures use MD errno values, but x86 and Arm
share the generic set.)

This change should introduce no functional change; a followup will add
missing errno values.

MFC after: 3 weeks
Sponsored by: Turing Robotic Industries Inc.
Differential Revision: https://reviews.freebsd.org/D14665
sys/amd64/linux/linux_sysvec.c
sys/amd64/linux32/linux32_sysvec.c
sys/compat/linux/linux_emul.h
sys/compat/linux/linux_errno.c [new file with mode: 0644]
sys/conf/files.amd64
sys/conf/files.i386
sys/i386/linux/linux_sysvec.c
sys/modules/linux/Makefile
sys/modules/linux_common/Makefile