|
NAMEVOP_COPY_FILE_RANGE —
copy a byte range from one file to another or within one file in
a single file system
SYNOPSIS#include <sys/param.h>
#include <sys/vnode.h>
int
DESCRIPTIONThis entry point copies a byte range from one regular file to another or within one file in a single file system. invp and outvp can refer to the same file. For this case, the byte ranges defined by *inoff, *outoff and *len will not overlap.The arguments are:
On entry and on return, the inoff and outoff arguments point to the locations of the file offsets. These file offsets should be updated by the number of bytes copied. The len argument points to the location that stores the number of bytes to be copied. Upon a successful return len will be updated to the number of bytes actually copied. Normally, this will be the number of bytes requested to be copied, however a copy of fewer bytes than requested is permitted. This does not necessarily indicate that the copy reached EOF on the input file. However, if the value pointed to by the len argument is zero upon a successful return, it indicates that the offset pointed to by inoff is at or beyond EOF on the input file. LOCKSThe vnode are unlocked on entry and must be unlocked on return. The byte ranges for both invp and outvp should be range locked when this call is done.RETURN VALUESZero is returned on success, otherwise an error code is returned.ERRORS
SEE ALSOvn_rdwr(9), vnode(9)
Visit the GSP FreeBSD Man Page Interface. |