VOP_LINK - create a new name for a file
Its arguments are:
The pathname info should not be released on exit because it is done by the caller. The directory and file vnodes should not be released on exit.
int
vop_link(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
{
int error = 0;
if (vp->v_mount != dvp->v_mount)
return (EXDEV);
if (vp would have too many links)
return (EMLINK);
if (vp is immutable)
return (EPERM);
/*
* Increment link count of vp and write back the on-disc version of it.
*/
...;
if (!error) {
/*
* Add the new name to the directory.
*/
...;
}
return error;
}
|
Закладки на сайте Проследить за страницей |
Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |