summaryrefslogtreecommitdiff
path: root/kvmd/inotify.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-11-07 03:23:06 +0300
committerMaxim Devaev <[email protected]>2022-11-07 03:23:06 +0300
commit53f8b052de48843ece433362ba66633c8b16b7f6 (patch)
tree1d3ced9fd2f44bbb91c1604478eacd7bace1e6f5 /kvmd/inotify.py
parent648316931a8c5204945a5100a5530c15f7515a23 (diff)
common fstab and libc funcs
Diffstat (limited to 'kvmd/inotify.py')
-rw-r--r--kvmd/inotify.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/kvmd/inotify.py b/kvmd/inotify.py
index 0511f088..d76e73e3 100644
--- a/kvmd/inotify.py
+++ b/kvmd/inotify.py
@@ -25,7 +25,6 @@
import sys
import os
import asyncio
-import ctypes
import struct
import dataclasses
import types
@@ -64,7 +63,7 @@ def _inotify_parsed_buffer(data: bytes) -> Generator[tuple[int, int, int, bytes]
def _inotify_check(retval: int) -> int:
if retval < 0:
- c_errno = ctypes.get_errno()
+ c_errno = libc.get_errno()
if c_errno == errno.ENOSPC: # pylint: disable=no-else-raise
raise OSError(c_errno, "Inotify watch limit reached")
elif c_errno == errno.EMFILE: