Python module to check for system call numbers
Project description
What is it?
This is very simple code to get system call numbers from Python level.
Usage
Quite simple:
#!/usr/bin/python3
import syscalls
system_calls = syscalls.syscalls()
for test_call in ['openat', 'osf_uadmin', 'nosuchcall']:
try:
print(f"System call '{test_call}' has number: {system_calls[test_call]}")
except syscalls.NoSuchSystemCall:
print(f"No such system call '{test_call}' on any architecture")
except syscalls.NotSupportedSystemCall:
print(f"System call '{test_call}' is not supported on this "
"architecture")
for test_call in ['openat', 'osf_uadmin', 'nosuchcall']:
try:
print(f"System call '{test_call}' on arm64 has number: "
f"{system_calls.get(test_call, 'arm64')}")
except syscalls.NoSuchSystemCall:
print(f"No such system call '{test_call}' on any architecture")
except syscalls.NotSupportedSystemCall:
print(f"System call '{test_call}' is not supported on this "
"architecture")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
system-calls-5.13.1.tar.gz
(53.9 kB
view hashes)
Built Distribution
system_calls-5.13.1-py3-none-any.whl
(122.9 kB
view hashes)
Close
Hashes for system_calls-5.13.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c88a34d6f53f4c151a5bf6189fb8bb03ab1c79bfb1fd8c61d914b1b03ec443c |
|
MD5 | 54a91dd0c43085ec9d2a3f099e12804a |
|
BLAKE2b-256 | b667300e0e78227c5c87341b773bc7da5137f11c2bfb330e2fb35b61979fe131 |