1 #include <sys/cdefs.h> 2 #include "namespace.h" 3 #include <lib.h> 4 5 #include <minix/u64.h> 6 #include <string.h> 7 #include <unistd.h> 8 truncate(const char * _path,off_t _length)9int truncate(const char *_path, off_t _length) 10 { 11 message m; 12 13 memset(&m, 0, sizeof(m)); 14 m.m_lc_vfs_truncate.name = (vir_bytes)_path; 15 m.m_lc_vfs_truncate.len = strlen(_path)+1; 16 m.m_lc_vfs_truncate.offset = _length; 17 18 return(_syscall(VFS_PROC_NR, VFS_TRUNCATE, &m)); 19 } 20