aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerenc Böröczki <[email protected]>2018-07-19 12:25:51 +0200
committerFerenc Böröczki <[email protected]>2018-07-19 12:25:51 +0200
commitdaa1f7a9d704c6de451da6b4a637a0f9de0f5531 (patch)
treede11c50a65d0c5c27b6e269d320ae674482b967e
parent4152200018c836bd38a8f4c283042637af2696b5 (diff)
downloadotp-daa1f7a9d704c6de451da6b4a637a0f9de0f5531.tar.gz
otp-daa1f7a9d704c6de451da6b4a637a0f9de0f5531.tar.bz2
otp-daa1f7a9d704c6de451da6b4a637a0f9de0f5531.zip
add more specific type spec for mnesia:change_config
-rw-r--r--lib/mnesia/src/mnesia.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/mnesia/src/mnesia.erl b/lib/mnesia/src/mnesia.erl
index 60ca262039..62202401ed 100644
--- a/lib/mnesia/src/mnesia.erl
+++ b/lib/mnesia/src/mnesia.erl
@@ -168,6 +168,9 @@
-type snmp_struct() :: [{atom(), snmp_type() | tuple_of(snmp_type())}].
-type snmp_type() :: 'fix_string' | 'string' | 'integer'.
-type tuple_of(_T) :: tuple().
+-type config_key() :: extra_db_nodes | dc_dump_limit.
+-type config_value() :: [node()] | number().
+-type config_result() :: {ok, config_value()} | {error, term()}.
-define(DEFAULT_ACCESS, ?MODULE).
@@ -278,7 +281,8 @@ stop() ->
Other -> Other
end.
--spec change_config(Config::atom(), Value::_) -> {ok, _} | {error, term()}.
+-spec change_config(Config::config_key(), Value::config_value()) ->
+ config_result().
change_config(extra_db_nodes, Ns) when is_list(Ns) ->
mnesia_controller:connect_nodes(Ns);
change_config(dc_dump_limit, N) when is_number(N), N > 0 ->