|
This was apparently never used by anyone except me, and currently
fails silently.
The script originally allowed easy inspection of the difference between:
1. The list of declared syscalls according to Kernel/API/Syscall.h
2. The list of syscalls implemented by the UserspaceEmulator according
to Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp
3. The list of syscalls documented in Base/usr/share/man/man2/.
Here's how the script could have been updated:
SYSCALLS_KERNEL="$(echo 'Kernel syscalls'; echo; \
grep -Eo '^ +S\(.*, NeedsBigProcessLock::' Kernel/API/Syscall.h | \
sed -Ee 's-^ +S\((.+), .*-\1-' | sort)"
SYSCALLS_UE="$(echo 'Implemented in UserspaceEmulator'; echo; \
grep -Eo '^ +case SC_.*:$' \
Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp | \
sed -Ee 's,^ +case SC_(.*):$,\1,' | sort)"
SYSCALLS_MAN2="$(echo 'Documented syscalls'; echo; \
find Base/usr/share/man/man2/ ! -type d -printf '%f\n' | \
sed -Ee 's,\.md,,' | sort)"
diff --color=always \
<(echo "${SYSCALLS_KERNEL}") <(echo "${SYSCALLS_UE}")
diff --color=always \
<(echo "${SYSCALLS_KERNEL}") <(echo "${SYSCALLS_MAN2}")
A more readable version might be available at
https://github.com/BenWiederhake/serenity/tree/historic/syscall-linting
However, there seems to be no interest in the script, so it is better to
remove it.
|