NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO
#include <env/chEnv.h>int sysGetEnv(const char *envName, char *envValue, unsigned int *size);
ENV
The sysGetEnv system call copies the value from the Chorus configuration environment defined by the variable envName, into the buffer pointed to by envValue. The envName configuration variable must point to a null terminated string containing the name of the configuration variable whose value is required. The envValue pointer points to a buffer which, on successful completion, will contain the value corresponding to envName.
On input,sizepoints to the size in bytes of the buffer envName. The sysGetEnv call uses this value to determine whether there is sufficient space to copy the value of the variable.
On output, size points to the number of bytes in the value, including the terminating null character.
Upon successful completion K_OK is returned. Otherwise, a negative error code is returned.
envName the configuration variable does not exist in the current Chorus environment.
For both user and supervisor access, the value pointed to by size was insufficient to store the entire value of envName in envValue. In this case, size points to the number of bytes necessary to contain the entire value. 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 | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO