Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
VOP_TRUNCATE(9)	       FreeBSD Kernel Developer's Manual       VOP_TRUNCATE(9)

NAME
     VOP_TRUNCATE -- truncate a	file

SYNOPSIS
     #include <sys/vnode.h>

     int
     VOP_TRUNCATE(struct vnode *vp, off_t length, int flags,
	 struct	ucred *cred, struct proc *p);

DESCRIPTION
     The arguments are:

     vp	     The file to truncate.

     length  The desired new length of the file.

     flags   Flags controlling I/O.

     cred    Credentials of the	caller.

     p	     Current process.

     The size of file vp is set	to length.  The	file can be both truncated and
     extended by this call.  If	flags contains the value IO_SYNC then all
     writes to the filesystem should complete before the call returns.	This
     call is used internally by	the UFS	filesystem as part of its implementa-
     tion of VOP_SETATTR(9).

RETURN VALUES
     Zero is returned on success, otherwise an error is	returned.

SEE ALSO
     vnode(9), VOP_SETATTR(9)

AUTHORS
     This man page was written by Doug Rabson.

FreeBSD	11.1			 July 24, 1996			  FreeBSD 11.1

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | SEE ALSO | AUTHORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=VOP_TRUNCATE&sektion=9&manpath=FreeBSD+2.2.1-RELEASE>

home | help