diff options
Diffstat (limited to 'static/freebsd/man9/vfs_getopt.9 4.html')
| -rw-r--r-- | static/freebsd/man9/vfs_getopt.9 4.html | 176 |
1 files changed, 0 insertions, 176 deletions
diff --git a/static/freebsd/man9/vfs_getopt.9 4.html b/static/freebsd/man9/vfs_getopt.9 4.html deleted file mode 100644 index 442b6a2a..00000000 --- a/static/freebsd/man9/vfs_getopt.9 4.html +++ /dev/null @@ -1,176 +0,0 @@ -<table class="head"> - <tr> - <td class="head-ltitle">VFS_GETOPT(9)</td> - <td class="head-vol">Kernel Developer's Manual</td> - <td class="head-rtitle">VFS_GETOPT(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">vfs_getopt</code>, - <code class="Nm">vfs_getopts</code>, <code class="Nm">vfs_flagopt</code>, - <code class="Nm">vfs_scanopt</code>, <code class="Nm">vfs_copyopt</code>, - <code class="Nm">vfs_filteropt</code>, <code class="Nm">vfs_setopt</code>, - <code class="Nm">vfs_setopt_part</code>, <code class="Nm">vfs_setopts</code> - — <span class="Nd">manipulate mount options and their - values</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 - <<a class="In">sys/param.h</a>></code> - <br/> - <code class="In">#include <<a class="In">sys/mount.h</a>></code></p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">vfs_getopt</code>(<var class="Fa">struct vfsoptlist - *opts</var>, <var class="Fa">const char *name</var>, <var class="Fa">void - **buf</var>, <var class="Fa">int *len</var>);</p> -<p class="Pp"><var class="Ft">char *</var> - <br/> - <code class="Fn">vfs_getopts</code>(<var class="Fa" style="white-space: nowrap;">struct - vfsoptlist *opts</var>, <var class="Fa" style="white-space: nowrap;">const - char *name</var>, <var class="Fa" style="white-space: nowrap;">int - *error</var>);</p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">vfs_flagopt</code>(<var class="Fa">struct vfsoptlist - *opts</var>, <var class="Fa">const char *name</var>, - <var class="Fa">uint64_t *flags</var>, <var class="Fa">uint64_t - flag</var>);</p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">vfs_scanopt</code>(<var class="Fa">struct vfsoptlist - *opts</var>, <var class="Fa">const char *name</var>, <var class="Fa">const - char *fmt</var>, <var class="Fa">...</var>);</p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">vfs_copyopt</code>(<var class="Fa">struct vfsoptlist - *opts</var>, <var class="Fa">const char *name</var>, <var class="Fa">void - *dest</var>, <var class="Fa">int len</var>);</p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">vfs_filteropt</code>(<var class="Fa">struct vfsoptlist - *opts</var>, <var class="Fa">const char **legal</var>);</p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">vfs_setopt</code>(<var class="Fa">struct vfsoptlist - *opts</var>, <var class="Fa">const char *name</var>, <var class="Fa">void - *value</var>, <var class="Fa">int len</var>);</p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">vfs_setopt_part</code>(<var class="Fa">struct vfsoptlist - *opts</var>, <var class="Fa">const char *name</var>, <var class="Fa">void - *value</var>, <var class="Fa">int len</var>);</p> -<p class="Pp"><var class="Ft">int</var> - <br/> - <code class="Fn">vfs_setopts</code>(<var class="Fa">struct vfsoptlist - *opts</var>, <var class="Fa">const char *name</var>, <var class="Fa">const - char *value</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="#vfs_getopt"><code class="Fn" id="vfs_getopt">vfs_getopt</code></a>() - function sets <var class="Fa">buf</var> to point to the value of the named - mount option, and sets <var class="Fa">len</var> to the length of the value - if it is not <code class="Dv">NULL</code>. The <var class="Fa">buf</var> - argument will point to the actual value, and does not need to be freed or - released (and probably should not be modified).</p> -<p class="Pp" id="vfs_getopts">The - <a class="permalink" href="#vfs_getopts"><code class="Fn">vfs_getopts</code></a>() - function returns the value of the specified option if it is a string (i.e., - <code class="Dv">NUL</code> terminated).</p> -<p class="Pp" id="vfs_flagopt">The - <a class="permalink" href="#vfs_flagopt"><code class="Fn">vfs_flagopt</code></a>() - function determines if an option exists. If the option does exist, and - <var class="Fa">flags</var> is not <code class="Dv">NULL</code>, - <var class="Fa">flag</var> is added to those already set in - <var class="Fa">flags</var>. If the option does not exist, and - <var class="Fa">flags</var> is not <code class="Dv">NULL</code>, - <var class="Fa">flag</var> is removed from those already set in - <var class="Fa">flags</var>. An example of typical usage is:</p> -<div class="Bd Pp Li"> -<pre>if (vfs_flagopt(mp->mnt_optnew, "wormlike", NULL, 0)) - vfs_flagopt(mp->mnt_optnew, "appendok", &(mp->flags), F_APPENDOK);</pre> -</div> -<p class="Pp" id="vfs_scanopt">The - <a class="permalink" href="#vfs_scanopt"><code class="Fn">vfs_scanopt</code></a>() - function performs a <a class="Xr">vsscanf(3)</a> with the option's value, - using the given format, into the specified variable arguments. The value - must be a string (i.e., <code class="Dv">NUL</code> terminated).</p> -<p class="Pp" id="vfs_copyopt">The - <a class="permalink" href="#vfs_copyopt"><code class="Fn">vfs_copyopt</code></a>() - function creates a copy of the option's value. The <var class="Fa">len</var> - argument must match the length of the option's value exactly (i.e., a larger - buffer will still cause - <a class="permalink" href="#vfs_copyout"><code class="Fn" id="vfs_copyout">vfs_copyout</code></a>() - to fail with <code class="Er">EINVAL</code>).</p> -<p class="Pp" id="vfs_filteropt">The - <a class="permalink" href="#vfs_filteropt"><code class="Fn">vfs_filteropt</code></a>() - function ensures that no unknown options were specified. A option is valid - if its name matches one of the names in the list of legal names. An option - may be prefixed with 'no', and still be considered valid.</p> -<p class="Pp" id="vfs_setopt">The - <a class="permalink" href="#vfs_setopt"><code class="Fn">vfs_setopt</code></a>() - and - <a class="permalink" href="#vfs_setopt_part"><code class="Fn" id="vfs_setopt_part">vfs_setopt_part</code></a>() - functions copy new data into the option's value. In - <code class="Fn">vfs_setopt</code>(), the <var class="Fa">len</var> argument - must match the length of the option's value exactly (i.e., a larger buffer - will still cause <code class="Fn">vfs_copyout</code>() to fail with - <code class="Er">EINVAL</code>).</p> -<p class="Pp" id="vfs_setopts">The - <a class="permalink" href="#vfs_setopts"><code class="Fn">vfs_setopts</code></a>() - function copies a new string into the option's value. The string, including - <code class="Dv">NUL</code> byte, must be no longer than the option's - length.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN - VALUES</a></h1> -<p class="Pp">The <code class="Fn">vfs_getopt</code>() function returns 0 if the - option was found; otherwise, <code class="Er">ENOENT</code> is returned.</p> -<p class="Pp">The <code class="Fn">vfs_getopts</code>() function returns the - specified option if it is found, and is <code class="Dv">NUL</code> - terminated. If the option was found, but is not <code class="Dv">NUL</code> - terminated, <var class="Fa">error</var> is set to - <code class="Er">EINVAL</code> and <code class="Dv">NULL</code> is returned. - If the option was not found, <var class="Fa">error</var> is set to 0, and - <code class="Dv">NULL</code> is returned.</p> -<p class="Pp">The <code class="Fn">vfs_flagopt</code>() function returns 1 if - the option was found, and 0 if it was not.</p> -<p class="Pp">The <code class="Fn">vfs_scanopt</code>() function returns 0 if - the option was not found, or was not <code class="Dv">NUL</code> terminated; - otherwise, the return value of <a class="Xr">vsscanf(3)</a> is returned. If - <a class="Xr">vsscanf(3)</a> returns 0, it will be returned unchanged; - therefore, a return value of 0 does not always mean the option does not - exist, or is not a valid string.</p> -<p class="Pp">The <code class="Fn">vfs_copyopt</code>() and - <code class="Fn">vfs_setopt</code>() functions return 0 if the copy was - successful, <code class="Er">EINVAL</code> if the option was found but the - lengths did not match, and <code class="Er">ENOENT</code> if the option was - not found.</p> -<p class="Pp">The <code class="Fn">vfs_filteropt</code>() function returns 0 if - all of the options are legal; otherwise, <code class="Er">EINVAL</code> is - returned.</p> -<p class="Pp">The <code class="Fn">vfs_setopts</code>() function returns 0 if - the copy was successful, <code class="Er">EINVAL</code> if the option was - found but the string was too long, and <code class="Er">ENOENT</code> if the - option was not found.</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">Chad David</span> - <<a class="Mt" href="mailto:davidc@FreeBSD.org">davidc@FreeBSD.org</a>> - and <span class="An">Ruslan Ermilov</span> - <<a class="Mt" href="mailto:ru@FreeBSD.org">ru@FreeBSD.org</a>>.</p> -</section> -</div> -<table class="foot"> - <tr> - <td class="foot-date">May 19, 2024</td> - <td class="foot-os">FreeBSD 15.0</td> - </tr> -</table> |
