From: Dmitry Selyutin Date: Fri, 22 Sep 2023 18:08:57 +0000 (+0300) Subject: syscalls: fix default table path X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=50160605d50567b43e6918f523646b5f37561814;p=openpower-isa.git syscalls: fix default table path --- diff --git a/src/openpower/syscalls/__init__.py b/src/openpower/syscalls/__init__.py index c59b47a8..68bef552 100644 --- a/src/openpower/syscalls/__init__.py +++ b/src/openpower/syscalls/__init__.py @@ -1,5 +1,4 @@ import ctypes -import functools import inspect import json import pathlib @@ -73,8 +72,7 @@ class UnknownSyscall(Syscall): class Dispatcher: def __init__(self, guest, host, logger=None, table=None): if table is None: - path = pathlib.Path(inspect.getfile(self.__class__)) - path = (path.parent / "syscalls.json") + path = (pathlib.Path(__file__).parent / "syscalls.json") with open(path, "r", encoding="UTF-8") as stream: table = json.load(stream) if not isinstance(table, dict):