strace/truncate.c
Dmitry V. Levin 6934182f16 file.c: move truncate, truncate64, ftruncate, and ftruncate64 parsers to a separate file
* truncate.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_truncate, sys_truncate64, sys_ftruncate, sys_ftruncate64):
Move to truncate.c.
2014-12-11 21:40:04 +00:00

42 lines
586 B
C

#include "defs.h"
int
sys_truncate(struct tcb *tcp)
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
tprintf(", %lu", tcp->u_arg[1]);
}
return 0;
}
int
sys_truncate64(struct tcb *tcp)
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
printllval(tcp, ", %llu", 1);
}
return 0;
}
int
sys_ftruncate(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
tprintf(", %lu", tcp->u_arg[1]);
}
return 0;
}
int
sys_ftruncate64(struct tcb *tcp)
{
if (entering(tcp)) {
printfd(tcp, tcp->u_arg[0]);
printllval(tcp, ", %llu", 1);
}
return 0;
}