summaryrefslogtreecommitdiff
path: root/truncate.c
blob: 12918dd99faa541acf25d61f599bbaa05b2760f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * Copyright (c) 2014-2018 The strace developers.
 * All rights reserved.
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#include "defs.h"

SYS_FUNC(truncate)
{
	printpath(tcp, tcp->u_arg[0]);
	tprintf(", %" PRI_klu, tcp->u_arg[1]);

	return RVAL_DECODED;
}

SYS_FUNC(truncate64)
{
	printpath(tcp, tcp->u_arg[0]);
	printllval(tcp, ", %llu", 1);

	return RVAL_DECODED;
}

SYS_FUNC(ftruncate)
{
	printfd(tcp, tcp->u_arg[0]);
	tprintf(", %" PRI_klu, tcp->u_arg[1]);

	return RVAL_DECODED;
}

SYS_FUNC(ftruncate64)
{
	printfd(tcp, tcp->u_arg[0]);
	printllval(tcp, ", %llu", 1);

	return RVAL_DECODED;
}