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