| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: makesyscalls.sh,v 1.171 2018/08/26 11:48:00 kre Exp $ | | 1 | # $NetBSD: makesyscalls.sh,v 1.172 2018/08/26 11:53:28 kre Exp $ |
2 | # | | 2 | # |
3 | # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou | | 3 | # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou |
4 | # All rights reserved. | | 4 | # All rights reserved. |
5 | # | | 5 | # |
6 | # Redistribution and use in source and binary forms, with or without | | 6 | # Redistribution and use in source and binary forms, with or without |
7 | # modification, are permitted provided that the following conditions | | 7 | # modification, are permitted provided that the following conditions |
8 | # are met: | | 8 | # are met: |
9 | # 1. Redistributions of source code must retain the above copyright | | 9 | # 1. Redistributions of source code must retain the above copyright |
10 | # notice, this list of conditions and the following disclaimer. | | 10 | # notice, this list of conditions and the following disclaimer. |
11 | # 2. Redistributions in binary form must reproduce the above copyright | | 11 | # 2. Redistributions in binary form must reproduce the above copyright |
12 | # notice, this list of conditions and the following disclaimer in the | | 12 | # notice, this list of conditions and the following disclaimer in the |
13 | # documentation and/or other materials provided with the distribution. | | 13 | # documentation and/or other materials provided with the distribution. |
14 | # 3. All advertising materials mentioning features or use of this software | | 14 | # 3. All advertising materials mentioning features or use of this software |
| @@ -68,32 +68,38 @@ sysautoload="/dev/null" | | | @@ -68,32 +68,38 @@ sysautoload="/dev/null" |
68 | rumpcalls="/dev/null" | | 68 | rumpcalls="/dev/null" |
69 | rumpcallshdr="/dev/null" | | 69 | rumpcallshdr="/dev/null" |
70 | rumpsysmap="/dev/null" | | 70 | rumpsysmap="/dev/null" |
71 | rumpsysent="rumpsysent.tmp" | | 71 | rumpsysent="rumpsysent.tmp" |
72 | rumpnoflags="\n\t\t.sy_flags = SYCALL_NOSYS," | | 72 | rumpnoflags="\n\t\t.sy_flags = SYCALL_NOSYS," |
73 | rumpnosys="(sy_call_t *)rumpns_enosys" | | 73 | rumpnosys="(sy_call_t *)rumpns_enosys" |
74 | rumpnomodule="(sy_call_t *)rumpns_sys_nomodule" | | 74 | rumpnomodule="(sy_call_t *)rumpns_sys_nomodule" |
75 | | | 75 | |
76 | case $1 in | | 76 | case $1 in |
77 | /*) . $1;; | | 77 | /*) . $1;; |
78 | *) . ./$1;; | | 78 | *) . ./$1;; |
79 | esac | | 79 | esac |
80 | | | 80 | |
| | | 81 | errmsg() |
| | | 82 | { |
| | | 83 | fail=true; |
| | | 84 | printf '%s: %s\n' "$0" "$*" >&2 |
| | | 85 | } |
| | | 86 | |
81 | fail=false | | 87 | fail=false |
82 | case "${nsysent:-0}" in | | 88 | case "${nsysent:-0}" in |
83 | *[!0-9]*) fail=true; printf >&2 '%s\n' "Non numeric value for nsysent";; | | 89 | *[!0-9]*) errmsg "Non numeric value for nsysent:" "${nsysent}";; |
84 | esac | | 90 | esac |
85 | case "${maxsysargs:-0}" in | | 91 | case "${maxsysargs:-0}" in |
86 | *[!0-9]*) fail=true; printf >&2 '%s\n' "Non numeric value for maxsysargs";; | | 92 | *[!0-9]*) errmsg "Non numeric value for maxsysargs:" "${maxsysargs}";; |
87 | esac | | 93 | esac |
88 | $fail && exit 1 | | 94 | $fail && exit 1 |
89 | | | 95 | |
90 | # tmp files: | | 96 | # tmp files: |
91 | sysdcl="sysent.dcl" | | 97 | sysdcl="sysent.dcl" |
92 | sysprotos="sys.protos" | | 98 | sysprotos="sys.protos" |
93 | syscompat_pref="sysent." | | 99 | syscompat_pref="sysent." |
94 | sysent="sysent.switch" | | 100 | sysent="sysent.switch" |
95 | sysnamesbottom="$sysnames.bottom" | | 101 | sysnamesbottom="$sysnames.bottom" |
96 | sysnamesfriendly="$sysnames.friendly" | | 102 | sysnamesfriendly="$sysnames.friendly" |
97 | rumptypes="rumphdr.types" | | 103 | rumptypes="rumphdr.types" |
98 | rumpprotos="rumphdr.protos" | | 104 | rumpprotos="rumphdr.protos" |
99 | systracetmp="systrace.$$" | | 105 | systracetmp="systrace.$$" |