mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-01 20:10:28 +00:00
Meta: Check consistency of various syscall tables
This commit is contained in:
parent
a7d5fbb8af
commit
88dcbacabd
Notes:
sideshowbarker
2024-07-18 22:55:28 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/88dcbacabd0 Pull-request: https://github.com/SerenityOS/serenity/pull/5066
1 changed files with 20 additions and 0 deletions
20
Meta/check-syscall-lists.sh
Executable file
20
Meta/check-syscall-lists.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
||||
cd "${script_path}/.."
|
||||
|
||||
SYSCALLS_KERNEL="$(echo 'Kernel syscalls'; echo; grep -Pio '(?<=^ S\().*(?=\)( +\\)?$)' Kernel/API/Syscall.h | sort)"
|
||||
SYSCALLS_UE="$(echo 'Implemented in UserspaceEmulator'; echo; grep -Pio '(?<=^ case SC_).*(?=:$)' Userland/DevTools/UserspaceEmulator/Emulator.cpp | sort)"
|
||||
SYSCALLS_MAN2="$(echo 'Documented syscalls'; echo; find Base/usr/share/man/man2/ ! -type d -printf '%f\n' | sed -Ee 's,\.md,,' | sort)"
|
||||
|
||||
set +e
|
||||
|
||||
echo "ACTUAL versus UE"
|
||||
diff --color=always -u <(echo "${SYSCALLS_KERNEL}") <(echo "${SYSCALLS_UE}")
|
||||
echo
|
||||
echo "ACTUAL versus UE"
|
||||
diff --color=always -u <(echo "${SYSCALLS_KERNEL}") <(echo "${SYSCALLS_MAN2}")
|
||||
|
||||
exit 0
|
Loading…
Reference in a new issue