diff options
Diffstat (limited to 'src/arch-mips64.c')
-rw-r--r-- | src/arch-mips64.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/arch-mips64.c b/src/arch-mips64.c index 342d0d8..d0f72b8 100644 --- a/src/arch-mips64.c +++ b/src/arch-mips64.c @@ -30,6 +30,7 @@ /** * Resolve a syscall name to a number + * @param arch the architecture definition * @param name the syscall name * * Resolve the given syscall name to the syscall number using the syscall table. @@ -37,12 +38,13 @@ * numbers; returns __NR_SCMP_ERROR on failure. * */ -int mips64_syscall_resolve_name_munge(const char *name) +int mips64_syscall_resolve_name_munge(const struct arch_def *arch, + const char *name) { int sys; /* NOTE: we don't want to modify the pseudo-syscall numbers */ - sys = mips64_syscall_resolve_name(name); + sys = arch->syscall_resolve_name_raw(name); if (sys == __NR_SCMP_ERROR || sys < 0) return sys; @@ -51,6 +53,7 @@ int mips64_syscall_resolve_name_munge(const char *name) /** * Resolve a syscall number to a name + * @param arch the architecture definition * @param num the syscall number * * Resolve the given syscall number to the syscall name using the syscall table. @@ -58,12 +61,13 @@ int mips64_syscall_resolve_name_munge(const char *name) * syscall names; returns NULL on failure. * */ -const char *mips64_syscall_resolve_num_munge(int num) +const char *mips64_syscall_resolve_num_munge(const struct arch_def *arch, + int num) { /* NOTE: we don't want to modify the pseudo-syscall numbers */ if (num >= __SCMP_NR_BASE) num -= __SCMP_NR_BASE; - return mips64_syscall_resolve_num(num); + return arch->syscall_resolve_num_raw(num); } const struct arch_def arch_def_mips64 = { @@ -72,7 +76,9 @@ const struct arch_def arch_def_mips64 = { .size = ARCH_SIZE_64, .endian = ARCH_ENDIAN_BIG, .syscall_resolve_name = mips64_syscall_resolve_name_munge, + .syscall_resolve_name_raw = mips64_syscall_resolve_name, .syscall_resolve_num = mips64_syscall_resolve_num_munge, + .syscall_resolve_num_raw = mips64_syscall_resolve_num, .syscall_rewrite = NULL, .rule_add = NULL, }; @@ -83,7 +89,9 @@ const struct arch_def arch_def_mipsel64 = { .size = ARCH_SIZE_64, .endian = ARCH_ENDIAN_LITTLE, .syscall_resolve_name = mips64_syscall_resolve_name_munge, + .syscall_resolve_name_raw = mips64_syscall_resolve_name, .syscall_resolve_num = mips64_syscall_resolve_num_munge, + .syscall_resolve_num_raw = mips64_syscall_resolve_num, .syscall_rewrite = NULL, .rule_add = NULL, }; |