syscalls: adjust syscall name
authorDmitry Selyutin <ghostmansd@gmail.com>
Tue, 19 Sep 2023 17:23:44 +0000 (20:23 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 26 Sep 2023 21:08:32 +0000 (22:08 +0100)
src/openpower/syscalls/__init__.py

index 3879822059ac4fac9b7664cff10412a732f01aff..9f3e8474ae0f7d73c859c5e2d6cb41a5541cda08 100644 (file)
@@ -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):