Move decoder of getpagesize syscall to libstrace

As only five architectures have getpagesize syscall, moving the decoder
to libstrace allows to get rid of getpagesize related ifdefs and check
build of getpagesize decoder on other architectures.

* mem.c (SYS_FUNC(getpagesize)): Move ...
* getpagesize.c: ... to this new file.
* Makefile.am (libstrace_a_SOURCES): Add it.
This commit is contained in:
Дмитрий Левин 2018-01-21 20:19:53 +00:00
parent 1b75ffef40
commit af955678b9
3 changed files with 7 additions and 8 deletions

View File

@ -72,6 +72,7 @@ libstrace_a_CFLAGS = $(strace_CFLAGS)
libstrace_a_SOURCES = \
fstatfs.c \
fstatfs64.c \
getpagesize.c \
ipc.c \
sigreturn.c \
socketcall.c \

6
getpagesize.c Normal file
View File

@ -0,0 +1,6 @@
#include "defs.h"
SYS_FUNC(getpagesize)
{
return RVAL_DECODED | RVAL_HEX;
}

8
mem.c
View File

@ -330,14 +330,6 @@ SYS_FUNC(mincore)
return 0;
}
#if defined ALPHA || defined IA64 || defined M68K \
|| defined SPARC || defined SPARC64
SYS_FUNC(getpagesize)
{
return RVAL_DECODED | RVAL_HEX;
}
#endif
SYS_FUNC(remap_file_pages)
{
const kernel_ulong_t addr = tcp->u_arg[0];