aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent/snmpa_mib_lib.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2010-12-10 14:17:30 +0100
committerMicael Karlberg <[email protected]>2010-12-10 14:17:30 +0100
commit58620c2052e07490beb44a4bd1a8fbb5ebc028ac (patch)
tree4c7a84b2b78fe0ef25b37d511e6071c3be37c04f /lib/snmp/src/agent/snmpa_mib_lib.erl
parentd49bdb7c372c93d5b8007cbc016a587d91539fe9 (diff)
downloadotp-58620c2052e07490beb44a4bd1a8fbb5ebc028ac.tar.gz
otp-58620c2052e07490beb44a4bd1a8fbb5ebc028ac.tar.bz2
otp-58620c2052e07490beb44a4bd1a8fbb5ebc028ac.zip
Various cosmetic (print) fixes. Wrong module names used for the
utility module in the test_config dir.
Diffstat (limited to 'lib/snmp/src/agent/snmpa_mib_lib.erl')
-rw-r--r--lib/snmp/src/agent/snmpa_mib_lib.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/snmp/src/agent/snmpa_mib_lib.erl b/lib/snmp/src/agent/snmpa_mib_lib.erl
index 22057b4547..700bdd1a6e 100644
--- a/lib/snmp/src/agent/snmpa_mib_lib.erl
+++ b/lib/snmp/src/agent/snmpa_mib_lib.erl
@@ -90,9 +90,9 @@ print_variables(Variables) when is_list(Variables) ->
ok.
print_variable(Variable, {value, Val}, Prefix) when is_atom(Variable) ->
- io:format("~w~s => ~p~n", [Variable, Prefix, Val]);
+ io:format("~w~s=> ~p~n", [Variable, Prefix, Val]);
print_variable(Variable, Error, Prefix) when is_atom(Variable) ->
- io:format("~w~s => ERROR: ~p~n", [Variable, Prefix, Error]).
+ io:format("~w~s=> [e] ~p~n", [Variable, Prefix, Error]).
print_variables_prefixify(Variables) ->
MaxVarLength = print_variables_maxlength(Variables),
@@ -139,10 +139,13 @@ print_table(Table, DB, FOI, PrintRow) ->
print_table(Table, TableInfo, PrintRow).
print_table(Table, TableInfo, PrintRow) when is_function(PrintRow, 2) ->
- io:format("~w => ~n", [Table]),
+ io:format("~w =>", [Table]),
do_print_table(TableInfo, PrintRow).
+do_print_table({ok, [] = _TableInfo}, _PrintRow) ->
+ io:format(" -~n", []);
do_print_table({ok, TableInfo}, PrintRow) when is_function(PrintRow, 2) ->
+ io:format("~n", []),
lists:foreach(fun({RowIdx, Row}) ->
io:format(" ~w => ~n~s~n",
[RowIdx, PrintRow(" ", Row)])