diff options
author | Peter Lemenkov <[email protected]> | 2014-12-02 13:31:37 +0300 |
---|---|---|
committer | Peter Lemenkov <[email protected]> | 2014-12-15 21:05:05 +0300 |
commit | bb7fb3c31d1939ab39fb14322d11a59bc34d8f42 (patch) | |
tree | b3a37d800ac7d073723cd5cc02da09839e2b79e8 /lib/runtime_tools | |
parent | 5cbad390e971ff92a7fb1b71757041ff9edeb81a (diff) | |
download | otp-bb7fb3c31d1939ab39fb14322d11a59bc34d8f42.tar.gz otp-bb7fb3c31d1939ab39fb14322d11a59bc34d8f42.tar.bz2 otp-bb7fb3c31d1939ab39fb14322d11a59bc34d8f42.zip |
Start using os:getenv/2 fun
See #535
Signed-off-by: Peter Lemenkov <[email protected]>
Diffstat (limited to 'lib/runtime_tools')
-rw-r--r-- | lib/runtime_tools/src/system_information.erl | 5 | ||||
-rw-r--r-- | lib/runtime_tools/test/erts_alloc_config_SUITE.erl | 7 |
2 files changed, 2 insertions, 10 deletions
diff --git a/lib/runtime_tools/src/system_information.erl b/lib/runtime_tools/src/system_information.erl index 04cc33e1ad..0796e96ffc 100644 --- a/lib/runtime_tools/src/system_information.erl +++ b/lib/runtime_tools/src/system_information.erl @@ -577,10 +577,7 @@ get_beam_name() -> false -> ""; true -> ".smp" end, - Beam = case os:getenv("EMU") of - false -> "beam"; - Value -> Value - end, + Beam = os:getenv("EMU", "beam"), Beam ++ Type ++ Flavor. %% Check runtime dependencies... diff --git a/lib/runtime_tools/test/erts_alloc_config_SUITE.erl b/lib/runtime_tools/test/erts_alloc_config_SUITE.erl index 8ea04e1767..9be1565a02 100644 --- a/lib/runtime_tools/test/erts_alloc_config_SUITE.erl +++ b/lib/runtime_tools/test/erts_alloc_config_SUITE.erl @@ -79,12 +79,7 @@ basic(Config) when is_list(Config) -> SbctMod = " +MBsbct 1024 +MHsbct 4096", %% Make sure we have enabled allocators - ZFlgs = case os:getenv("ERL_ZFLAGS") of - FlgString when is_list(FlgString) -> - FlgString; - _ -> - "" - end ++ " +Mea max +Mea config", + ZFlgs = os:getenv("ERL_ZFLAGS", "") ++ " +Mea max +Mea config", ?line os:putenv("ERL_ZFLAGS", ZFlgs ++ SbctMod), |