NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO
#include <env/chEnv.h>int sysSetEnv(const char *envName, const char *envValue);
The sysSetEnv() system call inserts an environment variable and its value into the the ChorusOS configuration environment. The envName pointer points to a null terminated string containing the environment variable to be set. The envValue pointer points to a null-terminated string containing the corresponding value of the environment variable.
Any existing value for envName in the configuration environment is removed and replaced by envValue.
Upon successful completion K_OK is returned and the environment variable name and value are inserted into the configuration environment. Otherwise, a negative error code is returned.
envName was zero length, or an invalide name for a ChorusOS configuration environment variable.
For both user and supervisor access, there was insufficient space in the ChorusOS configuration environment to store envName and envValue. For user mode access, the string size of either envName or envValue exceeded the internal size limits imposed by the user system call implementation. The default values of these limits are 32 bytes for envName, and 256 bytes for envValue.
Some of the data provided are outside the current actor's address space.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO