diff options
Diffstat (limited to 'static/freebsd/man9/kernel_mount.9 3.html')
| -rw-r--r-- | static/freebsd/man9/kernel_mount.9 3.html | 160 |
1 files changed, 0 insertions, 160 deletions
diff --git a/static/freebsd/man9/kernel_mount.9 3.html b/static/freebsd/man9/kernel_mount.9 3.html deleted file mode 100644 index 9e4c49e7..00000000 --- a/static/freebsd/man9/kernel_mount.9 3.html +++ /dev/null @@ -1,160 +0,0 @@ -<table class="head"> - <tr> - <td class="head-ltitle">KERNEL_MOUNT(9)</td> - <td class="head-vol">Kernel Developer's Manual</td> - <td class="head-rtitle">KERNEL_MOUNT(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">free_mntarg</code>, - <code class="Nm">kernel_mount</code>, <code class="Nm">mount_arg</code>, - <code class="Nm">mount_argb</code>, <code class="Nm">mount_argf</code>, - <code class="Nm">mount_argsu</code> — <span class="Nd">functions - provided as part of the kernel mount interface</span></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1> -<p class="Pp"><var class="Ft">void</var> - <br/> - <code class="Fn">free_mntarg</code>(<var class="Fa" style="white-space: nowrap;">struct - mntarg *ma</var>);</p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">kernel_mount</code>(<var class="Fa" style="white-space: nowrap;">struct - mntarg *ma</var>, <var class="Fa" style="white-space: nowrap;">int - flags</var>);</p> -<p class="Pp"><var class="Ft">struct mntarg *</var> - <br/> - <code class="Fn">mount_arg</code>(<var class="Fa">struct mntarg *ma</var>, - <var class="Fa">const char *name</var>, <var class="Fa">const void - *val</var>, <var class="Fa">int len</var>);</p> -<p class="Pp"><var class="Ft">struct mntarg *</var> - <br/> - <code class="Fn">mount_argb</code>(<var class="Fa" style="white-space: nowrap;">struct - mntarg *ma</var>, <var class="Fa" style="white-space: nowrap;">int - flag</var>, <var class="Fa" style="white-space: nowrap;">const char - *name</var>);</p> -<p class="Pp"><var class="Ft">struct mntarg *</var> - <br/> - <code class="Fn">mount_argf</code>(<var class="Fa" style="white-space: nowrap;">struct - mntarg *ma</var>, <var class="Fa" style="white-space: nowrap;">const char - *name</var>, <var class="Fa" style="white-space: nowrap;">const char - *fmt</var>, <var class="Fa" style="white-space: nowrap;">...</var>);</p> -<p class="Pp"><var class="Ft">struct mntarg *</var> - <br/> - <code class="Fn">mount_argsu</code>(<var class="Fa">struct mntarg *ma</var>, - <var class="Fa">const char *name</var>, <var class="Fa">const void - *val</var>, <var class="Fa">int len</var>);</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> -<p class="Pp">The - <a class="permalink" href="#kernel_mount"><code class="Fn" id="kernel_mount">kernel_mount</code></a>() - family of functions are provided as an API for building a list of mount - arguments which will be used to mount file systems from inside the kernel. - By accumulating a list of arguments, the API takes shape and provides the - information necessary for the kernel to control the - <a class="Xr">mount(8)</a> utility. When an error occurs, the process will - stop. This will not cause a <a class="Xr">panic(9)</a>.</p> -<p class="Pp">The header of the structure is stored in - <span class="Pa">src/sys/kern/vfs_mount.c</span> which permits automatic - structure creation to ease the mount process. Memory allocation must always - be freed when the entire process is complete, it is an error otherwise.</p> -<p class="Pp" id="free_mntarg">The - <a class="permalink" href="#free_mntarg"><code class="Fn">free_mntarg</code></a>() - function is used to free or clear the <var class="Vt">mntarg</var> - structure.</p> -<p class="Pp" id="kernel_mount~2">The - <a class="permalink" href="#kernel_mount~2"><code class="Fn">kernel_mount</code></a>() - function pulls information from the structure to perform the mount request - on a given file system. Additionally, the - <code class="Fn">kernel_mount</code>() function always calls the - <code class="Fn">free_mntarg</code>() function. If <var class="Fa">ma</var> - contains any error code generated during the construction, that code will be - called and the file system mount will not be attempted.</p> -<p class="Pp" id="mount_arg">The - <a class="permalink" href="#mount_arg"><code class="Fn">mount_arg</code></a>() - function takes a plain argument and crafts parts of the structure with - regards to various mount options. If the length is a value less than 0, - <a class="Xr">strlen(3)</a> is used. This argument will be referenced until - either <code class="Fn">free_mntarg</code>() or - <code class="Fn">kernel_mount</code>() is called.</p> -<p class="Pp" id="mount_argb">The - <a class="permalink" href="#mount_argb"><code class="Fn">mount_argb</code></a>() - function is used to add boolean arguments to the structure. The - <var class="Fa">flag</var> is the boolean value and - <var class="Fa">name</var> must start with - "<code class="Li">no</code>", otherwise a panic will occur.</p> -<p class="Pp" id="mount_argf">The - <a class="permalink" href="#mount_argf"><code class="Fn">mount_argf</code></a>() - function adds <a class="Xr">printf(9)</a> style arguments to the current - structure.</p> -<p class="Pp" id="mount_argsu">The - <a class="permalink" href="#mount_argsu"><code class="Fn">mount_argsu</code></a>() - function will add arguments to the structure from a userland string.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1> -<p class="Pp">An example of the <code class="Fn">*_cmount</code>() function:</p> -<div class="Bd Pp Li"> -<pre>static int -msdosfs_cmount(struct mntarg *ma, void *data, int flags, struct thread *td) -{ - struct msdosfs_args args; - int error; - - if (data == NULL) - return (EINVAL); - error = copyin(data, &args, sizeof(args)); - if (error) - return (error); - - ma = mount_argsu(ma, "from", args.fspec, MAXPATHLEN); - ma = mount_arg(ma, "export", &args.export, sizeof(args.export)); - ma = mount_argf(ma, "uid", "%d", args.uid); - ma = mount_argf(ma, "gid", "%d", args.gid); - ma = mount_argf(ma, "mask", "%d", args.mask); - ma = mount_argf(ma, "dirmask", "%d", args.dirmask); - - ma = mount_argb(ma, args.flags & MSDOSFSMNT_SHORTNAME, "noshortname"); - ma = mount_argb(ma, args.flags & MSDOSFSMNT_LONGNAME, "nolongname"); - ma = mount_argb(ma, !(args.flags & MSDOSFSMNT_NOWIN95), "nowin95"); - ma = mount_argb(ma, args.flags & MSDOSFSMNT_KICONV, "nokiconv"); - - ma = mount_argsu(ma, "cs_win", args.cs_win, MAXCSLEN); - ma = mount_argsu(ma, "cs_dos", args.cs_dos, MAXCSLEN); - ma = mount_argsu(ma, "cs_local", args.cs_local, MAXCSLEN); - - error = kernel_mount(ma, flags); - - return (error); -}</pre> -</div> -</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">VFS(9)</a>, <a class="Xr">VFS_MOUNT(9)</a></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1> -<p class="Pp">The <code class="Fn">kernel_mount</code>() family of functions and - this manual page first appeared in <span class="Ux">FreeBSD 6.0</span>.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1> -<p class="Pp">The <code class="Fn">kernel_mount</code>() family of functions and - API was developed by <span class="An">Poul-Henning Kamp</span> - <<a class="Mt" href="mailto:phk@FreeBSD.org">phk@FreeBSD.org</a>>. - This manual page was written by <span class="An">Tom Rhodes</span> - <<a class="Mt" href="mailto:trhodes@FreeBSD.org">trhodes@FreeBSD.org</a>>.</p> -</section> -</div> -<table class="foot"> - <tr> - <td class="foot-date">November 20, 2021</td> - <td class="foot-os">FreeBSD 15.0</td> - </tr> -</table> |
