Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(kernel): fix typos #8927

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/kernel/doc/guides/logger_chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ flowchart TD
API ---> ML[Module Level <hr> Global Level <hr> Global Filters]
API -.Update configuration.-> DB
ML -.-> DB
ML ---> HL1[Hander Level <hr> Handler Filter]
ML ---> HL2[Hander Level <hr> Handler Filter]
ML ---> HL1[Handler Level <hr> Handler Filter]
ML ---> HL2[Handler Level <hr> Handler Filter]
HL1 ---> HC1[Handler Callback]
HL2 ---> HC2[Handler Callback]
HL1 -.-> DB
Expand Down
2 changes: 1 addition & 1 deletion lib/kernel/doc/guides/socket_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ handler_loop(Sock, {select_info, recv, SelectHandle}) ->
end;

%% This is the (asyncronous) behaviour on platforms that support 'completion',
%% currently only Windows.
%% currently onla Windows.
handler_loop(Sock, {completion_info, recv, CompletionHandle}) ->
receive
{'$socket', Sock, completion, {CompletionHandle, CompletionStatus}} ->
Expand Down
2 changes: 1 addition & 1 deletion lib/kernel/examples/gen_tcp_dist/src/gen_tcp_dist.erl
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ call_ctrlr(Ctrlr, Msg) ->
%% the connection supervisor.
%%
%% We are not allowed to block the connection
%% superviser when writing a tick and we also want
%% supervisor when writing a tick and we also want
%% the tick to go through even during a heavily
%% loaded system. gen_tcp does not have a
%% non-blocking send operation exposed in its API
Expand Down
2 changes: 1 addition & 1 deletion lib/kernel/examples/uds_dist/c_src/uds_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ typedef enum {
portTypeCommand, /* A connected open port in command mode */
portTypeIntermediate, /* A connected open port in special half
active mode */
portTypeData /* A connectec open port in data mode */
portTypeData /* A connected open port in data mode */
} PortType;

