Copyright (c) 1996 Doug Rabson All rights reserved. This program is free software. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in...
NAMEVOP_LINK - create a new name for a file
SYNOPSISIn sys/param.h In sys/vnode.h Ft int Fn VOP_LINK struct vnode *dvp struct vnode *vp struct componentname *cnp
DESCRIPTIONThis links a new name in the specified directory to an existing file.
Its arguments are:
- Fa dvp
- The vnode of the directory.
- Fa vp
- The vnode of the file to be linked.
- Fa cnp
- Pathname information about the file.
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.
LOCKSFn VOP_LINK expects the directory and file vnodes to be locked on entry and will leave the vnodes locked on return.
RETURN VALUESZero is returned if the file was linked successfully, otherwise an error is returned.
- Bq Er EMLINK
- The file has too many links.
- Bq Er EPERM
- The file is immutable.
- Bq Er EXDEV
- A hard link is not possible between different file systems.