1*95acdafaSAntonio Huete Jimenez.\" Copyright (c) 1996 Doug Rabson 2*95acdafaSAntonio Huete Jimenez.\" 3*95acdafaSAntonio Huete Jimenez.\" All rights reserved. 4*95acdafaSAntonio Huete Jimenez.\" 5*95acdafaSAntonio Huete Jimenez.\" This program is free software. 6*95acdafaSAntonio Huete Jimenez.\" 7*95acdafaSAntonio Huete Jimenez.\" Redistribution and use in source and binary forms, with or without 8*95acdafaSAntonio Huete Jimenez.\" modification, are permitted provided that the following conditions 9*95acdafaSAntonio Huete Jimenez.\" are met: 10*95acdafaSAntonio Huete Jimenez.\" 1. Redistributions of source code must retain the above copyright 11*95acdafaSAntonio Huete Jimenez.\" notice, this list of conditions and the following disclaimer. 12*95acdafaSAntonio Huete Jimenez.\" 2. Redistributions in binary form must reproduce the above copyright 13*95acdafaSAntonio Huete Jimenez.\" notice, this list of conditions and the following disclaimer in the 14*95acdafaSAntonio Huete Jimenez.\" documentation and/or other materials provided with the distribution. 15*95acdafaSAntonio Huete Jimenez.\" 16*95acdafaSAntonio Huete Jimenez.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 17*95acdafaSAntonio Huete Jimenez.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18*95acdafaSAntonio Huete Jimenez.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19*95acdafaSAntonio Huete Jimenez.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 20*95acdafaSAntonio Huete Jimenez.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21*95acdafaSAntonio Huete Jimenez.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22*95acdafaSAntonio Huete Jimenez.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23*95acdafaSAntonio Huete Jimenez.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24*95acdafaSAntonio Huete Jimenez.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25*95acdafaSAntonio Huete Jimenez.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26*95acdafaSAntonio Huete Jimenez.\" 27*95acdafaSAntonio Huete Jimenez.\" $FreeBSD: src/share/man/man9/VOP_CREATE.9,v 1.9.2.1 2001/12/17 11:30:18 ru Exp $ 28*95acdafaSAntonio Huete Jimenez.\" 29*95acdafaSAntonio Huete Jimenez.Dd October 13, 2014 30*95acdafaSAntonio Huete Jimenez.Dt VOP_OLD_CREATE 9 31*95acdafaSAntonio Huete Jimenez.Os 32*95acdafaSAntonio Huete Jimenez.Sh NAME 33*95acdafaSAntonio Huete Jimenez.Nm VOP_OLD_CREATE , 34*95acdafaSAntonio Huete Jimenez.Nm VOP_OLD_MKNOD , 35*95acdafaSAntonio Huete Jimenez.Nm VOP_OLD_MKDIR , 36*95acdafaSAntonio Huete Jimenez.Nm VOP_OLD_SYMLINK 37*95acdafaSAntonio Huete Jimenez.Nd create a file, socket, fifo, device, directory or symlink 38*95acdafaSAntonio Huete Jimenez.Sh SYNOPSIS 39*95acdafaSAntonio Huete Jimenez.In sys/param.h 40*95acdafaSAntonio Huete Jimenez.In sys/vnode.h 41*95acdafaSAntonio Huete Jimenez.In sys/namei.h 42*95acdafaSAntonio Huete Jimenez.Ft int 43*95acdafaSAntonio Huete Jimenez.Fn VOP_OLD_CREATE "struct vnode *dvp" "struct vnode **vpp" "struct componentname *cnp" "struct vattr *vap" 44*95acdafaSAntonio Huete Jimenez.Ft int 45*95acdafaSAntonio Huete Jimenez.Fn VOP_OLD_MKNOD "struct vnode *dvp" "struct vnode **vpp" "struct componentname *cnp" "struct vattr *vap" 46*95acdafaSAntonio Huete Jimenez.Ft int 47*95acdafaSAntonio Huete Jimenez.Fn VOP_OLD_MKDIR "struct vnode *dvp" "struct vnode **vpp" "struct componentname *cnp" "struct vattr *vap" 48*95acdafaSAntonio Huete Jimenez.Ft int 49*95acdafaSAntonio Huete Jimenez.Fn VOP_OLD_SYMLINK "struct vnode *dvp" "struct vnode **vpp" "struct componentname *cnp" "struct vattr *vap" "char *target" 50*95acdafaSAntonio Huete Jimenez.Sh DESCRIPTION 51*95acdafaSAntonio Huete JimenezThese entry points create a new file, socket, fifo, device, directory or symlink 52*95acdafaSAntonio Huete Jimenezin a given directory. 53*95acdafaSAntonio Huete Jimenez.Pp 54*95acdafaSAntonio Huete JimenezThe arguments are: 55*95acdafaSAntonio Huete Jimenez.Bl -tag -width target 56*95acdafaSAntonio Huete Jimenez.It Fa dvp 57*95acdafaSAntonio Huete Jimenezthe locked vnode of the directory 58*95acdafaSAntonio Huete Jimenez.It Fa vpp 59*95acdafaSAntonio Huete Jimenezthe address of a variable where the resulting locked vnode should be stored 60*95acdafaSAntonio Huete Jimenez.It Fa cnp 61*95acdafaSAntonio Huete Jimenezthe pathname component created 62*95acdafaSAntonio Huete Jimenez.It Fa vap 63*95acdafaSAntonio Huete Jimenezthe attributes that the new object should be created with 64*95acdafaSAntonio Huete Jimenez.It Fa target 65*95acdafaSAntonio Huete Jimenezthe pathname of the target of the symlink 66*95acdafaSAntonio Huete Jimenez.El 67*95acdafaSAntonio Huete Jimenez.Pp 68*95acdafaSAntonio Huete JimenezThese entry points are called after 69*95acdafaSAntonio Huete Jimenez.Xr VOP_OLD_LOOKUP 9 70*95acdafaSAntonio Huete Jimenezwhen an object is being created. 71*95acdafaSAntonio Huete JimenezIf an error is detected when creating the file, 72*95acdafaSAntonio Huete Jimenezthen this memory will be freed. 73*95acdafaSAntonio Huete JimenezIf the file is created successfully, then it will be freed. 74*95acdafaSAntonio Huete Jimenez.Sh LOCKS 75*95acdafaSAntonio Huete JimenezThe directory, 76*95acdafaSAntonio Huete Jimenez.Fa dvp 77*95acdafaSAntonio Huete Jimenezwill be locked on entry and must remain locked on return. 78*95acdafaSAntonio Huete JimenezIf the call is successful, the new object will be returned locked. 79*95acdafaSAntonio Huete Jimenez.Sh RETURN VALUES 80*95acdafaSAntonio Huete JimenezIf successful, the vnode for the new object is placed in 81*95acdafaSAntonio Huete Jimenez.Fa *vpp 82*95acdafaSAntonio Huete Jimenezand zero is returned. Otherwise, an appropriate error is returned. 83*95acdafaSAntonio Huete Jimenez.Sh ERRORS 84*95acdafaSAntonio Huete Jimenez.Bl -tag -width Er 85*95acdafaSAntonio Huete Jimenez.It Bq Er ENOSPC 86*95acdafaSAntonio Huete JimenezThe filesystem is full. 87*95acdafaSAntonio Huete Jimenez.It Bq Er EDQUOT 88*95acdafaSAntonio Huete JimenezQuota exceeded. 89*95acdafaSAntonio Huete Jimenez.El 90*95acdafaSAntonio Huete Jimenez.Sh SEE ALSO 91*95acdafaSAntonio Huete Jimenez.Xr vnode 9 , 92*95acdafaSAntonio Huete Jimenez.Xr VOP_OLD_LOOKUP 9 93*95acdafaSAntonio Huete Jimenez.Sh HISTORY 94*95acdafaSAntonio Huete JimenezThe function 95*95acdafaSAntonio Huete Jimenez.Nm 96*95acdafaSAntonio Huete Jimenezappeared in 97*95acdafaSAntonio Huete Jimenez.Bx 4.3 . 98*95acdafaSAntonio Huete Jimenez.Sh AUTHORS 99*95acdafaSAntonio Huete JimenezThis man page was written by 100*95acdafaSAntonio Huete Jimenez.An Doug Rabson . 101