diff options
author | Hans Nilsson <[email protected]> | 2018-03-02 18:02:48 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-03-22 10:40:48 +0100 |
commit | 4eb60b4d23befd64250b8aca456f082e5d212878 (patch) | |
tree | f48b6351aed54230998e96f20126eb459d02d226 /lib/ssh/src/ssh_options.erl | |
parent | 0c151c6939a83f9a26a45d24fd504fc4fb2f3f01 (diff) | |
download | otp-4eb60b4d23befd64250b8aca456f082e5d212878.tar.gz otp-4eb60b4d23befd64250b8aca456f082e5d212878.tar.bz2 otp-4eb60b4d23befd64250b8aca456f082e5d212878.zip |
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.erl | 8 |
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 }, |