Commit ffea784e authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Implement LoopbackFile.Truncate.

parent e8e94fea
......@@ -192,3 +192,7 @@ func (me *LoopbackFile) Release() {
func (me *LoopbackFile) Fsync(*FsyncIn) (code Status) {
return Status(syscall.Fsync(me.file.Fd()))
}
func (me *LoopbackFile) Truncate(size uint64) Status {
return Status(syscall.Ftruncate(me.file.Fd(), int64(size)))
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment