repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
some coverity fixes.
[minix.git]
/
lib
/
libc
/
sys-minix
/
ftruncate.c
blob
e95e258e4a6337afeac88bedaa9f84295c1b1a9b
1
#include <sys/cdefs.h>
2
#include
"namespace.h"
3
#include <lib.h>
4
5
#include <string.h>
6
#include <unistd.h>
7
8
#ifdef __weak_alias
9
__weak_alias
(
ftruncate
,
_ftruncate
)
10
#endif
11
12
int
ftruncate
(
int
_fd
,
off_t _length
)
13
{
14
message m
;
15
m
.
m2_l1
=
_length
;
16
m
.
m2_i1
=
_fd
;
17
18
return
(
_syscall
(
VFS_PROC_NR
,
FTRUNCATE
, &
m
));
19
}