/* COVERAGE: ftruncate truncate */ #include #include #include #include int main() { int fd; fd = creat("foobar",S_IREAD|S_IWRITE); ftruncate(fd, 1024); // ftruncate (4, 1024) = 0 close(fd); truncate("foobar", 2048); // truncate ("foobar", 2048) = 0 return 0; }