diff options
author | Micael Karlberg <[email protected]> | 2011-04-15 12:08:38 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-04-15 12:08:38 +0200 |
commit | f5cb2e252f789ed9fc99f638772b9292a2df7c44 (patch) | |
tree | 5accea367e85cbe63afa9927c1239ef995daa16c /lib/stdlib/src/gen.erl | |
parent | bb6e729795ebf3dddfcfd7182384bda59e9f6a94 (diff) | |
parent | 23906a01725f4494b8816c242926d08aeca0ef67 (diff) | |
download | otp-f5cb2e252f789ed9fc99f638772b9292a2df7c44.tar.gz otp-f5cb2e252f789ed9fc99f638772b9292a2df7c44.tar.bz2 otp-f5cb2e252f789ed9fc99f638772b9292a2df7c44.zip |
Merge branch 'dev' into bmk/snmp/snmp420_integration
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}. |