typedef unsigned char Byte;
Expand Down
4 changes: 2 additions & 2 deletions lib/kernel/src/application_controller.erl
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ control_application(AppName) ->
%% different view of e.g. the distributed applications.
%% This is solved by syncing the release installation.
%% However, strange things may happen if a node crashes
%% and two other nodes have different opinons about who's
%% and two other nodes have different opinions about who's
%% gonna start the applications. The release handler must
%% shutdown each involved node in this case.
%% Note that this function is used to change existing apps,
Expand Down Expand Up @@ -767,7 +767,7 @@ handle_call({permit_application, AppName, Bool}, From, S) ->
false ->
case {Bool, IsLoaded, IsStarting, IsSPF, IsStarted, IsRunning} of
%%------------------------
%% permit the applicaition
%% permit the application
%%------------------------
%% already running
{true, _, _, _, _, {value, _Tuple}} ->
Expand Down
2 changes: 1 addition & 1 deletion lib/kernel/src/auth.erl
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ handle_info({From,badcookie,rex,_Msg}, O) ->
handle_info({From,badcookie,net_kernel,{'$gen_call',{From,Tag},{is_auth,_Node}}}, O) -> %% ho ho
From ! {Tag, no},
{noreply, O};
handle_info({_From,badcookie,To,{{auth_reply,N},R}}, O) ->%% Let auth replys through
handle_info({_From,badcookie,To,{{auth_reply,N},R}}, O) ->%% Let auth replies through
catch To ! {{auth_reply,N},R},
{noreply, O};
handle_info({From,badcookie,Name,Mess}, Opened) ->
Expand Down
2 changes: 1 addition & 1 deletion lib/kernel/src/dist_ac.erl
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ wait_dist_start(Node, Appl, Name, Nodes, PermittedNodes, S, Type) ->
_ = ac_error(Type, Name, {Node, R}),
monitor_node(Node, false),
{Appl#appl.id, false};
{dist_ac_weight, Name, _Weigth, Node} ->
{dist_ac_weight, Name, _Weight, Node} ->
%% This is the situation: {Name, [RNode, {Node}, node()]}
%% and permit(false) is called on RNode, and we sent the
%% weight first. Node handled it in handle_info, and
Expand Down
2 changes: 1 addition & 1 deletion lib/kernel/src/erl_reply.erl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-module(erl_reply).
-moduledoc false.

%% Syncronisation with erl_start (erl_interface)
%% Synchronisation with erl_start (erl_interface)

-export([reply/1]).

Expand Down
6 changes: 3 additions & 3 deletions lib/kernel/src/erpc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ collection only containing associations of already handled or abandoned requests
to [`receive_response/3`](`receive_response/3`), it will always block until a
timeout determined by `Timeout` is triggered.

Note that a response might have been consumed uppon an `{erpc, badarg}`
Note that a response might have been consumed upon an `{erpc, badarg}`
exception and if so, will be lost for ever.
""".
-doc(#{since => <<"OTP 25.0">>}).
Expand Down Expand Up @@ -736,7 +736,7 @@ containing associations of already handled or abandoned requests to
[`wait_response/3`](`wait_response/3`), it will always block until a timeout
determined by `WaitTime` is triggered and then return `no_response`.

Note that a response might have been consumed uppon an `{erpc, badarg}`
Note that a response might have been consumed upon an `{erpc, badarg}`
exception and if so, will be lost for ever.
""".
-doc(#{since => <<"OTP 25.0">>}).
Expand Down Expand Up @@ -860,7 +860,7 @@ collection only containing associations of already handled or abandoned requests
to [`check_response/3`](`check_response/3`), it will always return
`no_response`.

Note that a response might have been consumed uppon an `{erpc, badarg}`
Note that a response might have been consumed upon an `{erpc, badarg}`
exception and if so, will be lost for ever.
""".
-doc(#{since => <<"OTP 25.0">>}).
Expand Down
6 changes: 3 additions & 3 deletions lib/kernel/src/error_logger.erl
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ how to configure Logger for live systems.
`Request` is one of the following:

- **`{open, Filename}`** - Opens log file `Filename`. Returns `ok` if
successful, or `{error, allready_have_logfile}` if logging to file is already
successful, or `{error, already_have_logfile}` if logging to file is already
enabled, or an error tuple if another error occurred (for example, if
`Filename` cannot be opened). The file is opened with encoding UTF-8.

Expand All @@ -868,7 +868,7 @@ how to configure Logger for live systems.
""".
-spec logfile(Request :: {open, Filename}) -> ok | {error, OpenReason} when
Filename ::file:name(),
OpenReason :: allready_have_logfile | open_error()
OpenReason :: already_have_logfile | open_error()
; (Request :: close) -> ok | {error, CloseReason} when
CloseReason :: module_not_found
; (Request :: filename) -> Filename | {error, FilenameReason} when
Expand All @@ -878,7 +878,7 @@ how to configure Logger for live systems.
logfile({open, File}) ->
case lists:member(error_logger_file_h,which_report_handlers()) of
true ->
{error, allready_have_logfile};
{error, already_have_logfile};
_ ->
add_report_handler(error_logger_file_h, File)
end;
Expand Down
2 changes: 1 addition & 1 deletion lib/kernel/src/file.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2692,7 +2692,7 @@ The option list can contain the following options:
Offset :: non_neg_integer(),
Bytes :: non_neg_integer(),
Opts :: [sendfile_option()].
sendfile(File, _Sock, _Offet, _Bytes, _Opts) when is_pid(File) ->
sendfile(File, _Sock, _Offset, _Bytes, _Opts) when is_pid(File) ->
{error, badarg};
sendfile(File, Sock, Offset, Bytes, []) ->
sendfile(File, Sock, Offset, Bytes, ?MAX_CHUNK_SIZE, [], [], []);
Expand Down
2 changes: 1 addition & 1 deletion lib/kernel/src/gen_sctp.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ Initiates a new association for socket `Socket`, with the peer

The fundamental difference between this API and `connect/*` is that
the return value is that of the underlying OS `connect(2)` system call.
If `ok` is returned, the operation has been succesfully initiated,
If `ok` is returned, the operation has been successfully initiated,
and the final result result of the association establishment
is sent to the socket owner (controlling process) as an
[`#sctp_assoc_change{}`](#record-sctp_assoc_change) event.
Expand Down
4 changes: 2 additions & 2 deletions lib/kernel/src/gen_tcp.erl
Original file line number Diff line number Diff line change
Expand Up @@ -822,10 +822,10 @@ Close a TCP socket.

Note that in most implementations of TCP, doing a `close` does not guarantee
that the data sent is delivered to the recipient. It is guaranteed that
the recepient will see all sent data before getting the close, but the
the recipient will see all sent data before getting the close, but the
sender gets no indication of that.

If the sender needs to know that the recepient has received all data
If the sender needs to know that the recipient has received all data
there are two common ways to achieve this:

1. Use [`gen_tcp:shutdown(Sock, write)`](`shutdown/2`) to signal that no more
Expand Down
4 changes: 2 additions & 2 deletions lib/kernel/src/gen_tcp_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3168,7 +3168,7 @@ error_report(Report) ->

%% -------------------------------------------------------------------------

%% formated_timestamp() ->
%% formatted_timestamp() ->
%% format_timestamp(os:timestamp()).

%% format_timestamp(TS) ->
Expand All @@ -3179,4 +3179,4 @@ error_report(Report) ->

%% d(F, A) ->
%% io:format("*** [~s] ~p ~w " ++ F ++ "~n",
%% [formated_timestamp(), self(), ?MODULE | A]).
%% [formatted_timestamp(), self(), ?MODULE | A]).
2 changes: 1 addition & 1 deletion lib/kernel/src/gen_udp.erl
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ send(S, Host, Port, Packet) when is_port(S) ->
-doc """
Send a packet to the specified destination, with ancillary data.

Equvalent to [`send(Socket, Host, Port, Packet)`](`send/4`)
Equivalent to [`send(Socket, Host, Port, Packet)`](`send/4`)
regarding `Host` and `Port` and also equivalent to
[`send(Socket, Destination, AncData, Packet)`](#send-4-AncData)
regarding the ancillary data: `AncData`.
Expand Down
34 changes: 17 additions & 17 deletions lib/kernel/src/gen_udp_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ server_read_opts() ->
deliver => term,
%% WHAT DO WE DO ABOUT THIS!!!
%% This option, read_packets, is *currently* not used,
%% but accepted for backward compatibillity reasons.
%% but accepted for backward compatibility reasons.
read_packets => 5,
start_opts => [], % Just to make it settable
%% XXX not implemented yet
Expand Down Expand Up @@ -1673,7 +1673,7 @@ handle_event(
#recv{info = ?completion_info(Handle)},
{#params{socket = Socket} = P, D}) ->
%% ?DBG(['socket abort',
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {reason, Reason}, {p, P}, {d, D}]),
handle_reading(P, cleanup_recv_reply(P, D, [], Reason));

Expand Down Expand Up @@ -1849,26 +1849,26 @@ handle_recv(#params{recv_method = []} = P,
case Reason0 of
{completion_status, #{info := more_data = _INFO}} ->
%% ?DBG(['completion status',
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {info, INFO},
%% {p, P}, {d, D}]),
emsgsize;
{completion_status, more_data = _INFO} ->
%% ?DBG(['completion status',
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {info, INFO},
%% {p, P}, {d, D}]),
emsgsize;

{completion_status, #{info := INFO}} ->
%% ?DBG(['completion status',
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {info, INFO},
%% {p, P}, {d, D}]),
INFO;
{completion_status, INFO} ->
%% ?DBG(['completion status',
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {info, INFO},
%% {p, P}, {d, D}]),
INFO;
Expand Down Expand Up @@ -1965,23 +1965,23 @@ cleanup_recv_reply(P, D, ActionsR, Reason0) ->
timeout ->
%% ?DBG(['error - timeout',
%% {owner, Owner},
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {module_socket, ModuleSocket},
%% {p, P}, {d, D}]),
Owner ! {udp_error, ModuleSocket, Reason0},
Reason0;
closed ->
%% ?DBG(['closed',
%% {owner, Owner},
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {module_socket, ModuleSocket},
%% {p, P}, {d, D}]),
Owner ! {udp_closed, ModuleSocket},
Reason0;
emsgsize ->
%% ?DBG(['error - emsgsize',
%% {owner, Owner},
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {module_socket, ModuleSocket},
%% {p, P}, {d, D}]),
Owner ! {udp_error, ModuleSocket, Reason0},
Expand All @@ -1992,42 +1992,42 @@ cleanup_recv_reply(P, D, ActionsR, Reason0) ->
{completion_status, #{info := more_data = _INFO}} ->
%% ?DBG(['completion status',
%% {owner, Owner},
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {module_socket, ModuleSocket},
%% {info, INFO}, {p, P}, {d, D},
%% {mq, mq(Owner)}]),
R = emsgsize,
Owner ! {udp_error, ModuleSocket, R},
%% ?DBG(['udp error sent',
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {mq, mq(Owner)}]),
R;
{completion_status, more_data = _INFO} ->
%% ?DBG(['completion status',
%% {owner, Owner},
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {module_socket, ModuleSocket},
%% {info, INFO}, {p, P}, {d, D},
%% {mq, mq(Owner)}]),
R = emsgsize,
Owner ! {udp_error, ModuleSocket, R},
%% ?DBG(['udp error sent',
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {mq, mq(Owner)}]),
R;

{completion_status, #{info := INFO}} ->
%% ?DBG(['completion status',
%% {owner, Owner},
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {module_socket, ModuleSocket},
%% {info, INFO}, {p, P}, {d, D}]),
Owner ! {udp_error, ModuleSocket, INFO},
INFO;
{completion_status, INFO} ->
%% ?DBG(['completion status',
%% {owner, Owner},
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {module_socket, ModuleSocket},
%% {info, INFO}, {p, P}, {d, D}]),
Owner ! {udp_error, ModuleSocket, INFO},
Expand All @@ -2036,7 +2036,7 @@ cleanup_recv_reply(P, D, ActionsR, Reason0) ->
_ ->
%% ?DBG(['error and closed',
%% {owner, Owner},
%% {timestamp, formated_timestamp()},
%% {timestamp, formatted_timestamp()},
%% {module_socket, ModuleSocket},
%% {reason, Reason0}, {p, P}, {d, D}]),
Owner ! {udp_error, ModuleSocket, Reason0},
Expand Down Expand Up @@ -2507,7 +2507,7 @@ reverse(L1, L2) -> lists:reverse(L1, L2).

%% -------------------------------------------------------------------------

%% formated_timestamp() ->
%% formatted_timestamp() ->
%% format_timestamp(os:timestamp()).

%% format_timestamp({_N1, _N2, N3} = TS) ->
Expand Down
8 changes: 4 additions & 4 deletions lib/kernel/src/global.erl
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ init([]) ->
%% received. The init_connect_ack messages are only there to confirm
%% that both nodes has the same view of which connect session is
%% ongoing. If lockers get out of sync, the lock will not be able
%% to be aquired on both nodes. The out of sync lock operation will
%% to be acquired on both nodes. The out of sync lock operation will
%% be detected when the init_connect_ack message is received and the
%% operation can be cancelled and then restarted.
%%
Expand Down Expand Up @@ -1493,8 +1493,8 @@ handle_info({lost_connection, NodeA, XCreationA, OpIdA, NodeB} = Msg,
false ->
NodeB;
true ->
%% This toghether with NodeA being known by
%% us probably is unusal, but can happen
%% This together with NodeA being known by
%% us probably is unusual, but can happen
%% since lost_connection messages are
%% reapeted by receiving nodes. All other
%% nodes will remove us, so there is no
Expand Down Expand Up @@ -1877,7 +1877,7 @@ restart_connect(Node, MyTag, S0) ->
%% and send a new init_connect...
handle_nodeup(Node, S2);
true ->
%% Node is down from our prespective; wait until
%% Node is down from our perspective; wait until
%% global_group say Node is up by sending us a
%% group_nodeup message...
S2
Expand Down
6 changes: 3 additions & 3 deletions lib/kernel/src/global_group.erl
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ request(Req, Time) ->
P when is_pid(P) ->
gen_server:call(global_group, Req, Time);
_Other ->
{error, global_group_not_runnig}
{error, global_group_not_running}
end.

%%%====================================================================================
Expand Down Expand Up @@ -739,7 +739,7 @@ handle_call({global_groups_changed, NewPara}, _From,

case GState of
no_conf ->
exit({error, 'no global_groups definiton'});
exit({error, 'no global_groups definition'});
{error, _Err, NodeGrps} ->
exit({error, {'invalid global_groups definition', NodeGrps}});
_ ->
Expand Down Expand Up @@ -793,7 +793,7 @@ handle_call({global_groups_added, NewPara}, _From,

case GState of
no_conf ->
exit({error, 'no global_groups definiton'});
exit({error, 'no global_groups definition'});
{error, _Err, NodeGrps} ->
exit({error, {'invalid global_groups definition', NodeGrps}});
_ ->
Expand Down
Loading
Loading