diff options
author | Micael Karlberg <[email protected]> | 2011-04-12 13:31:22 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-04-12 13:31:22 +0200 |
commit | 7263707193d974050f485bd034e91ce4c3c7cb8f (patch) | |
tree | 42ae12b4c3234d1428fc09a4195546bf6237fa3c /lib/stdlib/src/gen.erl | |
parent | 057911fd21db849ff4f6a9fa28674002945f725f (diff) | |
parent | 47fc3df88eada4b07d8805dbc7fd418f6fac1c11 (diff) | |
download | otp-7263707193d974050f485bd034e91ce4c3c7cb8f.tar.gz otp-7263707193d974050f485bd034e91ce4c3c7cb8f.tar.bz2 otp-7263707193d974050f485bd034e91ce4c3c7cb8f.zip |
Merge branch 'dev' into bmk/snmp/manager/request_override_options
Diffstat (limited to 'lib/stdlib/src/gen.erl')
-rw-r--r-- | lib/stdlib/src/gen.erl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/stdlib/src/gen.erl b/lib/stdlib/src/gen.erl index 43df6f621d..574146b1cd 100644 --- a/lib/stdlib/src/gen.erl +++ b/lib/stdlib/src/gen.erl @@ -29,6 +29,8 @@ -export([init_it/6, init_it/7]). +-export([format_status_header/2]). + -define(default_timeout, 5000). %%----------------------------------------------------------------- @@ -315,3 +317,10 @@ debug_options(Opts) -> {ok, Options} -> sys:debug_options(Options); _ -> [] end. + +format_status_header(TagLine, Pid) when is_pid(Pid) -> + lists:concat([TagLine, " ", pid_to_list(Pid)]); +format_status_header(TagLine, RegName) when is_atom(RegName) -> + lists:concat([TagLine, " ", RegName]); +format_status_header(TagLine, Name) -> + {TagLine, Name}. |