summaryrefslogtreecommitdiff
path: root/src/user/lib/syscall.c.awk
diff options
context:
space:
mode:
authordzwdz2022-07-29 18:45:47 +0200
committerdzwdz2022-07-29 18:45:47 +0200
commita658e1068eb2f849736931d2b99bcb6290c7ec0a (patch)
treefd2f6d31cf74799aa7318524bea7c707767e6b0e /src/user/lib/syscall.c.awk
parentc6424fbc55298399f133ca1ede11e1f0b4a5c824 (diff)
syscall: up the max argument count to 5; make write accept flags
Diffstat (limited to 'src/user/lib/syscall.c.awk')
-rw-r--r--src/user/lib/syscall.c.awk4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/user/lib/syscall.c.awk b/src/user/lib/syscall.c.awk
index 58f9a4c..192df6a 100644
--- a/src/user/lib/syscall.c.awk
+++ b/src/user/lib/syscall.c.awk
@@ -23,7 +23,7 @@ BEGIN {
if (params == "void") params = ""
split(params, p, /,/);
- for (i = 0; i <= 4; i += 1) {
+ for (i = 0; i < 6; i += 1) {
if (p[i]) {
# p[i] is a parameter, convert it into an expression to pass to _syscall()
sub(/^ */, "", p[i]); # strip
@@ -44,7 +44,7 @@ BEGIN {
printf "return ";
if (rets != "long") printf "(%s)", rets;
}
- printf "_syscall(%s, %s, %s, %s, %s);\n", toupper(name), p[1], p[2], p[3], p[4];
+ printf "_syscall(%s, %s, %s, %s, %s, %s);\n", toupper(name), p[1], p[2], p[3], p[4], p[5];
if (index($0, "_Noreturn")) print "\t__builtin_unreachable();";
print "}\n";