summaryrefslogtreecommitdiffstats
path: root/src/shared/generate-syscall-list.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/shared/generate-syscall-list.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/shared/generate-syscall-list.py b/src/shared/generate-syscall-list.py
new file mode 100755
index 0000000..030c3fe
--- /dev/null
+++ b/src/shared/generate-syscall-list.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+import sys
+import os
+
+s390 = 's390' in os.uname().machine
+arm = 'arm' in os.uname().machine
+
+for line in open(sys.argv[1]):
+ if line.startswith('s390_') and not s390:
+ continue
+ if line.startswith('arm_') and not arm:
+ continue
+
+ print('"{}\\0"'.format(line.strip()))