Skip to content

Commit b2f8c77

Browse files
committed
Change errnoent.h files to use designated initializers
* signal.c (printsiginfo): Allow elements of errnoent array to be zero. * syscall.c (trace_syscall_exiting): Likewise. * errnoent.sh: Output designated initializers. * linux/errnoent.h: Regenerated. * linux/alpha/errnoent.h: Regenerated. * linux/hppa/errnoent.h: Regenerated. * linux/mips/errnoent.h: Regenerated. * linux/sparc/errnoent.h: Regenerated. * linux/sparc/errnoent1.h: Regenerated. * linux/powerpc/errnoent.h: New file. * linux/powerpc64/errnoent.h: Include "powerpc/errnoent.h". * Makefile.am (EXTRA_DIST): Add linux/powerpc/errnoent.h and linux/powerpc64/errnoent.h.
1 parent 313363f commit b2f8c77

File tree

12 files changed

+881
-3425
lines changed

12 files changed

+881
-3425
lines changed

Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,12 @@ EXTRA_DIST = \
248248
linux/or1k/userent.h \
249249
linux/personality.h \
250250
linux/powerpc/arch_regs.h \
251+
linux/powerpc/errnoent.h \
251252
linux/powerpc/ioctls_arch0.h \
252253
linux/powerpc/ioctls_inc0.h \
253254
linux/powerpc/syscallent.h \
254255
linux/powerpc/userent.h \
256+
linux/powerpc64/errnoent.h \
255257
linux/powerpc64/errnoent1.h \
256258
linux/powerpc64/ioctls_arch0.h \
257259
linux/powerpc64/ioctls_arch1.h \

errnoent.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,14 @@
2525
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626

2727
awk '
28-
/^#define[ ]+E[A-Z0-9_]+[ ]+[0-9]+/ {
28+
$1 == "#define" && $2 ~ /^E[A-Z0-9_]+$/ && $3 ~ /^[0-9]+$/ {
2929
errno[$3] = $2
3030
if ($3 > max)
3131
max = $3
3232
}
3333
END {
34-
for (i = 0; i <= max; i++) {
35-
if (!errno[i])
36-
errno[i] = "ERRNO_" i
37-
printf "\t\"%s\", /* %d */\n", errno[i], i
38-
}
34+
for (i = 0; i <= max; i++)
35+
if (errno[i])
36+
printf("[%3d] = \"%s\",\n", i, errno[i])
3937
}
40-
' $*
38+
' "$@"

0 commit comments

Comments
 (0)