summaryrefslogtreecommitdiff
path: root/static/freebsd/man9/VOP_CREATE.9 4.html
blob: c1f2434353bece31c1425dcb24d58b6859aa7c78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<table class="head">
  <tr>
    <td class="head-ltitle">VOP_CREATE(9)</td>
    <td class="head-vol">Kernel Developer's Manual</td>
    <td class="head-rtitle">VOP_CREATE(9)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">VOP_CREATE</code>,
    <code class="Nm">VOP_MKNOD</code>, <code class="Nm">VOP_MKDIR</code>,
    <code class="Nm">VOP_SYMLINK</code> &#x2014; <span class="Nd">create a file,
    socket, fifo, device, directory or symlink</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
    &lt;<a class="In">sys/param.h</a>&gt;</code>
  <br/>
  <code class="In">#include &lt;<a class="In">sys/vnode.h</a>&gt;</code>
  <br/>
  <code class="In">#include &lt;<a class="In">sys/namei.h</a>&gt;</code></p>
<p class="Pp"><var class="Ft">int</var>
  <br/>
  <code class="Fn">VOP_CREATE</code>(<var class="Fa" style="white-space: nowrap;">struct
    vnode *dvp</var>, <var class="Fa" style="white-space: nowrap;">struct vnode
    **vpp</var>, <var class="Fa" style="white-space: nowrap;">struct
    componentname *cnp</var>,
    <var class="Fa" style="white-space: nowrap;">struct vattr *vap</var>);</p>
<p class="Pp"><var class="Ft">int</var>
  <br/>
  <code class="Fn">VOP_MKNOD</code>(<var class="Fa" style="white-space: nowrap;">struct
    vnode *dvp</var>, <var class="Fa" style="white-space: nowrap;">struct vnode
    **vpp</var>, <var class="Fa" style="white-space: nowrap;">struct
    componentname *cnp</var>,
    <var class="Fa" style="white-space: nowrap;">struct vattr *vap</var>);</p>
<p class="Pp"><var class="Ft">int</var>
  <br/>
  <code class="Fn">VOP_MKDIR</code>(<var class="Fa" style="white-space: nowrap;">struct
    vnode *dvp</var>, <var class="Fa" style="white-space: nowrap;">struct vnode
    **vpp</var>, <var class="Fa" style="white-space: nowrap;">struct
    componentname *cnp</var>,
    <var class="Fa" style="white-space: nowrap;">struct vattr *vap</var>);</p>
<p class="Pp"><var class="Ft">int</var>
  <br/>
  <code class="Fn">VOP_SYMLINK</code>(<var class="Fa" style="white-space: nowrap;">struct
    vnode *dvp</var>, <var class="Fa" style="white-space: nowrap;">struct vnode
    **vpp</var>, <var class="Fa" style="white-space: nowrap;">struct
    componentname *cnp</var>,
    <var class="Fa" style="white-space: nowrap;">struct vattr *vap</var>,
    <var class="Fa" style="white-space: nowrap;">const char *target</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">These entry points create a new file, socket, fifo, device,
    directory or symlink in a given directory.</p>
<p class="Pp">The arguments are:</p>
<dl class="Bl-tag">
  <dt><var class="Fa">dvp</var></dt>
  <dd>The locked vnode of the directory.</dd>
  <dt><var class="Fa">vpp</var></dt>
  <dd>The address of a variable where the resulting locked vnode should be
      stored.</dd>
  <dt><var class="Fa">cnp</var></dt>
  <dd>The pathname component created.</dd>
  <dt><var class="Fa">vap</var></dt>
  <dd>The attributes that the new object should be created with.</dd>
  <dt><var class="Fa">target</var></dt>
  <dd>The pathname of the target of the symlink.</dd>
</dl>
<p class="Pp">These entry points are called after
    <a class="Xr">VOP_LOOKUP(9)</a> when an object is being created.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="LOCKS"><a class="permalink" href="#LOCKS">LOCKS</a></h1>
<p class="Pp">The directory, <var class="Fa">dvp</var> will be locked on entry
    and must remain locked on return. If the call is successful, the new object
    will be returned locked.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN
  VALUES</a></h1>
<p class="Pp">If successful, the vnode for the new object is placed in
    <var class="Fa">*vpp</var> and zero is returned. Otherwise, an appropriate
    error is returned.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<dl class="Bl-tag">
  <dt id="ENOSPC">[<a class="permalink" href="#ENOSPC"><code class="Er">ENOSPC</code></a>]</dt>
  <dd>The file system is full.</dd>
  <dt id="EDQUOT">[<a class="permalink" href="#EDQUOT"><code class="Er">EDQUOT</code></a>]</dt>
  <dd>The user's file system space or inode quota would be exceeded.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<p class="Pp"><a class="Xr">vnode(9)</a>, <a class="Xr">VOP_LOOKUP(9)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The function <code class="Nm">VOP_CREATE</code> appeared in
    <span class="Ux">4.3BSD</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">This manual page was written by <span class="An">Doug
    Rabson</span>.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">November 2, 2018</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>