Merge "Make gensyscalls.py compatible with Python 3." am: 9cf8871dd9 am: 4b6371e433

Original change: https://android-review.googlesource.com/c/platform/bionic/+/1677008

Change-Id: I4decff2d7364456e1842a7f7bb6c721cea465f8e
This commit is contained in:
Treehugger Robot 2021-04-15 19:21:14 +00:00 committed by Automerger Merge Worker
commit 5a8721a1ed

View file

@ -434,13 +434,13 @@ def main(arch, syscall_file):
for syscall in parser.syscalls:
syscall["__NR_name"] = make__NR_name(syscall["name"])
if syscall.has_key("arm"):
if "arm" in syscall:
syscall["asm-arm"] = add_footer(32, arm_eabi_genstub(syscall), syscall)
if syscall.has_key("arm64"):
if "arm64" in syscall:
syscall["asm-arm64"] = add_footer(64, arm64_genstub(syscall), syscall)
if syscall.has_key("x86"):
if "x86" in syscall:
if syscall["socketcall_id"] >= 0:
syscall["asm-x86"] = add_footer(32, x86_genstub_socketcall(syscall), syscall)
else:
@ -449,13 +449,13 @@ def main(arch, syscall_file):
E("socketcall_id for dispatch syscalls is only supported for x86 in '%s'" % t)
return
if syscall.has_key("x86_64"):
if "x86_64" in syscall:
syscall["asm-x86_64"] = add_footer(64, x86_64_genstub(syscall), syscall)
print("/* Generated by gensyscalls.py. Do not edit. */\n")
print("#include <private/bionic_asm.h>\n")
for syscall in parser.syscalls:
if syscall.has_key("asm-%s" % arch):
if ("asm-%s" % arch) in syscall:
print(syscall["asm-%s" % arch])
if arch == 'arm64':