Skip to content

Commit

Permalink
Merge branch 'fredrik/ssh-quiet-mode/OTP-10429' into maint
Browse files Browse the repository at this point in the history
* fredrik/ssh-quiet-mode/OTP-10429:
  Doc for quiet_mode
  SSH quiet mode
  • Loading branch information
rimmius committed Nov 8, 2012
2 parents 8a3e11e + 0f2b8f9 commit e0095df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ssh/doc/src/ssh.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@
<c><![CDATA[add_host_key/3]]></c>. This is considered
somewhat experimental and will be better documented later on.</p>
</item>
<tag><c><![CDATA[{quiet_mode, atom() = boolean()}]]></c></tag>
<item>
<p>If true, the client will not print out anything on authorization.</p>
</item>
<tag><c><![CDATA[{fd, file_descriptor()}]]></c></tag>
<item>
<p>Allow an existing file-descriptor to be used
Expand Down
5 changes: 5 additions & 0 deletions lib/ssh/src/ssh.erl
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ handle_option([{auth_methods, _} = Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
handle_option([{pref_public_key_algs, _} = Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
handle_option([{quiet_mode, _} = Opt|Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
handle_option([Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, [handle_inet_option(Opt) | SocketOptions], SshOptions).

Expand Down Expand Up @@ -416,6 +418,9 @@ handle_ssh_option({shell, {Module, Function, _}} = Opt) when is_atom(Module),
Opt;
handle_ssh_option({shell, Value} = Opt) when is_function(Value) ->
Opt;
handle_ssh_option({quiet_mode, Value} = Opt) when Value == true;
Value == false ->
Opt;
handle_ssh_option(Opt) ->
throw({error, {eoptions, Opt}}).

Expand Down

0 comments on commit e0095df

Please sign in to comment.