Validates file offsets.
Item | Description |
---|---|
vp | Points to the virtual node (v-node) of the file. |
offp | Points to the location of the new offset to validate. |
crp | Points to the user's credential. |
The vnop_seek entry point is called by the logical file system to validate a new offset that has been computed by the lseek, llseek, and lseek64 subroutines. The file system implementation should check the offset pointed to by offp and if it is acceptable for the file, return zero. If the offset is not acceptable, the routine should return a non-zero value. EINVAL is the suggested error value for invalid offsets.
File systems which do not wish to do offset validation can simply return 0. File systems which do not provide the vnop_seek entry point will have a maximum offset of OFF_MAX (2 gigabytes minus 1) enforced by the logical file system.
The vnop_seek entry point is be called from the process environment only.
Item | Description |
---|---|
0 | Indicates success. |
Nonzero | Return values are returned the /usr/include/sys/errno.h file to indicate failure. |