| Main index | Section 9 | 日本語 | Options |
#include <sys/param.h>
#include <sys/vnode.h>
The arguments are:
| vp | |
| The vnode of the file. | |
| mode | |
| The access mode required by the calling process. | |
| cred | |
| The caller's credentials. | |
| td | |
| The thread which is accessing the file. | |
| fp | |
| The file being opened. | |
Pointer to the file fp is useful for file systems which require such information, e.g., fdescfs(5). Use ‘NULL’ as fp argument to VOP_OPEN() for in-kernel opens.
The access mode is a set of flags, including FREAD, FWRITE, O_NONBLOCK, O_APPEND.
VOP_CLOSE() expects at least a reference to be associated with the vnode and does not care whether the vnode is locked or not. The lock and reference state is left unchanged on return. Note that vn_close expects an unlocked, referenced vnode and will dereference the vnode prior to returning.
| VOP_OPEN (9) | December 2, 2009 |
| Main index | Section 9 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | This philosophy, in the hands of amateurs, leads to inexplicably mind-numbing botches like the existence of two programs, “head” and “tail,” which print the first part or the last part of a file, depending. Even though their operations are duals of one another, “head” and “tail” are different programs, written by different authors, and take different options! | ” |
| — The Unix Haters' handbook | ||