From 06a8b770da586cecac191959df6b642c56593d67 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 19 Sep 2023 20:23:44 +0300 Subject: [PATCH] syscalls: adjust syscall name --- src/openpower/syscalls/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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): -- 2.30.2