diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-06-01 16:13:06 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-06-01 16:13:06 +0000 |
commit | 16864a2b809f78af3230c9a2860d6a3fd67c2f58 (patch) | |
tree | 5e24e98e60f440edc4dfb479f24c735d0d6ba584 /sys/kern/makesyscalls.sh | |
parent | 2db4a6c9d8f29ee997788b67eef3201f1c1bb9a5 (diff) | |
download | FreeBSD-src-16864a2b809f78af3230c9a2860d6a3fd67c2f58.zip FreeBSD-src-16864a2b809f78af3230c9a2860d6a3fd67c2f58.tar.gz |
Add 'sy_flags', a currently unused per-syscall entry flags field that will
see future use in 9-CURRENT and 8-STABLE for features such as the
capability-mode enable flag and pay-as-you-audit.
Discussed with: jhb, sson
Diffstat (limited to 'sys/kern/makesyscalls.sh')
-rw-r--r-- | sys/kern/makesyscalls.sh | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh index 2b778b1..153fdef 100644 --- a/sys/kern/makesyscalls.sh +++ b/sys/kern/makesyscalls.sh @@ -318,6 +318,13 @@ s/\$//g auditev = $2; } + # + # The currently-empty flags field. + # + { + flags = "0"; + } + $3 == "STD" || $3 == "NODEF" || $3 == "NOARGS" || $3 == "NOPROTO" \ || $3 == "NOIMPL" || $3 == "NOSTD" { parseline() @@ -369,14 +376,14 @@ s/\$//g printf("\t{ %s, (sy_call_t *)", argssize) > sysent column = 8 + 2 + length(argssize) + 15 if ($3 == "NOIMPL") { - printf("%s },", "nosys, AUE_NULL, NULL, 0, 0") > sysent - column = column + length("nosys") + 3 + printf("%s },", "nosys, AUE_NULL, NULL, 0, 0, 0") > sysent + column = column + length("nosys") + length("AUE_NULL") + 3 } else if ($3 == "NOSTD") { - printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0") > sysent - column = column + length("lkmressys") + 3 + printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0, 0") > sysent + column = column + length("lkmressys") + length("AUE_NULL") + 3 } else { - printf("%s, %s, NULL, 0, 0 },", funcname, auditev) > sysent - column = column + length(funcname) + length(auditev) + 3 + printf("%s, %s, NULL, 0, 0, %s },", funcname, auditev, flags) > sysent + column = column + length(funcname) + length(auditev) + length(flags) + 3 } align_sysent_comment(column) printf("/* %d = %s */\n", syscall, funcalias) > sysent @@ -426,10 +433,10 @@ s/\$//g argalias) > sysarg printf("%s\t%s%s(struct thread *, struct %s *);\n", rettype, prefix, funcname, argalias) > outdcl - printf("\t{ %s(%s,%s), %s, NULL, 0, 0 },", - wrap, argssize, funcname, auditev) > sysent + printf("\t{ %s(%s,%s), %s, NULL, 0, 0, %s },", + wrap, argssize, funcname, auditev, flags) > sysent align_sysent_comment(8 + 9 + \ - length(argssize) + 1 + length(funcname) + length(auditev) + 4) + length(argssize) + 1 + length(funcname) + length(auditev) + length(flags) + 4) printf("/* %d = old %s */\n", syscall, funcalias) > sysent printf("\t\"%s.%s\",\t\t/* %d = old %s */\n", wrap, funcalias, syscall, funcalias) > sysnames @@ -448,10 +455,10 @@ s/\$//g ncompat++ parseline() printf("%s\to%s();\n", rettype, funcname) > syscompatdcl - printf("\t{ compat(%s,%s), %s, NULL, 0, 0 },", - argssize, funcname, auditev) > sysent + printf("\t{ compat(%s,%s), %s, NULL, 0, 0, %s },", + argssize, funcname, auditev, flags) > sysent align_sysent_comment(8 + 9 + \ - length(argssize) + 1 + length(funcname) + length(auditev) + 4) + length(argssize) + 1 + length(funcname) + length(auditev) + length(flags) + 4) printf("/* %d = old %s */\n", syscall, funcalias) > sysent printf("\t\"old.%s\",\t\t/* %d = old %s */\n", funcalias, syscall, funcalias) > sysnames @@ -462,7 +469,7 @@ s/\$//g next } $3 == "OBSOL" { - printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },") > sysent + printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },") > sysent align_sysent_comment(34) printf("/* %d = obsolete %s */\n", syscall, comment) > sysent printf("\t\"obs_%s\",\t\t\t/* %d = obsolete %s */\n", @@ -473,7 +480,7 @@ s/\$//g next } $3 == "UNIMPL" { - printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },\t\t\t/* %d = %s */\n", + printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },\t\t\t/* %d = %s */\n", syscall, comment) > sysent printf("\t\"#%d\",\t\t\t/* %d = %s */\n", syscall, syscall, comment) > sysnames |