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 system_calls
system_calls = system_calls.syscalls()
for test_call in ['openat', 'osf_uadmin', 'nosuchcall']:
try:
print(f"System call '{test_call}' has number: {system_calls[test_call]}")
except system_calls.NoSuchSystemCall:
print(f"No such system call '{test_call}' on any architecture")
except system_calls.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 system_calls.NoSuchSystemCall:
print(f"No such system call '{test_call}' on any architecture")
except system_calls.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.15.2.tar.gz
(52.9 kB
view hashes)
Built Distribution
system_calls-5.15.2-py3-none-any.whl
(124.9 kB
view hashes)
Close
Hashes for system_calls-5.15.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9087a7dc1053775b3295003f23c81872269d7fcd9fa60fe0d6268d16c1020009 |
|
MD5 | b29ade07c8bfab37de50d7fe137b130d |
|
BLAKE2b-256 | d703291e3d42efc1b37161ca2099b5d9a6ba769b20849dd67b4bb65be24a73b7 |