file.c: move readahead parser to a separate file

* readahead.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_readahead): Move to readahead.c.
This commit is contained in:
Дмитрий Левин 2014-12-06 03:53:16 +00:00
parent 6934182f16
commit 9e9ceab3b1
3 changed files with 14 additions and 12 deletions

@ -55,6 +55,7 @@ strace_SOURCES = \
process.c \
ptp.c \
quota.c \
readahead.c \
readlink.c \
reboot.c \
renameat.c \

12
file.c

@ -452,18 +452,6 @@ sys_llseek(struct tcb *tcp)
return 0;
}
int
sys_readahead(struct tcb *tcp)
{
if (entering(tcp)) {
int argn;
printfd(tcp, tcp->u_arg[0]);
argn = printllval(tcp, ", %lld", 1);
tprintf(", %ld", tcp->u_arg[argn]);
}
return 0;
}
/* several stats */
#if defined(SPARC) || defined(SPARC64)

13
readahead.c Normal file

@ -0,0 +1,13 @@
#include "defs.h"
int
sys_readahead(struct tcb *tcp)
{
if (entering(tcp)) {
int argn;
printfd(tcp, tcp->u_arg[0]);
argn = printllval(tcp, ", %lld", 1);
tprintf(", %ld", tcp->u_arg[argn]);
}
return 0;
}