diff options
author | Patrik Nyblom <[email protected]> | 2012-08-20 18:19:52 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2012-08-20 18:19:52 +0200 |
commit | a8fb0d0537314f717f9ab33989a5115457c9aab0 (patch) | |
tree | 07dcacdaa266c01391a8e422c60c7b6ff9c810cf /erts/emulator/beam/utils.c | |
parent | 00ef468474d0628903e0a3a3abc7aceb8d2c4061 (diff) | |
parent | a49b1a844febb2740c530895b32c0bb0ae7d5aa0 (diff) | |
download | otp-a8fb0d0537314f717f9ab33989a5115457c9aab0.tar.gz otp-a8fb0d0537314f717f9ab33989a5115457c9aab0.tar.bz2 otp-a8fb0d0537314f717f9ab33989a5115457c9aab0.zip |
Merge branch 'maint'
Conflicts:
erts/doc/src/erlang.xml
erts/preloaded/ebin/init.beam
lib/kernel/doc/src/os.xml
lib/stdlib/test/filename_SUITE.erl
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r-- | erts/emulator/beam/utils.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index db6597dc7c..1969fc762c 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -3443,7 +3443,7 @@ erts_read_env(char *key) char *value = erts_alloc(ERTS_ALC_T_TMP, value_len); int res; while (1) { - res = erts_sys_getenv(key, value, &value_len); + res = erts_sys_getenv_raw(key, value, &value_len); if (res <= 0) break; value = erts_realloc(ERTS_ALC_T_TMP, value, value_len); @@ -3462,28 +3462,6 @@ erts_free_read_env(void *value) erts_free(ERTS_ALC_T_TMP, value); } -int -erts_write_env(char *key, char *value) -{ - int ix, res; - size_t key_len = sys_strlen(key), value_len = sys_strlen(value); - char *key_value = erts_alloc_fnf(ERTS_ALC_T_TMP, - key_len + 1 + value_len + 1); - if (!key_value) { - errno = ENOMEM; - return -1; - } - sys_memcpy((void *) key_value, (void *) key, key_len); - ix = key_len; - key_value[ix++] = '='; - sys_memcpy((void *) key_value, (void *) value, value_len); - ix += value_len; - key_value[ix] = '\0'; - res = erts_sys_putenv(key_value, key_len); - erts_free(ERTS_ALC_T_TMP, key_value); - return res; -} - /* * To be used to silence unused result warnings, but do not abuse it. */ |