ftruncate test
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
/dup.out
|
||||
/fchdir
|
||||
/fsync
|
||||
/ftruncate
|
||||
/ftruncate.out
|
||||
/math
|
||||
/printf
|
||||
/write
|
||||
|
||||
@@ -7,6 +7,7 @@ BINS=\
|
||||
dup \
|
||||
fchdir \
|
||||
fsync \
|
||||
ftruncate \
|
||||
math \
|
||||
printf \
|
||||
write
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main (int argc, char** argv) {
|
||||
int fd = creat("ftruncate.out", 0777);
|
||||
int status;
|
||||
status = ftruncate(fd, 100);
|
||||
printf("ftruncate exited with status code %d\n", status);
|
||||
close(fd);
|
||||
}
|
||||
Reference in New Issue
Block a user