syscalls: fix sys_ni_syscall call
authorDmitry Selyutin <ghostmansd@gmail.com>
Fri, 22 Sep 2023 18:10:25 +0000 (21:10 +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 68bef552b7e3eb1163cbf2f50469b993160bd6f6..d89ecdb98a26c4e8c16d433306cbe4c014761547 100644 (file)
@@ -1,4 +1,5 @@
 import ctypes
+import errno
 import inspect
 import json
 import pathlib
@@ -60,6 +61,9 @@ class UnimplementedSyscall(Syscall):
     def __init__(self, guest):
         return super().__init__(entry="sys_ni_syscall", guest=guest, host=-1, parameters=tuple())
 
+    def __call__(self, *arguments):
+        return -errno.ENOSYS
+
 
 class UnknownSyscall(Syscall):
     def __init__(self, entry, guest):