3 .\" The DragonFly Project. All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in
13 .\" the documentation and/or other materials provided with the
15 .\" 3. Neither the name of The DragonFly Project nor the names of its
16 .\" contributors may be used to endorse or promote products derived
17 .\" from this software without specific, prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
29 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 .Nd variant symlink variables
46 .Fn varsym_get "int mask" "const char *wild" "char *buf" "int bufsize"
48 .Fn varsym_set "int level" "const char *name" "const char *data"
50 .Fn varsym_list "int level" "char *buf" "int maxsize" "int *marker"
54 system call retrieves the value of the first variable whose left side matches
56 and return the value in
59 specifies the length of the buffer and
61 can be used to further restrict the search to variables of certain type.
64 will search all variables (see below for other mask definitions).
71 to the value pointed to by
76 system call fills the buffer
78 with variable settings for the specified
82 bytes of settings are returned and
84 is set to the actual number of name/value pairs read, or -1 if no more
87 must be called repeatedly until
89 is -1 if all settings are to be retrieved.
90 The format of the buffer is
91 .Dq \e000name\e000value\e000name\e000value... .
95 levels (and masks) are defined in
97 .Bl -tag -width indent
98 .It Dv VARSYM_PROC Pq Dv VARSYM_PROC_MASK
99 Per-process variables.
100 .\".It Dv VARSYM_USER Pq Dv VARSYM_USER_MASK
101 .\"Per-user variables.
102 .It Dv VARSYM_SYS Pq Dv VARSYM_SYS_MASK
103 System wide variables.
108 .Rv -std varsym_get varsym_set
112 function returns the number of bytes read if successful;
113 otherwise the value -1 is returned and the global variable
115 is set to indicate the error.
119 system calls will fail when one of the following occurs:
126 A variable could not be found.
128 Insufficient space for storing variable values was specified.
135 system calls first appeared in
141 system calls were written by
143 and this manual page was written by