Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167240916
D14122.id38638.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D14122.id38638.diff
View Options
Index: sys/kern/makesyscalls.sh
===================================================================
--- sys/kern/makesyscalls.sh
+++ sys/kern/makesyscalls.sh
@@ -254,13 +254,6 @@
print > systraceret
next
}
- syscall != $1 {
- printf "%s: line %d: syscall number out of sync at %d\n",
- infile, NR, syscall
- printf "line is:\n"
- print
- exit 1
- }
# Returns true if the type "name" is the first flag in the type field
function type(name, flags, n) {
n = split($3, flags, /\|/)
@@ -274,6 +267,26 @@
return 1
return 0
}
+ {
+ n = split($1, syscall_range, /-/)
+ if (n < 1 || n > 2) {
+ printf "%s: line %d: invalid syscall number or range %s\n",
+ infile, NR, $1
+ exit 1
+ }
+ if (n == 2 && !type("UNIMPL")) {
+ printf "%s: line %d: range permitted only with UNIMPL\n",
+ infile, NR
+ exit 1
+ }
+ }
+ syscall != syscall_range[1] {
+ printf "%s: line %d: syscall number out of sync at %d\n",
+ infile, NR, syscall
+ printf "line is:\n"
+ print
+ exit 1
+ }
function align_sysent_comment(column) {
printf("\t") > sysent
column = column + 8 - column % 8
@@ -614,11 +627,14 @@
next
}
type("UNIMPL") {
- printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },\t\t\t/* %d = %s */\n",
- syscall, comment) > sysent
- printf("\t\"#%d\",\t\t\t/* %d = %s */\n",
- syscall, syscall, comment) > sysnames
- syscall++
+ while (syscall == syscall_range[1] ||
+ syscall <= syscall_range[2]) {
+ printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },\t\t\t/* %d = %s */\n",
+ syscall, comment) > sysent
+ printf("\t\"#%d\",\t\t\t/* %d = %s */\n",
+ syscall, syscall, comment) > sysnames
+ syscall++
+ }
next
}
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 21, 6:45 AM (5 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37023982
Default Alt Text
D14122.id38638.diff (1 KB)
Attached To
Mode
D14122: makesyscalls: permit a range of syscall numbers for UNIMPL
Attached
Detach File
Event Timeline
Log In to Comment