diff options
author | Micael Karlberg <micael@fed1032.(none)> | 2010-12-08 18:42:41 +0100 |
---|---|---|
committer | Micael Karlberg <micael@fed1032.(none)> | 2010-12-08 18:42:41 +0100 |
commit | 9a5ba00578bd2b2d04d8814f8a228ff7bed1c18f (patch) | |
tree | 4e44961fd9ec1e1d3395c36c4b314e11c5d0173a /lib/snmp/src/agent/snmpa.erl | |
parent | e67b8b37c5aabe83f8872fcf71e865591af5552b (diff) | |
download | otp-9a5ba00578bd2b2d04d8814f8a228ff7bed1c18f.tar.gz otp-9a5ba00578bd2b2d04d8814f8a228ff7bed1c18f.tar.bz2 otp-9a5ba00578bd2b2d04d8814f8a228ff7bed1c18f.zip |
Added utility variable print function, and utilized it in view-mib.
Diffstat (limited to 'lib/snmp/src/agent/snmpa.erl')
-rw-r--r-- | lib/snmp/src/agent/snmpa.erl | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/snmp/src/agent/snmpa.erl b/lib/snmp/src/agent/snmpa.erl index 88417b19fe..8ad2a83de4 100644 --- a/lib/snmp/src/agent/snmpa.erl +++ b/lib/snmp/src/agent/snmpa.erl @@ -328,8 +328,8 @@ print_mib_info() -> print_mib_info([{Mod, Tables, Variables} | MibsInfo]) -> io:format("~n** ~s ** ~n~n", [make_pretty_mib(Mod)]), - print_variables(Mod, Variables), - print_tables(Mod, Tables), + print_mib_variables2(Mod, Variables), + print_mib_tables2(Mod, Tables), print_mib_info(MibsInfo). @@ -339,7 +339,8 @@ print_mib_tables() -> print_mib_tables([]) -> ok; -print_mib_tables([{Mod, Tabs}|MibTabs]) when is_atom(Mod) andalso is_list(Tabs) -> +print_mib_tables([{Mod, Tabs}|MibTabs]) + when is_atom(Mod) andalso is_list(Tabs) -> print_mib_tables(Mod, Tabs), print_mib_tables(MibTabs); print_mib_tables([_|MibTabs]) -> @@ -347,9 +348,9 @@ print_mib_tables([_|MibTabs]) -> print_mib_tables(Mod, Tables) -> io:format("~n** ~s ** ~n~n", [make_pretty_mib(Mod)]), - print_tables(Mod, Tables). + print_mib_tables2(Mod, Tables). -print_tables(Mod, Tables) -> +print_mib_tables2(Mod, Tables) -> [(catch Mod:Table(print)) || Table <- Tables]. @@ -359,7 +360,8 @@ print_mib_variables() -> print_mib_variables([]) -> ok; -print_mib_variables([{Mod, Vars}|MibVars]) when is_atom(Mod) andalso is_list(Vars) -> +print_mib_variables([{Mod, Vars}|MibVars]) + when is_atom(Mod) andalso is_list(Vars) -> print_mib_variables(Mod, Vars), print_mib_variables(MibVars); print_mib_variables([_|MibVars]) -> @@ -367,9 +369,9 @@ print_mib_variables([_|MibVars]) -> print_mib_variables(Mod, Vars) -> io:format("~n** ~s ** ~n~n", [make_pretty_mib(Mod)]), - print_variables(Mod, Vars). + print_mib_variables2(Mod, Vars). -print_variables(Mod, Variables) -> +print_mib_variables2(Mod, Variables) -> [(catch Mod:Variable(print)) || Variable <- Variables]. |