kenv.2 (108028) | kenv.2 (108087) |
---|---|
1.\" 2.\" Copyright (C) 2002 Chad David <davidc@FreeBSD.org>. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice(s), this list of conditions and the following disclaimer as --- 10 unchanged lines hidden (view full) --- 19.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25.\" DAMAGE. 26.\" | 1.\" 2.\" Copyright (C) 2002 Chad David <davidc@FreeBSD.org>. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice(s), this list of conditions and the following disclaimer as --- 10 unchanged lines hidden (view full) --- 19.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25.\" DAMAGE. 26.\" |
27.\" $FreeBSD: head/lib/libc/sys/kenv.2 108028 2002-12-18 09:22:32Z ru $ | 27.\" $FreeBSD: head/lib/libc/sys/kenv.2 108087 2002-12-19 09:40:28Z ru $ |
28.\" 29.Dd April 17, 2002 30.Dt KENV 2 31.Os 32.Sh NAME 33.Nm kenv 34.Nd kernel environment 35.Sh LIBRARY --- 7 unchanged lines hidden (view full) --- 43.Fn kenv 44system call manipulates kernel environment variables. 45It supports the well known userland actions of getting, setting and unsetting 46environment variables, as well as the ability to dump all of the entries in 47the kernel environment. 48.Pp 49The 50.Fa action | 28.\" 29.Dd April 17, 2002 30.Dt KENV 2 31.Os 32.Sh NAME 33.Nm kenv 34.Nd kernel environment 35.Sh LIBRARY --- 7 unchanged lines hidden (view full) --- 43.Fn kenv 44system call manipulates kernel environment variables. 45It supports the well known userland actions of getting, setting and unsetting 46environment variables, as well as the ability to dump all of the entries in 47the kernel environment. 48.Pp 49The 50.Fa action |
51parameter can be one of the following: | 51argument can be one of the following: |
52.Bl -tag -width ".Dv KENV_UNSET" 53.It Dv KENV_GET 54Returns the value associated with the named kernel environment variable. 55If the variable is not found, \-1 is returned and 56the global variable 57.Va errno 58is set to 59.Er ENOENT . --- 20 unchanged lines hidden (view full) --- 80is 81.Dv NULL , 82.Fn kenv 83will return the number of bytes required to copy out the entire environment. 84.El 85.Pp 86The 87.Fa name | 52.Bl -tag -width ".Dv KENV_UNSET" 53.It Dv KENV_GET 54Returns the value associated with the named kernel environment variable. 55If the variable is not found, \-1 is returned and 56the global variable 57.Va errno 58is set to 59.Er ENOENT . --- 20 unchanged lines hidden (view full) --- 80is 81.Dv NULL , 82.Fn kenv 83will return the number of bytes required to copy out the entire environment. 84.El 85.Pp 86The 87.Fa name |
88parameter is the name of the environment variable to be affected. | 88argument is the name of the environment variable to be affected. |
89In the case of 90.Dv KENV_DUMP 91it is ignored. 92.Pp 93The 94.Fa value | 89In the case of 90.Dv KENV_DUMP 91it is ignored. 92.Pp 93The 94.Fa value |
95parameter contains either the value to set the environment variable | 95argument contains either the value to set the environment variable |
96.Fa name 97to in the case of 98.Dv KENV_SET , 99or it points to the location where 100.Fn kenv 101should copy return data to in the case of 102.Dv KENV_DUMP 103and --- 4 unchanged lines hidden (view full) --- 108.Dv NULL 109in the case of 110.Dv KENV_DUMP , 111.Fn kenv 112will return the number of bytes required to copy out the entire environment. 113.Pp 114The 115.Fa len | 96.Fa name 97to in the case of 98.Dv KENV_SET , 99or it points to the location where 100.Fn kenv 101should copy return data to in the case of 102.Dv KENV_DUMP 103and --- 4 unchanged lines hidden (view full) --- 108.Dv NULL 109in the case of 110.Dv KENV_DUMP , 111.Fn kenv 112will return the number of bytes required to copy out the entire environment. 113.Pp 114The 115.Fa len |
116parameter indicates how many bytes of storage | 116argument indicates how many bytes of storage |
117.Fa value 118points to. 119.Sh RETURN VALUES 120The 121.Fn kenv 122system call returns 0 if successful in the case of 123.Dv KENV_SET 124and --- 10 unchanged lines hidden (view full) --- 135is set to indicate the error. 136.Sh ERRORS 137The 138.Fn kenv 139system call 140will fail if: 141.Bl -tag -width Er 142.It Bq Er EINVAL | 117.Fa value 118points to. 119.Sh RETURN VALUES 120The 121.Fn kenv 122system call returns 0 if successful in the case of 123.Dv KENV_SET 124and --- 10 unchanged lines hidden (view full) --- 135is set to indicate the error. 136.Sh ERRORS 137The 138.Fn kenv 139system call 140will fail if: 141.Bl -tag -width Er 142.It Bq Er EINVAL |
143The |
|
143.Fa action | 144.Fa action |
145argument |
|
144is not a valid option, or the length of the 145.Fa value 146is less than 1 for a 147.Dv KENV_SET . 148.It Bq Er ENOENT 149no value could be found for 150.Fa name 151for a --- 26 unchanged lines hidden --- | 146is not a valid option, or the length of the 147.Fa value 148is less than 1 for a 149.Dv KENV_SET . 150.It Bq Er ENOENT 151no value could be found for 152.Fa name 153for a --- 26 unchanged lines hidden --- |