From 285b02582bc301dede933bf9d161ecd68b1f4257 Mon Sep 17 00:00:00 2001 From: Chris Dearman Date: Thu, 29 Nov 2012 11:22:11 -0800 Subject: [PATCH] Verify architecture neutral syscall numbers Also removed some dead code and fixed comment Change-Id: I5d6a04b4af3d95e34368136cf2eeb3c9b6f99769 Signed-off-by: Chris Dearman --- libc/tools/checksyscalls.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libc/tools/checksyscalls.py b/libc/tools/checksyscalls.py index 286e727cc..b32567684 100755 --- a/libc/tools/checksyscalls.py +++ b/libc/tools/checksyscalls.py @@ -2,7 +2,7 @@ # # this tool is used to check that the syscall numbers that are in # SYSCALLS.TXT correspond to those found in the Linux kernel sources -# for the arm and i386 architectures +# for the arm, i386 and mips architectures # import sys, re, string, os, commands @@ -167,13 +167,12 @@ def check_syscalls(archname, idname, arch_dict): for sc in syscalls: sc_name = sc["name"] sc_id = sc[idname] + if sc_id == -1: + sc_id = sc["common"] if sc_id >= 0: if not arch_dict.has_key(sc_name): print "error: %s syscall %s not defined, should be %d" % (archname, sc_name, sc_id) errors += 1 - elif not arch_dict.has_key(sc_name): - print "error: %s syscall %s is not implemented" % (archname, sc_name) - errors += 1 elif arch_dict[sc_name] != sc_id: print "error: %s syscall %s should be %d instead of %d" % (archname, sc_name, arch_dict[sc_name], sc_id) errors += 1