From: Dmitry Selyutin Date: Tue, 19 Sep 2023 17:23:44 +0000 (+0300) Subject: syscalls: adjust syscall name X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06a8b770da586cecac191959df6b642c56593d67;p=openpower-isa.git syscalls: adjust syscall name --- diff --git a/src/openpower/syscalls/__init__.py b/src/openpower/syscalls/__init__.py index 38798220..9f3e8474 100644 --- a/src/openpower/syscalls/__init__.py +++ b/src/openpower/syscalls/__init__.py @@ -69,7 +69,7 @@ class Dispatcher: raise AttributeError(entry) identifier = int(self.__guest[identifier]) - def syscall(identifier, *arguments): + def syscall(*arguments, identifier=identifier): parameters = tuple(self.__parameters[entry].items()) if len(arguments) != len(parameters): raise ValueError("conflict between arguments and parameters") @@ -93,7 +93,9 @@ class Dispatcher: return int(syscall(ctypes.c_ulong(host))) - return functools.partial(syscall, identifier) + syscall.__name__ = syscall.__qualname__ = entry + + return syscall def __call__(self, identifier, *arguments): if not isinstance(identifier, int):