VOP_OPEN VOP_CLOSE - open or close a file
The arguments are:
Pointer to the file
Fa fp
is useful for file systems which require such information, e.g.,
fdescfs(5).
Use
`NULL'
as
Fa 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
Fa vn_close
expects an unlocked, referenced vnode and will dereference the vnode prior
to returning.
int
vop_open(struct vnode *vp, int mode, struct ucred *cred, struct thread *td,
struct file *fp)
{
/*
* Most file systems don't do much here.
*/
return 0;
}
|
Закладки на сайте Проследить за страницей |
Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |