From a77daa2e80ed906e347581cf598bfabf38048c81 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Fri, 22 Sep 2023 21:30:22 +0300 Subject: [PATCH] syscalls: introduce syscall arguments length --- src/openpower/syscalls/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openpower/syscalls/__init__.py b/src/openpower/syscalls/__init__.py index d89ecdb9..bf86718d 100644 --- a/src/openpower/syscalls/__init__.py +++ b/src/openpower/syscalls/__init__.py @@ -33,11 +33,14 @@ class Syscall: def host(self): return self.__host + def __len__(self): + return len(self.__parameters) + def __repr__(self): return f"{self.__class__.__name__}({self.entry} {self.guest}=>{self.host})" def __call__(self, *arguments): - if len(arguments) != len(self.__parameters): + if len(arguments) < len(self): raise ValueError("conflict between arguments and parameters") for index in range(len(arguments)): -- 2.30.2