aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-07-20 14:33:35 +0200
committerGitHub <[email protected]>2018-07-20 14:33:35 +0200
commit0874ef1548a3e556c303415cf2e0dc1169e056a4 (patch)
tree5eadaa608ccac1219f641859f029c239fe61b0f8 /lib
parentf770e3cd1df9ee311476546cbaa57b6c36e09bf3 (diff)
parentdaa1f7a9d704c6de451da6b4a637a0f9de0f5531 (diff)
downloadotp-0874ef1548a3e556c303415cf2e0dc1169e056a4.tar.gz
otp-0874ef1548a3e556c303415cf2e0dc1169e056a4.tar.bz2
otp-0874ef1548a3e556c303415cf2e0dc1169e056a4.zip
Merge PR-1881 from f3c0/mnesia-spec-fix OTP-15201
fix type spec of mnesia:change_config
Diffstat (limited to 'lib')
-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 e298904e2a..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 ->