summaryrefslogtreecommitdiff
path: root/freebsd/syscalls.pl
diff options
context:
space:
mode:
authorJohn Hughes <john@Calva.COM>2001-03-08 17:27:20 +0000
committerJohn Hughes <john@Calva.COM>2001-03-08 17:27:20 +0000
commitcf1de759ed0bc7b83665beeb4953b6b37e9e186d (patch)
tree0996c9cbb36cc956f40fff48b81ab2864cb11f88 /freebsd/syscalls.pl
parentc0fc3fd077de3ba606a58d6be8823025482a6762 (diff)
downloadstrace-cf1de759ed0bc7b83665beeb4953b6b37e9e186d.tar.gz
cope with FreeBSD compatability syscalls
Diffstat (limited to 'freebsd/syscalls.pl')
-rw-r--r--freebsd/syscalls.pl15
1 files changed, 10 insertions, 5 deletions
diff --git a/freebsd/syscalls.pl b/freebsd/syscalls.pl
index 0dc389ae0..84fd811c5 100644
--- a/freebsd/syscalls.pl
+++ b/freebsd/syscalls.pl
@@ -110,11 +110,15 @@ while (<MASTER>) {
$_ = "$_$line";
}
- if (/^(\d+)\s+(?:MPSAFE\s+)?\w+\s+\w+\s+\{\s*([^}]+)\s*\}([^}]*)$/) {
- my($proto, $ext, $name, $nargs, @args, $pfunc, $cat);
-
- $proto = $2;
- $ext = $3;
+ if (/^(\d+)\s+(?:MPSAFE\s+)?(\w+)\s+\w+\s+\{\s*([^}]+)\s*\}([^}]*)$/) {
+ my($compat, $proto, $ext, $name, $nargs, @args, $pfunc, $cat);
+
+ next if $2 eq 'OBSOL' || $2 eq 'UNIMPL';
+
+ $compat = $2 eq 'COMPAT' ? '?' : "";
+
+ $proto = $3;
+ $ext = $4;
if ($1 > $sysnum) { # syscall gap
while($sysnum < $1) {
@@ -142,6 +146,7 @@ while (<MASTER>) {
} else {
$cat = "0";
}
+ $name .= $compat;
print " { $nargs,\t$cat,\t$pfunc,\t\"$name\"\t}, /* $sysnum */\n";
$sysnum++;
} else {