diff --git a/user/usys.py b/user/usys.py index 677c5b8..ad4e4c7 100755 --- a/user/usys.py +++ b/user/usys.py @@ -1,18 +1,13 @@ #!/usr/bin/env python3 -template = """ -.global {name} +template = """.global {name} {name}: li a7, SYS_{name} ecall - ret -""".strip() + ret""" def genstub(syscall: str): - if not 3 >= len(syscall) <= 15: - raise ValueError("Syscall {} is too short/long!".format(syscall[:35])) - return template.format(name=syscall) @@ -60,9 +55,7 @@ with open("kernel/syscall.h", "r") as sfile: missing_in_header_calls = calls - header_calls if missing_in_calls: - print( - "#These items are in header_calls but not in calls:", missing_in_calls - ) + print("#These items are in header_calls but not in calls:", missing_in_calls) if missing_in_header_calls: print( "#These items are in calls but not in header_calls:",