diff options
author | Maxim Devaev <[email protected]> | 2022-11-07 03:23:06 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-11-07 03:23:06 +0300 |
commit | 53f8b052de48843ece433362ba66633c8b16b7f6 (patch) | |
tree | 1d3ced9fd2f44bbb91c1604478eacd7bace1e6f5 /kvmd/libc.py | |
parent | 648316931a8c5204945a5100a5530c15f7515a23 (diff) |
common fstab and libc funcs
Diffstat (limited to 'kvmd/libc.py')
-rw-r--r-- | kvmd/libc.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kvmd/libc.py b/kvmd/libc.py index 46e6278c..41cb61dd 100644 --- a/kvmd/libc.py +++ b/kvmd/libc.py @@ -26,6 +26,7 @@ import ctypes import ctypes.util from ctypes import c_int +from ctypes import c_uint from ctypes import c_uint32 from ctypes import c_char_p from ctypes import c_void_p @@ -42,6 +43,7 @@ def _load_libc() -> ctypes.CDLL: ("inotify_init", c_int, []), ("inotify_add_watch", c_int, [c_int, c_char_p, c_uint32]), ("inotify_rm_watch", c_int, [c_int, c_uint32]), + ("renameat2", c_int, [c_int, c_char_p, c_int, c_char_p, c_uint]), ("free", c_int, [c_void_p]), ]: func = getattr(lib, name) @@ -56,7 +58,10 @@ _libc = _load_libc() # ===== +get_errno = ctypes.get_errno + inotify_init = _libc.inotify_init inotify_add_watch = _libc.inotify_add_watch inotify_rm_watch = _libc.inotify_rm_watch +renameat2 = _libc.renameat2 free = _libc.free |