diff options
author | Sverker Eriksson <[email protected]> | 2018-07-20 14:33:35 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2018-07-20 14:33:35 +0200 |
commit | 0874ef1548a3e556c303415cf2e0dc1169e056a4 (patch) | |
tree | 5eadaa608ccac1219f641859f029c239fe61b0f8 | |
parent | f770e3cd1df9ee311476546cbaa57b6c36e09bf3 (diff) | |
parent | daa1f7a9d704c6de451da6b4a637a0f9de0f5531 (diff) | |
download | otp-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
-rw-r--r-- | lib/mnesia/src/mnesia.erl | 6 |
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 -> |