aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_options.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-03-23 10:28:25 +0100
committerHans Nilsson <[email protected]>2018-03-23 10:28:25 +0100
commit76ae52ff21f2da1b70b3e9999c81cdbf61d8c595 (patch)
tree99c64987513f585e61beba15af6e05cfba6bda2d /lib/ssh/src/ssh_options.erl
parent8d8f9477590628999663da7e9ed0a4941085a861 (diff)
parent3eced27f96d87eac1fc90325d7030167805309a1 (diff)
downloadotp-76ae52ff21f2da1b70b3e9999c81cdbf61d8c595.tar.gz
otp-76ae52ff21f2da1b70b3e9999c81cdbf61d8c595.tar.bz2
otp-76ae52ff21f2da1b70b3e9999c81cdbf61d8c595.zip
Merge branch 'hans/ssh/exec_fun_mfa/OTP-14851'
* hans/ssh/exec_fun_mfa/OTP-14851: ssh: Document the exec option ssh: Simplification of using fun:s as exec subsystems
Diffstat (limited to 'lib/ssh/src/ssh_options.erl')
-rw-r--r--lib/ssh/src/ssh_options.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh_options.erl b/lib/ssh/src/ssh_options.erl
index 1e10f72956..c05293d1ae 100644
--- a/lib/ssh/src/ssh_options.erl
+++ b/lib/ssh/src/ssh_options.erl
@@ -275,10 +275,12 @@ default(server) ->
class => user_options
},
- {exec, def} => % FIXME: need some archeology....
+ {exec, def} =>
#{default => undefined,
- chk => fun({M,F,_}) -> is_atom(M) andalso is_atom(F);
- (V) -> is_function(V)
+ chk => fun({direct, V}) -> check_function1(V) orelse check_function2(V) orelse check_function3(V);
+ %% Compatibility (undocumented):
+ ({M,F,A}) -> is_atom(M) andalso is_atom(F) andalso is_list(A);
+ (V) -> check_function1(V) orelse check_function2(V) orelse check_function3(V)
end,
class => user_options
},