From 60c2511da7fb72197a807e77e62fdf671676e718 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Wed, 13 Apr 2011 12:56:01 +0200 Subject: Add latin9 (iso-8859-15) support in xmerl_ucs --- lib/xmerl/src/xmerl_ucs.erl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/xmerl/src/xmerl_ucs.erl b/lib/xmerl/src/xmerl_ucs.erl index 7c45c838ab..75e0f5dccb 100644 --- a/lib/xmerl/src/xmerl_ucs.erl +++ b/lib/xmerl/src/xmerl_ucs.erl @@ -43,6 +43,7 @@ -export([to_utf16be/1, from_utf16be/1, from_utf16be/2]). -export([to_utf16le/1, from_utf16le/1, from_utf16le/2]). -export([to_utf8/1, from_utf8/1]). +-export([from_latin9/1]). %%% NB: Non-canonical UTF-8 encodings and incorrectly used %%% surrogate-pair codes are disallowed by this code. There are @@ -184,6 +185,20 @@ from_utf8(List) -> exit({ucs,{bad_utf8_character_code}}) end. +%%% Latin9 support +from_latin9(Bin) when is_binary(Bin) -> from_latin9(binary_to_list(Bin)); +from_latin9(List) -> + [ latin9_to_ucs4(Char) || Char <- List]. + +latin9_to_ucs4(16#A4) -> 16#20AC; +latin9_to_ucs4(16#A6) -> 16#160; +latin9_to_ucs4(16#A8) -> 16#161; +latin9_to_ucs4(16#B4) -> 16#17D; +latin9_to_ucs4(16#B8) -> 16#17E; +latin9_to_ucs4(16#BC) -> 16#152; +latin9_to_ucs4(16#BD) -> 16#153; +latin9_to_ucs4(16#BE) -> 16#178; +latin9_to_ucs4(Other) -> Other. @@ -476,6 +491,8 @@ to_unicode(Input,Cs) when Cs=='iso_8859-1:1987';Cs=='iso-ir-100'; Cs=='l1';Cs=='ibm819'; Cs=='cp819';Cs=='csisolatin1' -> Input; +to_unicode(Input,Cs) when Cs=='iso_8859-15';Cs=='iso-8859-15';Cs=='latin9' -> + from_latin9(Input); % to_unicode(Input,Cs) when Cs=='mnemonic';Cs=='"mnemonic+ascii+38'; % Cs=='mnem';Cs=='"mnemonic+ascii+8200' -> % from_mnemonic(Input); -- cgit v1.2.3 From 374b0299972709feb2dc2a6dbf8b02677b87d4fa Mon Sep 17 00:00:00 2001 From: Michal Ptaszek Date: Thu, 25 Aug 2011 13:48:43 +0200 Subject: Fixed xmerl_ucs UCS2 little endian en/decoding Corrected number of shift bytes in xmerl_ucs:char_to_ucs2le and recursive call from from_ucs2le to from_ucs4le. --- lib/xmerl/src/xmerl_ucs.erl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/xmerl/src/xmerl_ucs.erl b/lib/xmerl/src/xmerl_ucs.erl index 7c45c838ab..076595d873 100644 --- a/lib/xmerl/src/xmerl_ucs.erl +++ b/lib/xmerl/src/xmerl_ucs.erl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% +%% %% Copyright Ericsson AB 2005-2009. All Rights Reserved. -%% +%% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. -%% +%% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights and limitations %% under the License. -%% +%% %% %CopyrightEnd% %% @@ -177,7 +177,7 @@ to_utf8(List) when is_list(List) -> lists:flatmap(fun to_utf8/1, List); to_utf8(Ch) -> char_to_utf8(Ch). from_utf8(Bin) when is_binary(Bin) -> from_utf8(binary_to_list(Bin)); -from_utf8(List) -> +from_utf8(List) -> case expand_utf8(List) of {Result,0} -> Result; {_Res,_NumBadChar} -> @@ -238,7 +238,7 @@ from_ucs4le(Bin,Acc,Tail) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% UCS-2 support -%%% FIXME! Don't know how to encode UCS-2!! +%%% FIXME! Don't know how to encode UCS-2!! %%% Currently I just encode as UCS-4, but strips the 16 higher bits. char_to_ucs2be(Ch) -> true = is_iso10646(Ch), @@ -259,15 +259,15 @@ from_ucs2be(Bin,Acc,Tail) -> char_to_ucs2le(Ch) -> true = is_iso10646(Ch), - [(Ch bsr 16) band 16#FF, - (Ch bsr 24)]. + [Ch band 16#FF, + (Ch bsr 8) band 16#FF]. from_ucs2le(<>,Acc,Tail) -> if Ch < 0; Ch >= 16#D800, Ch < 16#E000; Ch =:= 16#FFFE; Ch =:= 16#FFFF -> exit({bad_character_code,Ch}); true -> - from_ucs4le(Rest,[Ch|Acc],Tail) + from_ucs2le(Rest,[Ch|Acc],Tail) end; from_ucs2le(<<>>,Acc,Tail) -> lists:reverse(Acc,Tail); -- cgit v1.2.3 From ba14137774a64da076b9cf0d98e0e6f2711a74e4 Mon Sep 17 00:00:00 2001 From: Paul Guyot Date: Sat, 3 Sep 2011 19:49:54 +0200 Subject: Fix bug with binary pattern matching of floats of variable size Pattern matching of floats with variable size (<>) did always fail. Judging from similar code for ints, this bug is simply a typo. --- lib/hipe/icode/hipe_beam_to_icode.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hipe/icode/hipe_beam_to_icode.erl b/lib/hipe/icode/hipe_beam_to_icode.erl index d7eb035551..cfed410240 100644 --- a/lib/hipe/icode/hipe_beam_to_icode.erl +++ b/lib/hipe/icode/hipe_beam_to_icode.erl @@ -720,7 +720,7 @@ trans_fun([{test,bs_get_float2,{f,Lbl},[Ms,_Live,Size,Unit,{field_flags,Flags0}, ?EXIT({bad_bs_size_constant,Size}); BitReg -> Bits = mk_var(BitReg), - {{bs_get_float,Unit,Flags}, [Bits,MsVar]} + {{bs_get_float,Unit,Flags}, [MsVar,Bits]} end, trans_op_call({hipe_bs_primop,Name}, Lbl, Args, [Dst,MsVar], Env, Instructions); trans_fun([{test,bs_get_integer2,{f,Lbl},[Ms,_Live,Size,Unit,{field_flags,Flags0},X]}| -- cgit v1.2.3 From feecf39417a1a5f2114a5fc18c7e0207fb642eee Mon Sep 17 00:00:00 2001 From: joewilliams Date: Thu, 9 Jun 2011 07:58:01 -0700 Subject: General improvements to release_handler_1:get_supervised_procs The core issues this patch attempts to solve is two fold, 1) have release_handler_1 act slightly differently in two corner cases and 2) clean up the code in get_supervised_procs/0 to remove nested cases and etc. Regarding #1, get_supervised_procs/0 will now call functions to test to see if the supervisor is suspended before attempting to ask it for a list of children. It now will print an error message regarding the suspended supervisor and produce an error that will cause the VM to restart. Previously it would timeout attempting the call to which_children and the VM would restart without any details regarding the reason. The second corner case is if in a child specification a supervisor is incorrectly stated to be a worker and get_modules is called against it. A timeout will occur causing a VM restart. Similar to the last corner case in this patch an error message is printed and an error is emitted causing a VM restart. When first looking into the issue it was hard to discover why my upgrades where failing. All I received during the upgrade process was a timeout and a VM restart, no other information. This patch should help users track down issues like these. Regarding #2, due to the above confusion in trying to figure out what had happened I dug into the code and started tracing it through and found that the nested case statements and etc made it confusing. So I started to rework and clean up, hopefully making this code path clearer to future readers. --- lib/sasl/src/release_handler_1.erl | 107 +++++++++++++++------ lib/sasl/test/release_handler_SUITE.erl | 26 ++++- .../test/release_handler_SUITE_data/Makefile.src | 16 ++- .../dummy-0.1/ebin/dummy.app | 7 ++ .../dummy-0.1/src/dummy_app.erl | 9 ++ .../dummy-0.1/src/dummy_server.erl | 56 +++++++++++ .../dummy-0.1/src/dummy_sup.erl | 15 +++ .../dummy-0.1/src/dummy_sup_2.erl | 15 +++ 8 files changed, 218 insertions(+), 33 deletions(-) create mode 100644 lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/ebin/dummy.app create mode 100644 lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_app.erl create mode 100644 lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_server.erl create mode 100644 lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_sup.erl create mode 100644 lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_sup_2.erl diff --git a/lib/sasl/src/release_handler_1.erl b/lib/sasl/src/release_handler_1.erl index 8d050fb7b0..0cc908fdf7 100644 --- a/lib/sasl/src/release_handler_1.erl +++ b/lib/sasl/src/release_handler_1.erl @@ -20,7 +20,7 @@ %% External exports -export([eval_script/3, eval_script/4, check_script/2]). --export([get_current_vsn/1]). %% exported because used in a test case +-export([get_current_vsn/1, get_supervised_procs/0]). %% exported because used in a test case -record(eval_state, {bins = [], stopped = [], suspended = [], apps = [], libdirs, unpurged = [], vsns = [], newlibs = [], @@ -469,6 +469,19 @@ start(Procs) -> %% supervisor module, we should load the new version, and then %% delete the old. Then we should perform the start changes %% manually, by adding/deleting children. +%% +%% Recent changes to this code cause the upgrade error out and +%% log the case where a suspended supervisor has which_children +%% called against it. This retains the behavior of causing a VM +%% restart to the *old* version of a release but has the +%% advantage of logging the pid and supervisor that had the +%% issue. +%% +%% A second case where this can occur is if a child spec is +%% incorrect and get_modules is called against a process that +%% can't respond to the gen:call. Again an error is logged, +%% an error returned and a VM restart is issued. +%% %% Returns: [{SuperPid, ChildName, ChildPid, Mods}] %%----------------------------------------------------------------- %% OTP-3452. For each application the first item contains the pid @@ -478,49 +491,81 @@ start(Procs) -> get_supervised_procs() -> lists:foldl( fun(Application, Procs) -> - case application_controller:get_master(Application) of - Pid when is_pid(Pid) -> - {Root, _AppMod} = application_master:get_child(Pid), - case get_supervisor_module(Root) of - {ok, SupMod} -> - get_procs(supervisor:which_children(Root), - Root) ++ - [{undefined, undefined, Root, [SupMod]} | - Procs]; - {error, _} -> - error_logger:error_msg("release_handler: " - "cannot find top " - "supervisor for " - "application ~w~n", - [Application]), - get_procs(supervisor:which_children(Root), - Root) ++ Procs - end; - _ -> Procs - end + get_master_procs(Application, + Procs, + application_controller:get_master(Application)) end, [], - lists:map(fun({Application, _Name, _Vsn}) -> - Application - end, - application:which_applications())). + get_application_names()). + +get_supervised_procs(_, Root, Procs, {ok, SupMod}) -> + get_procs(maybe_supervisor_which_children(get_proc_state(Root), SupMod, Root), Root) ++ + [{undefined, undefined, Root, [SupMod]} | Procs]; +get_supervised_procs(Application, Root, Procs, {error, _}) -> + error_logger:error_msg("release_handler: cannot find top supervisor for " + "application ~w~n", [Application]), + get_procs(maybe_supervisor_which_children(get_proc_state(Root), Application, Root), Root) ++ Procs. + +get_application_names() -> + lists:map(fun({Application, _Name, _Vsn}) -> + Application + end, + application:which_applications()). + +get_master_procs(Application, Procs, Pid) when is_pid(Pid) -> + {Root, _AppMod} = application_master:get_child(Pid), + get_supervised_procs(Application, Root, Procs, get_supervisor_module(Root)); +get_master_procs(_, Procs, _) -> + Procs. get_procs([{Name, Pid, worker, dynamic} | T], Sup) when is_pid(Pid) -> - Mods = get_dynamic_mods(Pid), + Mods = maybe_get_dynamic_mods(Name, Pid), [{Sup, Name, Pid, Mods} | get_procs(T, Sup)]; get_procs([{Name, Pid, worker, Mods} | T], Sup) when is_pid(Pid), is_list(Mods) -> [{Sup, Name, Pid, Mods} | get_procs(T, Sup)]; get_procs([{Name, Pid, supervisor, Mods} | T], Sup) when is_pid(Pid) -> - [{Sup, Name, Pid, Mods} | get_procs(T, Sup)] ++ - get_procs(supervisor:which_children(Pid), Pid); + [{Sup, Name, Pid, Mods} | get_procs(T, Sup)] ++ + get_procs(maybe_supervisor_which_children(get_proc_state(Pid), Name, Pid), Pid); get_procs([_H | T], Sup) -> get_procs(T, Sup); get_procs(_, _Sup) -> []. -get_dynamic_mods(Pid) -> - {ok,Res} = gen:call(Pid, self(), get_modules), - Res. +get_proc_state(Proc) -> + {status, _, {module, _}, [_, State, _, _, _]} = sys:get_status(Proc), + State. + +maybe_supervisor_which_children(suspended, Name, Pid) -> + error_logger:error_msg("release_handler: a which_children call" + " to ~p (~p) was avoided. This supervisor" + " is suspended and should likely be upgraded" + " differently. Exiting ...~n", [Name, Pid]), + error(suspended_supervisor); + +maybe_supervisor_which_children(State, Name, Pid) -> + case catch supervisor:which_children(Pid) of + Res when is_list(Res) -> + Res; + Other -> + error_logger:error_msg("release_handler: ~p~nerror during" + " a which_children call to ~p (~p)." + " [State: ~p] Exiting ... ~n", + [Other, Name, Pid, State]), + error(which_children_failed) + end. + +maybe_get_dynamic_mods(Name, Pid) -> + case catch gen:call(Pid, self(), get_modules) of + {ok, Res} -> + Res; + Other -> + error_logger:error_msg("release_handler: ~p~nerror during a" + " get_modules call to ~p (~p)," + " there may be an error in it's" + " childspec. Exiting ...~n", + [Other, Name, Pid]), + error(get_modules_failed) + end. %% XXXX %% Note: The following is a terrible hack done in order to resolve the diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl index efa775f344..c850e339bc 100644 --- a/lib/sasl/test/release_handler_SUITE.erl +++ b/lib/sasl/test/release_handler_SUITE.erl @@ -55,7 +55,8 @@ win32_cases() -> %% Cases that can be run on all platforms cases() -> - [otp_2740, otp_2760, otp_5761, instructions, eval_appup]. + [otp_2740, otp_2760, otp_5761, instructions, eval_appup, + supervisor_which_children_timeout]. groups() -> [{release,[], @@ -512,6 +513,29 @@ no_cc() -> %%% Testing of reported bugs and other tickets. %%%----------------------------------------------------------------- +%%----------------------------------------------------------------- +%% release_handler_1:get_supervised_procs/0 test +%%----------------------------------------------------------------- +supervisor_which_children_timeout(Conf) -> + PrivDir = priv_dir(Conf), + Dir = filename:join(PrivDir,"supervisor_which_children_timeout"), + DataDir = ?config(data_dir,Conf), + LibDir = filename:join([DataDir,release_handler_timeouts]), + + Rel1 = create_and_install_fake_first_release(Dir,[{dummy,"0.1",LibDir}]), + + {ok, Node} = t_start_node(supervisor_which_children_timeout, Rel1, []), + Proc = rpc:call(Node, erlang, whereis, [dummy_sup_2]), + ok = rpc:call(Node, sys, suspend, [Proc]), + Result = {badrpc, {'EXIT', {suspended_supervisor, _}}} = + rpc:call(Node, release_handler_1, get_supervised_procs, []), + ?t:format("release_handler_1:get_supervised_procs/0: ~p~n", [Result]), + + ok. + +supervisor_which_children_timeout(cleanup, Conf) -> + stop_node(node_name(supervisor_which_children_timeout)). + %%----------------------------------------------------------------- %% Ticket: OTP-2740 %% Slogan: vsn not numeric doesn't work so good in release_handling diff --git a/lib/sasl/test/release_handler_SUITE_data/Makefile.src b/lib/sasl/test/release_handler_SUITE_data/Makefile.src index 85e25fdc2f..2dab42b65d 100644 --- a/lib/sasl/test/release_handler_SUITE_data/Makefile.src +++ b/lib/sasl/test/release_handler_SUITE_data/Makefile.src @@ -36,8 +36,13 @@ C= \ c/b.@EMULATOR@ \ c/c_sup.@EMULATOR@ +SUP= \ + release_handler_timeouts/dummy-0.1/ebin/dummy_app.@EMULATOR@ \ + release_handler_timeouts/dummy-0.1/ebin/dummy_server.@EMULATOR@ \ + release_handler_timeouts/dummy-0.1/ebin/dummy_sup.@EMULATOR@ \ + release_handler_timeouts/dummy-0.1/ebin/dummy_sup_2.@EMULATOR@ -all: $(P2B) $(LIB) $(APP) $(OTP2740) $(C) +all: $(P2B) $(LIB) $(APP) $(OTP2740) $(C) $(SUP) P2B/a-2.0/ebin/a.@EMULATOR@: P2B/a-2.0/src/a.erl erlc $(EFLAGS) -oP2B/a-2.0/ebin P2B/a-2.0/src/a.erl @@ -106,3 +111,12 @@ c/b.@EMULATOR@: c/b.erl erlc $(EFLAGS) -oc c/b.erl c/c_sup.@EMULATOR@: c/c_sup.erl erlc $(EFLAGS) -oc c/c_sup.erl + +release_handler_timeouts/dummy-0.1/ebin/dummy_app.@EMULATOR@: release_handler_timeouts/dummy-0.1/src/dummy_app.erl + erlc $(EFLAGS) -orelease_handler_timeouts/dummy-0.1/ebin release_handler_timeouts/dummy-0.1/src/dummy_app.erl +release_handler_timeouts/dummy-0.1/ebin/dummy_server.@EMULATOR@: release_handler_timeouts/dummy-0.1/src/dummy_server.erl + erlc $(EFLAGS) -orelease_handler_timeouts/dummy-0.1/ebin release_handler_timeouts/dummy-0.1/src/dummy_server.erl +release_handler_timeouts/dummy-0.1/ebin/dummy_sup.@EMULATOR@: release_handler_timeouts/dummy-0.1/src/dummy_sup.erl + erlc $(EFLAGS) -orelease_handler_timeouts/dummy-0.1/ebin release_handler_timeouts/dummy-0.1/src/dummy_sup.erl +release_handler_timeouts/dummy-0.1/ebin/dummy_sup_2.@EMULATOR@: release_handler_timeouts/dummy-0.1/src/dummy_sup_2.erl + erlc $(EFLAGS) -orelease_handler_timeouts/dummy-0.1/ebin release_handler_timeouts/dummy-0.1/src/dummy_sup_2.erl \ No newline at end of file diff --git a/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/ebin/dummy.app b/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/ebin/dummy.app new file mode 100644 index 0000000000..9efdc2e5da --- /dev/null +++ b/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/ebin/dummy.app @@ -0,0 +1,7 @@ +{application,dummy, + [{description,"a dummy app"}, + {vsn,"0.1"}, + {registered,[dummy_app]}, + {mod,{dummy_app,[]}}, + {applications,[kernel,stdlib,sasl]}, + {modules,[dummy_app,dummy_server,dummy_sup,dummy_sup_2]}]}. \ No newline at end of file diff --git a/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_app.erl b/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_app.erl new file mode 100644 index 0000000000..51363b3630 --- /dev/null +++ b/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_app.erl @@ -0,0 +1,9 @@ +-module(dummy_app). +-behaviour(application). + +-export([start/2, stop/1]). + +start(_,_) -> + dummy_sup:start_link(). + +stop(_) -> ok. diff --git a/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_server.erl b/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_server.erl new file mode 100644 index 0000000000..382251eba7 --- /dev/null +++ b/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_server.erl @@ -0,0 +1,56 @@ +-module(dummy_server). +-behaviour(gen_server). + +-export([start_link/0, set_state/1, get_state/0]). + +-export([init/1, + handle_call/3, + handle_cast/2, + handle_info/2, + terminate/2, + code_change/3]). + +%% + +start_link() -> + gen_server:start_link({local, ?MODULE}, ?MODULE, [], []). + +set_state(What) -> + gen_server:call(?MODULE, {set_state, What}). + +get_state() -> + gen_server:call(?MODULE, get_state). + + +%% + +init([]) -> + say("init, setting state to 0", []), + {ok, 0}. + + +handle_call({set_state, NewState}, _From, _State) -> + {reply, {ok, NewState}, NewState}; + +handle_call(get_state, _From, State) -> + {reply, State, State}. + +handle_cast('__not_implemented', State) -> + {noreply, State}. + +handle_info(_Info, State) -> + say("info ~p, ~p.", [_Info, State]), + {noreply, State}. + +terminate(_Reason, _State) -> + say("terminate ~p, ~p", [_Reason, _State]), + ok. + +code_change(_OldVsn, State, _Extra) -> + say("code_change ~p, ~p, ~p", [_OldVsn, State, _Extra]), + {ok, State}. + +%% Internal + +say(Format, Data) -> + io:format("~p:~p: ~s~n", [?MODULE, self(), io_lib:format(Format, Data)]). diff --git a/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_sup.erl b/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_sup.erl new file mode 100644 index 0000000000..3d7b5060df --- /dev/null +++ b/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_sup.erl @@ -0,0 +1,15 @@ +-module(dummy_sup). +-behaviour(supervisor). + +-export([start_link/0]). +-export([init/1]). + +start_link() -> + supervisor:start_link({local, ?MODULE}, ?MODULE, []). + +init([]) -> + DummySup2 = {dummy_sup_2, + {dummy_sup_2, start_link, []}, + permanent, 5000, supervisor, [dummy_sup_2]}, + + {ok, {{one_for_one, 10, 10}, [DummySup2]}}. diff --git a/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_sup_2.erl b/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_sup_2.erl new file mode 100644 index 0000000000..d936cbcbd6 --- /dev/null +++ b/lib/sasl/test/release_handler_SUITE_data/release_handler_timeouts/dummy-0.1/src/dummy_sup_2.erl @@ -0,0 +1,15 @@ +-module(dummy_sup_2). +-behaviour(supervisor). + +-export([start_link/0]). +-export([init/1]). + +start_link() -> + supervisor:start_link({local, ?MODULE}, ?MODULE, []). + +init([]) -> + Dummy = {dummy_server, + {dummy_server, start_link, []}, + permanent, 5000, worker, [dummy_server]}, + + {ok, {{one_for_one, 10, 10}, [Dummy]}}. -- cgit v1.2.3 From 82897cc8f399fab832148711b586215c9a3f7af1 Mon Sep 17 00:00:00 2001 From: Christian von Roques Date: Tue, 6 Sep 2011 19:23:37 +0200 Subject: Support 'md2' hash in crypto:rsa_sign/3 and crypto:rsa_verify/4 --- lib/crypto/c_src/crypto.c | 58 +++++++++++++++++++++------------------- lib/crypto/doc/src/crypto.xml | 4 +-- lib/crypto/src/crypto.erl | 2 +- lib/crypto/test/crypto_SUITE.erl | 30 +++++++++++++++------ 4 files changed, 55 insertions(+), 39 deletions(-) diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index c781ccb302..83772d9023 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -267,6 +268,7 @@ static ERL_NIF_TERM atom_true; static ERL_NIF_TERM atom_false; static ERL_NIF_TERM atom_sha; static ERL_NIF_TERM atom_md5; +static ERL_NIF_TERM atom_md2; static ERL_NIF_TERM atom_ripemd160; static ERL_NIF_TERM atom_error; static ERL_NIF_TERM atom_rsa_pkcs1_padding; @@ -337,6 +339,7 @@ static int load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info) atom_false = enif_make_atom(env,"false"); atom_sha = enif_make_atom(env,"sha"); atom_md5 = enif_make_atom(env,"md5"); + atom_md2 = enif_make_atom(env,"md2"); atom_ripemd160 = enif_make_atom(env,"ripemd160"); atom_error = enif_make_atom(env,"error"); atom_rsa_pkcs1_padding = enif_make_atom(env,"rsa_pkcs1_padding"); @@ -1047,16 +1050,28 @@ static ERL_NIF_TERM dss_verify(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv return(i > 0) ? atom_true : atom_false; } +struct hash_def { + int type; + unsigned int m_len; + unsigned char * (*func) (const unsigned char *d, size_t n, unsigned char *md); +}; + +static const struct hash_def md2_hash_def = { NID_md2, MD2_DIGEST_LENGTH, &MD2}; +static const struct hash_def md5_hash_def = { NID_md5, MD5_DIGEST_LENGTH, &MD5}; +static const struct hash_def sha1_hash_def = { NID_sha1, SHA_DIGEST_LENGTH, &SHA1}; + static ERL_NIF_TERM rsa_verify(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) {/* (Type, Data, Signature, Key=[E,N]) */ ErlNifBinary data_bin, sign_bin; unsigned char hmacbuf[SHA_DIGEST_LENGTH]; ERL_NIF_TERM head, tail, ret; - int i, is_sha; + int i; RSA* rsa = RSA_new(); + const struct hash_def *hash_def = NULL; - if (argv[0] == atom_sha) is_sha = 1; - else if (argv[0] == atom_md5) is_sha = 0; + if (argv[0] == atom_sha) hash_def = &sha1_hash_def; + else if (argv[0] == atom_md5) hash_def = &md5_hash_def; + else if (argv[0] == atom_md2) hash_def = &md2_hash_def; else goto badarg; if (!inspect_mpint(env, argv[1], &data_bin) @@ -1070,16 +1085,9 @@ static ERL_NIF_TERM rsa_verify(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv ret = enif_make_badarg(env); } else { - if (is_sha) { - SHA1(data_bin.data+4, data_bin.size-4, hmacbuf); - i = RSA_verify(NID_sha1, hmacbuf, SHA_DIGEST_LENGTH, - sign_bin.data+4, sign_bin.size-4, rsa); - } - else { - MD5(data_bin.data+4, data_bin.size-4, hmacbuf); - i = RSA_verify(NID_md5, hmacbuf, MD5_DIGEST_LENGTH, - sign_bin.data+4, sign_bin.size-4, rsa); - } + (void) *hash_def->func(data_bin.data+4, data_bin.size-4, hmacbuf); + i = RSA_verify(hash_def->type, hmacbuf, hash_def->m_len, + sign_bin.data+4, sign_bin.size-4, rsa); ret = (i==1 ? atom_true : atom_false); } RSA_free(rsa); @@ -1221,10 +1229,12 @@ static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar unsigned char hmacbuf[SHA_DIGEST_LENGTH]; unsigned rsa_s_len; RSA *rsa = RSA_new(); - int i, is_sha; + int i; + const struct hash_def *hash_def = NULL; - if (argv[0] == atom_sha) is_sha = 1; - else if (argv[0] == atom_md5) is_sha = 0; + if (argv[0] == atom_sha) hash_def = &sha1_hash_def; + else if (argv[0] == atom_md5) hash_def = &md5_hash_def; + else if (argv[0] == atom_md2) hash_def = &md2_hash_def; else goto badarg; if (!inspect_mpint(env,argv[1],&data_bin) @@ -1240,18 +1250,10 @@ static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar return enif_make_badarg(env); } enif_alloc_binary(RSA_size(rsa), &ret_bin); - if (is_sha) { - SHA1(data_bin.data+4, data_bin.size-4, hmacbuf); - ERL_VALGRIND_ASSERT_MEM_DEFINED(hmacbuf, SHA_DIGEST_LENGTH); - i = RSA_sign(NID_sha1, hmacbuf, SHA_DIGEST_LENGTH, - ret_bin.data, &rsa_s_len, rsa); - } - else { - MD5(data_bin.data+4, data_bin.size-4, hmacbuf); - ERL_VALGRIND_ASSERT_MEM_DEFINED(hmacbuf, MD5_DIGEST_LENGTH); - i = RSA_sign(NID_md5, hmacbuf,MD5_DIGEST_LENGTH, - ret_bin.data, &rsa_s_len, rsa); - } + (void) *hash_def->func(data_bin.data+4, data_bin.size-4, hmacbuf); + ERL_VALGRIND_ASSERT_MEM_DEFINED(hmacbuf, hash_def->m_len); + i = RSA_sign(hash_def->type, hmacbuf, hash_def->m_len, + ret_bin.data, &rsa_s_len, rsa); RSA_free(rsa); if (i) { ERL_VALGRIND_MAKE_MEM_DEFINED(ret_bin.data, rsa_s_len); diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 179ba4498c..45f7e3ff46 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -795,7 +795,7 @@ Mpint() = >]]> E, N, D = Mpint Where E is the public exponent, N is public modulus and D is the private exponent. - DigestType = md5 | sha + DigestType = md2 | md5 | sha The default DigestType is sha. Mpint = binary() Signature = binary() @@ -817,7 +817,7 @@ Mpint() = >]]> Key = [E, N] E, N = Mpint Where E is the public exponent and N is public modulus. - DigestType = md5 | sha + DigestType = md2 | md5 | sha The default DigestType is sha. Mpint = binary() diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index c35dfcebab..4392069e3d 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -91,7 +91,7 @@ aes_ctr_stream_init, aes_ctr_stream_encrypt, aes_ctr_stream_decrypt, info_lib]). --type rsa_digest_type() :: 'md5' | 'sha'. +-type rsa_digest_type() :: 'md2' | 'md5' | 'sha'. -type dss_digest_type() :: 'none' | 'sha'. -type crypto_integer() :: binary() | integer(). diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 283aadb6ea..004858fdda 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -1075,16 +1075,30 @@ rsa_sign_test(Config) when is_list(Config) -> PrivKey = [crypto:mpint(PubEx), crypto:mpint(Mod), crypto:mpint(PrivEx)], PubKey = [crypto:mpint(PubEx), crypto:mpint(Mod)], - ?line Sig1 = crypto:rsa_sign(sized_binary(Msg), PrivKey), - ?line m(crypto:rsa_verify(sized_binary(Msg), sized_binary(Sig1),PubKey), true), + ?line Sig = crypto:rsa_sign(sized_binary(Msg), PrivKey), + ?line m(crypto:rsa_verify(sized_binary(Msg), sized_binary(Sig),PubKey), true), - ?line Sig2 = crypto:rsa_sign(md5, sized_binary(Msg), PrivKey), - ?line m(crypto:rsa_verify(md5, sized_binary(Msg), sized_binary(Sig2),PubKey), true), - - ?line m(Sig1 =:= Sig2, false), - ?line m(crypto:rsa_verify(md5, sized_binary(Msg), sized_binary(Sig1),PubKey), false), - ?line m(crypto:rsa_verify(sha, sized_binary(Msg), sized_binary(Sig1),PubKey), true), + ?line Sig_md2 = crypto:rsa_sign(md2, sized_binary(Msg), PrivKey), + ?line Sig_md5 = crypto:rsa_sign(md5, sized_binary(Msg), PrivKey), + ?line Sig_sha = crypto:rsa_sign(sha, sized_binary(Msg), PrivKey), + + ?line m(Sig =:= Sig_sha, true), + ?line m(Sig_md2 =:= Sig_md5, false), + ?line m(Sig_md2 =:= Sig_sha, false), + ?line m(Sig_md5 =:= Sig_sha, false), + ?line m(crypto:rsa_verify(md2, sized_binary(Msg), sized_binary(Sig_md2),PubKey), true), + ?line m(crypto:rsa_verify(md2, sized_binary(Msg), sized_binary(Sig_md5),PubKey), false), + ?line m(crypto:rsa_verify(md2, sized_binary(Msg), sized_binary(Sig_sha),PubKey), false), + + ?line m(crypto:rsa_verify(md5, sized_binary(Msg), sized_binary(Sig_md2),PubKey), false), + ?line m(crypto:rsa_verify(md5, sized_binary(Msg), sized_binary(Sig_md5),PubKey), true), + ?line m(crypto:rsa_verify(md5, sized_binary(Msg), sized_binary(Sig_sha),PubKey), false), + + ?line m(crypto:rsa_verify(sha, sized_binary(Msg), sized_binary(Sig_md2),PubKey), false), + ?line m(crypto:rsa_verify(sha, sized_binary(Msg), sized_binary(Sig_md5),PubKey), false), + ?line m(crypto:rsa_verify(sha, sized_binary(Msg), sized_binary(Sig_sha),PubKey), true), + ok. dsa_sign_test(doc) -> -- cgit v1.2.3 From c7e5f7576e213060cbb332be64a7c3798f6a2cc2 Mon Sep 17 00:00:00 2001 From: Christian von Roques Date: Tue, 6 Sep 2011 19:28:21 +0200 Subject: Support md2WithRSAEncryption certificates in public_key --- lib/public_key/doc/src/public_key.xml | 2 +- lib/public_key/src/pubkey_cert.erl | 4 +++- lib/public_key/src/public_key.erl | 10 +++++++--- lib/public_key/test/public_key_SUITE.erl | 5 ++++- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/public_key/doc/src/public_key.xml b/lib/public_key/doc/src/public_key.xml index 9a3832c68b..b3ce49e2ca 100644 --- a/lib/public_key/doc/src/public_key.xml +++ b/lib/public_key/doc/src/public_key.xml @@ -79,7 +79,7 @@

rsa_padding() = 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding' | 'rsa_no_padding'

-

rsa_digest_type() = 'md5' | 'sha'

+

rsa_digest_type() = 'md2' | 'md5' | 'sha'

dss_digest_type() = 'none' | 'sha'

diff --git a/lib/public_key/src/pubkey_cert.erl b/lib/public_key/src/pubkey_cert.erl index 5ab9642279..61082a1ec5 100644 --- a/lib/public_key/src/pubkey_cert.erl +++ b/lib/public_key/src/pubkey_cert.erl @@ -38,7 +38,7 @@ %%==================================================================== %%-------------------------------------------------------------------- --spec verify_data(DER::binary()) -> {md5 | sha, binary(), binary()}. +-spec verify_data(DER::binary()) -> {md2 | md5 | sha, binary(), binary()}. %% %% Description: Extracts data from DerCert needed to call public_key:verify/4. %%-------------------------------------------------------------------- @@ -378,6 +378,8 @@ digest_type(?sha1WithRSAEncryption) -> sha; digest_type(?md5WithRSAEncryption) -> md5; +digest_type(?md2WithRSAEncryption) -> + md2; digest_type(?'id-dsa-with-sha1') -> sha. diff --git a/lib/public_key/src/public_key.erl b/lib/public_key/src/public_key.erl index 33fcce2c44..940efffcd0 100644 --- a/lib/public_key/src/public_key.erl +++ b/lib/public_key/src/public_key.erl @@ -55,7 +55,7 @@ -type rsa_padding() :: 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding' | 'rsa_no_padding'. -type public_crypt_options() :: [{rsa_pad, rsa_padding()}]. --type rsa_digest_type() :: 'md5' | 'sha'. +-type rsa_digest_type() :: 'md2' | 'md5' | 'sha'. -type dss_digest_type() :: 'none' | 'sha'. -define(UINT32(X), X:32/unsigned-big-integer). @@ -307,7 +307,8 @@ encrypt_private(PlainText, #'RSAPrivateKey'{modulus = N, sign(PlainText, DigestType, #'RSAPrivateKey'{modulus = N, publicExponent = E, privateExponent = D}) when is_binary(PlainText), - (DigestType == md5 orelse + (DigestType == md2 orelse + DigestType == md5 orelse DigestType == sha) -> crypto:rsa_sign(DigestType, sized_binary(PlainText), [crypto:mpint(E), @@ -335,7 +336,10 @@ sign(PlainText, sha, #'DSAPrivateKey'{p = P, q = Q, g = G, x = X}) %%-------------------------------------------------------------------- verify(PlainText, DigestType, Signature, #'RSAPublicKey'{modulus = Mod, publicExponent = Exp}) - when is_binary (PlainText), DigestType == sha; DigestType == md5 -> + when is_binary(PlainText), + (DigestType == md2 orelse + DigestType == md5 orelse + DigestType == sha) -> crypto:rsa_verify(DigestType, sized_binary(PlainText), sized_binary(Signature), diff --git a/lib/public_key/test/public_key_SUITE.erl b/lib/public_key/test/public_key_SUITE.erl index b11e4d092a..a9c198c581 100644 --- a/lib/public_key/test/public_key_SUITE.erl +++ b/lib/public_key/test/public_key_SUITE.erl @@ -537,7 +537,10 @@ rsa_sign_verify(Config) when is_list(Config) -> false = public_key:verify(Msg, sha, <<1:8, RSASign/binary>>, PublicRSA), RSASign1 = public_key:sign(Msg, md5, PrivateRSA), - true = public_key:verify(Msg, md5, RSASign1, PublicRSA). + true = public_key:verify(Msg, md5, RSASign1, PublicRSA), + + RSASign2 = public_key:sign(Msg, md2, PrivateRSA), + true = public_key:verify(Msg, md2, RSASign2, PublicRSA). %%-------------------------------------------------------------------- -- cgit v1.2.3 From 6cd2fa9346d51ab936873d96b5c96bf5c15ddcf0 Mon Sep 17 00:00:00 2001 From: Christian von Roques Date: Tue, 6 Sep 2011 19:30:10 +0200 Subject: Document crypto:sha_mac_96/2 to compute an SHA MAC, not MD5 --- lib/crypto/doc/src/crypto.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 45f7e3ff46..5cb8139062 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -347,7 +347,7 @@ Mpint() = >]]> sha_mac_96(Key, Data) -> Mac - Compute an MD5 MACmessage authentification code + Compute an SHA MACmessage authentification code Key = Data = iolist() | binary() Mac = binary() -- cgit v1.2.3 From ef757a19bdab06e29dcc29de32ef7b8202f2e68d Mon Sep 17 00:00:00 2001 From: Christian von Roques Date: Mon, 8 Aug 2011 16:33:05 +0200 Subject: Changes inspired by running cppcheck(1) --- erts/emulator/sys/common/erl_poll.c | 2 +- lib/erl_interface/src/legacy/erl_fix_alloc.c | 4 ++++ lib/erl_interface/src/registry/reg_dump.c | 1 + lib/erl_interface/src/registry/reg_restore.c | 5 +++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/erts/emulator/sys/common/erl_poll.c b/erts/emulator/sys/common/erl_poll.c index f5c785d683..7278075f54 100644 --- a/erts/emulator/sys/common/erl_poll.c +++ b/erts/emulator/sys/common/erl_poll.c @@ -405,7 +405,7 @@ woke_up(ErtsPollSet ps) static ERTS_INLINE void wake_poller(ErtsPollSet ps, int interrupted) { - int wake; + int wake = 0; #ifdef ERTS_SMP erts_aint32_t wakeup_state; if (!interrupted) diff --git a/lib/erl_interface/src/legacy/erl_fix_alloc.c b/lib/erl_interface/src/legacy/erl_fix_alloc.c index 20f3024e41..ca09fc3b8b 100644 --- a/lib/erl_interface/src/legacy/erl_fix_alloc.c +++ b/lib/erl_interface/src/legacy/erl_fix_alloc.c @@ -109,6 +109,10 @@ void *erl_eterm_alloc (void) erl_eterm_state->freed--; } else if ((b = malloc(sizeof(*b))) == NULL) { erl_errno = ENOMEM; +#ifdef _REENTRANT + ei_mutex_unlock(erl_eterm_state->lock); +#endif /* _REENTRANT */ + return NULL; } erl_eterm_state->allocated++; b->free = 0; diff --git a/lib/erl_interface/src/registry/reg_dump.c b/lib/erl_interface/src/registry/reg_dump.c index 1e640fb506..d2854c10b5 100644 --- a/lib/erl_interface/src/registry/reg_dump.c +++ b/lib/erl_interface/src/registry/reg_dump.c @@ -215,6 +215,7 @@ static int mn_send_write(int fd, erlang_pid *mnesia, const char *key, ei_reg_obj else ei_encode_long(msgbuf,&index,(long)(obj->val.p)); /* just the pointer */ break; default: + if (dbuf) free(dbuf); return -1; } diff --git a/lib/erl_interface/src/registry/reg_restore.c b/lib/erl_interface/src/registry/reg_restore.c index 765c3f4314..7bc1c758af 100644 --- a/lib/erl_interface/src/registry/reg_restore.c +++ b/lib/erl_interface/src/registry/reg_restore.c @@ -303,6 +303,9 @@ int ei_reg_restore(int fd, ei_reg *reg, const char *mntab) if (mn_decode_insert(reg,msgbuf,&index,keybuf)) goto restore_failure; } + if (keybuf) free(keybuf); + if (dbuf) free(dbuf); + /* wait for unlink */ if (mn_unlink(fd)) return -1; @@ -310,8 +313,6 @@ int ei_reg_restore(int fd, ei_reg *reg, const char *mntab) ei_hash_foreach(reg->tab,clean_obj); /* success */ - if (keybuf) free(keybuf); - if (dbuf) free(dbuf); return 0; restore_failure: -- cgit v1.2.3 From 292eb1b63dcd8794b468f11cdec55afdbd5c48f6 Mon Sep 17 00:00:00 2001 From: Anneli Cuss Date: Wed, 7 Sep 2011 09:08:59 +1000 Subject: ei_decode_ei_term() returns 1 if index is incremented This documentation is a bit perplexing when viewed in light of erl_interface/src/misc/ei_decode_term.c. --- lib/erl_interface/doc/src/ei.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml index de4e4b4301..76e02a6858 100644 --- a/lib/erl_interface/doc/src/ei.xml +++ b/lib/erl_interface/doc/src/ei.xml @@ -581,9 +581,9 @@ ei_x_encode_empty_list(&x); union, it is decoded, and the appropriate field in value]]> is set, and is incremented by the term size.

-

The function returns 0 on successful decoding, -1 on error, - and 1 if the term seems alright, but does not fit in the - structure. If it returns 0, the +

The function returns 1 on successful decoding, -1 on error, + and 0 if the term seems alright, but does not fit in the + structure. If it returns 1, the will be incremented, and the contains the decoded term.

The structure will contain the arity for a tuple -- cgit v1.2.3 From ff9a8a6340908344b0a06cf96f93180ec9479d3a Mon Sep 17 00:00:00 2001 From: Anneli Cuss Date: Wed, 7 Sep 2011 09:17:42 +1000 Subject: Make comment reflect code in erl_interface/src/misc/ei_decode_term.c Note that ei_decode_term.h has the correct behaviour described! Also removed extraneous '/* return 0; */' comments. --- lib/erl_interface/src/misc/ei_decode_term.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/erl_interface/src/misc/ei_decode_term.c b/lib/erl_interface/src/misc/ei_decode_term.c index bfb4571337..0b82ef0e35 100644 --- a/lib/erl_interface/src/misc/ei_decode_term.c +++ b/lib/erl_interface/src/misc/ei_decode_term.c @@ -25,8 +25,8 @@ #include "ei_decode_term.h" #include "putget.h" -/* Returns 0 on successful encoding, -1 on error, and 1 if the term seems - alright, but does not fit in the term structure. If it returns 0, the +/* Returns 1 on successful encoding, -1 on error, and 0 if the term seems + alright, but does not fit in the term structure. If it returns 1, the index will be incremented, and the term contains the decoded term. */ int ei_decode_ei_term(const char* buf, int* index, ei_term* term) @@ -111,10 +111,10 @@ int ei_decode_ei_term(const char* buf, int* index, ei_term* term) break; case ERL_SMALL_TUPLE_EXT: term->arity = get8(s); - break; /*return 0;*/ + break; case ERL_LARGE_TUPLE_EXT: term->arity = get32be(s); - break; /*return 0;*/ + break; case ERL_NIL_EXT: term->arity = 0; break; @@ -123,7 +123,7 @@ int ei_decode_ei_term(const char* buf, int* index, ei_term* term) return 0; case ERL_LIST_EXT: term->arity = get32be(s); - break; /*return 0;*/ + break; case ERL_BINARY_EXT: term->size = get32be(s); return 0; -- cgit v1.2.3 From 050328b23b8ff8e0536ecfdd3ab67e309a42d487 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Tue, 31 May 2011 10:45:07 +0200 Subject: Fix trivial typos in erlang(3) --- erts/doc/src/erlang.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 84d4160e6a..2fabc6d62d 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -5950,7 +5950,7 @@ true wordsize -

Same as {wordsize, internal}

+

Same as {wordsize, internal}.

{wordsize, internal} @@ -5959,7 +5959,7 @@ true and on a pure 64-bit architecture 8 is returned. On a halfword 64-bit emulator, 4 is returned, as the Erlang terms are stored using a virtual wordsize of half the - systems wordsize.

+ system's wordsize.

{wordsize, external} -- cgit v1.2.3 From 56f482ae02ea2e1b531a86e7b14bc9a3619a918f Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sun, 3 Jul 2011 14:24:33 +0200 Subject: Fix typos in mod_esi(3) --- lib/inets/doc/src/mod_esi.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/inets/doc/src/mod_esi.xml b/lib/inets/doc/src/mod_esi.xml index 9674cd9a88..9906ae0895 100644 --- a/lib/inets/doc/src/mod_esi.xml +++ b/lib/inets/doc/src/mod_esi.xml @@ -31,8 +31,8 @@ mod_esi Erlang Server Interface -

This module defines the API - Erlang Server Interface (ESI). - Which is a more efficient way of writing erlang scripts +

This module defines the Erlang Server Interface (ESI) API. + It is a more efficient way of writing erlang scripts for your Inets web server than writing them as common CGI scripts.

@@ -95,12 +95,12 @@ the server uses when deliver/2 is called; do not assume anything about the datatype.

Use this callback function to dynamically generate dynamic web - content. when a part of the page is generated send the + content. When a part of the page is generated send the data back to the client through deliver/2. Note that the first chunk of data sent to the client must at least contain all HTTP header fields that the response will generate. If the first chunk does not contain the - End of HTTP the header, that is "\r\n\r\n", + End of HTTP header, that is "\r\n\r\n", the server will assume that no HTTP header fields will be generated.

@@ -118,8 +118,8 @@

This callback format consumes a lot of memory since the whole response must be generated before it is sent to the - user. This functions is deprecated and only keept for backwards - compatibility. + user. This function is deprecated and only kept for backwards + compatibility. For new development Module:Function/3 should be used.

-- cgit v1.2.3 From f2bde05d1659b7cf2b1d7ed28ca181d27ff27b5c Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Fri, 15 Jul 2011 21:50:46 +0200 Subject: Fix typos (variable name) in erl_nif(3) --- erts/doc/src/erl_nif.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index cdce4ec0b8..48839e9081 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -216,14 +216,14 @@ ok

ERL_NIF_TERM term; - MyStruct* ptr = enif_alloc_resource(my_resource_type, sizeof(MyStruct)); + MyStruct* obj = enif_alloc_resource(my_resource_type, sizeof(MyStruct)); /* initialize struct ... */ - term = enif_make_resource(env, ptr); + term = enif_make_resource(env, obj); if (keep_a_reference_of_our_own) { - /* store 'ptr' in static variable, private data or other resource object */ + /* store 'obj' in static variable, private data or other resource object */ } else { enif_release_resource(obj); -- cgit v1.2.3 From 4d8af7116ea6e1bacf5d949810f63c8ec54249e6 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Tue, 9 Aug 2011 18:54:04 +0200 Subject: Fix typos in cover.erl --- lib/tools/src/cover.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl index 905ad895c9..fb9744d759 100644 --- a/lib/tools/src/cover.erl +++ b/lib/tools/src/cover.erl @@ -55,14 +55,14 @@ %% compiled module. This is necessary so that the code can be loaded %% on remote nodes that are started after the compilation. %% -%% PARELLALISM +%% PARALLELISM %% To take advantage of SMP when doing the cover analysis both the data %% collection and analysis has been parallelized. One process is spawned for %% each node when collecting data, and on the remote node when collecting data %% one process is spawned per module. %% %% When analyzing data it is possible to issue multiple analyse(_to_file)/X -%% calls at once. They are however all calls (for backwardscompatability +%% calls at once. They are however all calls (for backwards compatibility %% reasons) so the user of cover will have to spawn several processes to to the %% calls ( or use async_analyse_to_file ). %% -- cgit v1.2.3 From db7134d74eb9bd2febeb39a6f2a44ed86e47776a Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Tue, 23 Aug 2011 19:40:07 +0200 Subject: dialyzer: fix a small typo in list_to_bitstring test --- lib/dialyzer/test/small_SUITE_data/src/list_to_bitstring.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dialyzer/test/small_SUITE_data/src/list_to_bitstring.erl b/lib/dialyzer/test/small_SUITE_data/src/list_to_bitstring.erl index 2da708cb15..109aa88f16 100644 --- a/lib/dialyzer/test/small_SUITE_data/src/list_to_bitstring.erl +++ b/lib/dialyzer/test/small_SUITE_data/src/list_to_bitstring.erl @@ -2,7 +2,7 @@ %% From: Ken Robinson %% Date: 28/04/2011, 17:26 %% -%% Program that produced borus "Function has no local return" warnings +%% Program that produced bogus "Function has no local return" warnings %% due to erlang:list_to_bitstring/1 having erroneous hard coded type %% information, namely accepting iolist() instead of bitstrlist(). %% Fixed 29/04/2011. -- cgit v1.2.3 From 38f6fbca6ad053a1f4918756226c626cdefe63c6 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Thu, 25 Aug 2011 18:10:12 +0200 Subject: Fix typos in dbg(3) --- lib/runtime_tools/doc/src/dbg.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/runtime_tools/doc/src/dbg.xml b/lib/runtime_tools/doc/src/dbg.xml index 0e63649c09..4e32bd5c0d 100644 --- a/lib/runtime_tools/doc/src/dbg.xml +++ b/lib/runtime_tools/doc/src/dbg.xml @@ -706,7 +706,7 @@ Error: fun containing local erlang function calls ('is_atomm' called in guard) c value from the last invocation of the fun. The initial value of the second parameter is specified in the InitialData part of the HandlerSpec. The HandlerFun may - chose any appropriate action to take when invoked, and can + choose any appropriate action to take when invoked, and can save a state for the next invocation by returning it.

If Type is a port, then the second parameter should @@ -766,7 +766,7 @@ Error: fun containing local erlang function calls ('is_atomm' called in guard) c

This function creates a trace port generating fun. The fun takes no arguments and returns a newly opened trace port. The return value from this function is suitable as - a second parameter to tracer/2, i. e. dbg:tracer(port, dbg:trace_port(ip, 4711)).

+ a second parameter to tracer/2, i.e. dbg:tracer(port, dbg:trace_port(ip, 4711)).

A trace port is an Erlang port to a dynamically linked in driver that handles trace messages directly, without the overhead of sending them @@ -852,9 +852,9 @@ Error: fun containing local erlang function calls ('is_atomm' called in guard) c

This function is used to do a control operation on the active trace port driver on the given node - (Nodename). Which operations that are allowed as well - as their return values are depending on which trace driver - that is used.

+ (Nodename). Which operations are allowed as well + as their return values depend on which trace driver + is used.

Returns either ok or {ok, Result} if the operation was successful, or {error, Reason} if the current tracer is a process -- cgit v1.2.3 From e17a38aa65a865e36accf1ab68ca369275d9f71c Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 31 Aug 2011 14:50:28 +0200 Subject: Fix typos in instrument(3) --- lib/tools/doc/src/instrument.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tools/doc/src/instrument.xml b/lib/tools/doc/src/instrument.xml index 12877994de..a7c62c8770 100644 --- a/lib/tools/doc/src/instrument.xml +++ b/lib/tools/doc/src/instrument.xml @@ -342,7 +342,7 @@

Stores the current memory allocation map on the file File. Returns true if the emulator has been started with the "+Mim true" command-line argument, and - the map was successfuly stored; otherwise, false. The + the map was successfully stored; otherwise, false. The contents of the file can later be read using read_memory_data/1. NOTE:store_memory_data/0 blocks execution of @@ -360,7 +360,7 @@

Stores the current memory status on the file File. Returns true if the emulator has been started with the "+Mis true", or "+Mim true" - command-line arguments, and the data was successfuly stored; + command-line arguments, and the data was successfully stored; otherwise, false. The contents of the file can later be read using read_memory_status/1.

-- cgit v1.2.3 From 90f703bafc69bf2446db718fd681c26c2bef7f10 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 31 Aug 2011 15:04:36 +0200 Subject: Fix misspelling of successful --- erts/emulator/drivers/common/inet_drv.c | 2 +- erts/emulator/sys/win32/sys.c | 2 +- erts/preloaded/src/prim_file.erl | 2 +- lib/cosFileTransfer/src/CosFileTransfer_FileTransferSession_impl.erl | 2 +- lib/hipe/regalloc/hipe_node_sets.erl | 2 +- lib/ic/src/ic.erl | 2 +- lib/inets/doc/src/mod_auth.xml | 2 +- lib/kernel/examples/uds_dist/c_src/uds_drv.c | 2 +- lib/kernel/src/auth.erl | 2 +- lib/kernel/test/file_SUITE.erl | 2 +- lib/stdlib/src/erl_expand_records.erl | 2 +- lib/wx/api_gen/gl_gen.erl | 2 +- lib/wx/api_gen/wx_gen.erl | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c index ebc4469a23..743c01d935 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -7012,7 +7012,7 @@ static int sctp_fill_opts(inet_descriptor* desc, char* buf, int buflen, default: RETURN_ERROR(spec, -EINVAL); /* No more valid options */ } - /* If we get here one result has been succesfully loaded */ + /* If we get here one result has been successfully loaded */ length ++; } if (buflen != 0) RETURN_ERROR(spec, -EINVAL); /* Optparam mismatch */ diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c index a2159d063c..f2d2933559 100644 --- a/erts/emulator/sys/win32/sys.c +++ b/erts/emulator/sys/win32/sys.c @@ -2771,7 +2771,7 @@ ready_output(ErlDrvData drv_data, ErlDrvEvent ready_event) DEBUGF(("ready_output(%d, 0x%x)\n", drv_data, ready_event)); set_busy_port(dp->port_num, 0); if (!(dp->outbuf)) { - /* Happens because event sometimes get signalled during a succesful + /* Happens because event sometimes get signalled during a successful write... */ return; } diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl index ac7570582e..ac2797ec03 100644 --- a/erts/preloaded/src/prim_file.erl +++ b/erts/preloaded/src/prim_file.erl @@ -824,7 +824,7 @@ list_dir_int(Port, Dir) -> %% Opens a driver port and converts any problems into {error, emfile}. -%% Returns {ok, Port} when succesful. +%% Returns {ok, Port} when successful. drv_open(Driver, Portopts) -> try erlang:open_port({spawn, Driver}, Portopts) of diff --git a/lib/cosFileTransfer/src/CosFileTransfer_FileTransferSession_impl.erl b/lib/cosFileTransfer/src/CosFileTransfer_FileTransferSession_impl.erl index e222c5b92b..5dbe6f6b2f 100644 --- a/lib/cosFileTransfer/src/CosFileTransfer_FileTransferSession_impl.erl +++ b/lib/cosFileTransfer/src/CosFileTransfer_FileTransferSession_impl.erl @@ -792,7 +792,7 @@ target_FTS_operation(State, _SrcFile, DestFile, Op, Offset) -> %% Delete the temporary local copy. delete_tmp_file(TempName, "Transfer completed but failed to remove temporary local copy."), - %% Completed the transfer succesfully. + %% Completed the transfer successfully. {reply, ok, State}; {error, epath} -> delete_tmp_file(TempName, diff --git a/lib/hipe/regalloc/hipe_node_sets.erl b/lib/hipe/regalloc/hipe_node_sets.erl index b5e2971c4d..0bb21d7506 100644 --- a/lib/hipe/regalloc/hipe_node_sets.erl +++ b/lib/hipe/regalloc/hipe_node_sets.erl @@ -29,7 +29,7 @@ -record(node_sets, {spilled, % Nodes marked for spilling - colored % Nodes succesfully colored + colored % Nodes successfully colored }). spilled(Node_sets) -> Node_sets#node_sets.spilled. diff --git a/lib/ic/src/ic.erl b/lib/ic/src/ic.erl index 3c6ce3d9d6..e22179fe42 100644 --- a/lib/ic/src/ic.erl +++ b/lib/ic/src/ic.erl @@ -320,7 +320,7 @@ pragma(G, File, T) -> time, time("pragma registration ", ic_pragma, pragma_reg, [G,T]), ic_pragma:pragma_reg(G,T)) of - %% All pragmas were succesfully applied + %% All pragmas were successfully applied {ok,Clean} -> typing(G, File, Clean); diff --git a/lib/inets/doc/src/mod_auth.xml b/lib/inets/doc/src/mod_auth.xml index 42c49e9c35..2134ebeeae 100644 --- a/lib/inets/doc/src/mod_auth.xml +++ b/lib/inets/doc/src/mod_auth.xml @@ -80,7 +80,7 @@

delete_user/2, delete_user/3 and delete_user/4 deletes a user - from the user database. If the operation is succesfull, this + from the user database. If the operation is successful, this function returns true. If an error occurs, {error,Reason} is returned. When delete_user/2 is called the Port and Dir options are mandatory.

diff --git a/lib/kernel/examples/uds_dist/c_src/uds_drv.c b/lib/kernel/examples/uds_dist/c_src/uds_drv.c index fb10a375f4..a4bcd81240 100644 --- a/lib/kernel/examples/uds_dist/c_src/uds_drv.c +++ b/lib/kernel/examples/uds_dist/c_src/uds_drv.c @@ -1000,7 +1000,7 @@ static int ensure_dir(char *path) /* ** Try to open a lock file and lock the first byte write-only (advisory) -** return the file descriptor if succesful, otherwise -1 (<0). +** return the file descriptor if successful, otherwise -1 (<0). */ static int try_lock(char *sockname, Byte *p_creation) { diff --git a/lib/kernel/src/auth.erl b/lib/kernel/src/auth.erl index ac25ab958c..c329a5652a 100644 --- a/lib/kernel/src/auth.erl +++ b/lib/kernel/src/auth.erl @@ -212,7 +212,7 @@ handle_info({From,badcookie,net_kernel,{From,spawn_link,_M,_F,_A,_Gleader}}, O) {noreply, O}; handle_info({_From,badcookie,ddd_server,_Mess}, O) -> %% Ignore bad messages to the ddd server, they will be resent - %% If the authentication is succesful + %% If the authentication is successful {noreply, O}; handle_info({From,badcookie,rex,_Msg}, O) -> auth:print(getnode(From), diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl index fdab2eb02b..77fc7e73f9 100644 --- a/lib/kernel/test/file_SUITE.erl +++ b/lib/kernel/test/file_SUITE.erl @@ -2165,7 +2165,7 @@ write_compressed(Config) when is_list(Config) -> ?line Second = io:get_line(Fd1, ''), ?line ok = ?FILE_MODULE:close(Fd1), - %% Verify succesful compression by uncompressing the file + %% Verify successful compression by uncompressing the file %% using zlib:gunzip/1. ?line {ok,Contents} = file:read_file(MyFile), diff --git a/lib/stdlib/src/erl_expand_records.erl b/lib/stdlib/src/erl_expand_records.erl index eada563914..20fd247cea 100644 --- a/lib/stdlib/src/erl_expand_records.erl +++ b/lib/stdlib/src/erl_expand_records.erl @@ -35,7 +35,7 @@ trecords=sets:new(), % Typed records uses_types=false, % Are there -spec or -type in the module strict_ra=[], % strict record accesses - checked_ra=[] % succesfully accessed records + checked_ra=[] % successfully accessed records }). -spec(module(AbsForms, CompileOptions) -> AbsForms when diff --git a/lib/wx/api_gen/gl_gen.erl b/lib/wx/api_gen/gl_gen.erl index 374e0bd12b..b665d949b3 100644 --- a/lib/wx/api_gen/gl_gen.erl +++ b/lib/wx/api_gen/gl_gen.erl @@ -44,7 +44,7 @@ devcode() -> spawn(fun() -> safe(fun gen_code/0,false) end). safe(What, QuitOnErr) -> try What(), - io:format("Completed succesfully~n~n", []), + io:format("Completed successfully~n~n", []), QuitOnErr andalso gen_util:halt(0) catch Err:Reason -> io:format("Error ~p: ~p:~p~n ~p~n", diff --git a/lib/wx/api_gen/wx_gen.erl b/lib/wx/api_gen/wx_gen.erl index 2f20c42a5d..b36653c570 100644 --- a/lib/wx/api_gen/wx_gen.erl +++ b/lib/wx/api_gen/wx_gen.erl @@ -38,7 +38,7 @@ devcode() -> erase(),safe(fun gen_code/0,false). safe(What, QuitOnErr) -> try What(), - io:format("Completed succesfully~n~n", []), + io:format("Completed successfully~n~n", []), QuitOnErr andalso gen_util:halt(0) catch Err:Reason -> io:format("Error in ~p ~p~n", [get(current_class),get(current_func)]), -- cgit v1.2.3 From 90fc4f687a9f28bd856abf30fc14480e130dfc8f Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 31 Aug 2011 15:13:16 +0200 Subject: Fix misspelling of erroneous --- lib/toolbar/src/toolbar_toolconfig.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/toolbar/src/toolbar_toolconfig.erl b/lib/toolbar/src/toolbar_toolconfig.erl index 7d8f2b4d21..693a7b4570 100644 --- a/lib/toolbar/src/toolbar_toolconfig.erl +++ b/lib/toolbar/src/toolbar_toolconfig.erl @@ -126,7 +126,7 @@ loop(S,Window) -> show_info(Window,Info), move_focus(Window,file); - %% Erronous version number -- Notify user + %% Erroneous version number -- Notify user {error,version} -> Win = Window#tfwindow.window, tool_utils:notify(Win,[FileName, @@ -136,7 +136,7 @@ loop(S,Window) -> _Error -> Win = Window#tfwindow.window, tool_utils:notify(Win,[FileName, - "File is on erronous format"]) + "File is in erroneous format"]) end; %% The file can not be read, show default values -- cgit v1.2.3 From d15f145c4b459bb7bf3e31dd66f7cd703d4c4fb8 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 31 Aug 2011 15:15:47 +0200 Subject: Fix misspelling of erroneous in xmerl_xsd --- lib/xmerl/src/xmerl_xsd.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/xmerl/src/xmerl_xsd.erl b/lib/xmerl/src/xmerl_xsd.erl index f003cc74ba..50c0a79016 100644 --- a/lib/xmerl/src/xmerl_xsd.erl +++ b/lib/xmerl/src/xmerl_xsd.erl @@ -742,7 +742,7 @@ element_content({IDC,S},El,Env) {{IDC,IDConstr},S3}; Err -> S3 = acc_errs(S2,{error_path(El,El#xmlElement.name),?MODULE, - {erronous_content_in_identity_constraint,IDC,Err}}), + {erroneous_content_in_identity_constraint,IDC,Err}}), {{IDC,[]},S3} end; element_content({selector,S},Sel,_Env) -> @@ -5571,7 +5571,7 @@ format_error({incomplete_file,_FileName,_Other}) -> "Schema: The file containing a schema state must be produced by xmerl_xsd:state2file/[1,2]."; format_error({unexpected_content_in_any,A}) -> io_lib:format("Schema: The any type is considered to have no content besides annotation. ~p was found.",[A]); -format_error({erronous_content_in_identity_constraint,IDC,Err}) -> +format_error({erroneous_content_in_identity_constraint,IDC,Err}) -> io_lib:format("Schema: An ~p identity constraint must have one selector and one or more field in content. This case ~p",[IDC,Err]); format_error({missing_xpath_attribute,IDCContent}) -> io_lib:format("Schema: A ~p in a identity constraint must have a xpath attribute.",[IDCContent]); -- cgit v1.2.3 From 044a09a57b2fe383062b35b6697c7406f8e8b4b6 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 31 Aug 2011 15:20:33 +0200 Subject: Fix misspelling of accidentally --- erts/doc/src/notes.xml | 2 +- lib/inets/doc/src/notes_history.xml | 2 +- lib/kernel/doc/src/notes.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 3733fb2db9..3e9e6a35f2 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -4534,7 +4534,7 @@ The race occurred when a process removed a table during termination simultaneously as another process removed the same table via ets:delete/1 and a third process - created a table that accidentaly got the same internal + created a table that accidentally got the same internal table index as the table being removed.

Own Id: OTP-7349

diff --git a/lib/inets/doc/src/notes_history.xml b/lib/inets/doc/src/notes_history.xml index 6480bad758..f70ce5cf46 100644 --- a/lib/inets/doc/src/notes_history.xml +++ b/lib/inets/doc/src/notes_history.xml @@ -123,7 +123,7 @@ re-receive of acknowledgments. If multiple copies of the same acknowledgments is received the spurious ones are silently ignored. This fix was intended for inets-4.7.14 - but accidentaly it was not included in that release.

+ but accidentally it was not included in that release.

Own Id: OTP-6706 Aux Id: OTP-6691

diff --git a/lib/kernel/doc/src/notes.xml b/lib/kernel/doc/src/notes.xml index e325443f6c..fc8360b3d1 100644 --- a/lib/kernel/doc/src/notes.xml +++ b/lib/kernel/doc/src/notes.xml @@ -2535,7 +2535,7 @@ badarg if a process is already registered. As it turns out there is no check in global if a process is registered under more than one name. If some process is - accidentaly or by design given several names, it is + accidentally or by design given several names, it is possible that the name registry becomes inconsistent due to the way the resolve function is called when name clashes are discovered (see register_name/3 in -- cgit v1.2.3 From dfbbdaab2744e55c0efc42cd4b1b7542a65b33f1 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 31 Aug 2011 15:23:51 +0200 Subject: Fix misspelling of exceed --- erts/emulator/test/driver_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erts/emulator/test/driver_SUITE.erl b/erts/emulator/test/driver_SUITE.erl index f6cf01ce16..a77ea4f3be 100644 --- a/erts/emulator/test/driver_SUITE.erl +++ b/erts/emulator/test/driver_SUITE.erl @@ -1590,7 +1590,7 @@ otp_6879(Config) when is_list(Config) -> end end, Procs), - %% Also try it when input exeeds default buffer (256 bytes) + %% Also try it when input exceeds default buffer (256 bytes) ?line Data = lists:seq(1, 1000), ?line case open_port({spawn, Drv}, []) of Port when is_port(Port) -> -- cgit v1.2.3 From 65c9f41425a1c5e09338de08ed41cd1704f8a920 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 31 Aug 2011 15:29:42 +0200 Subject: Fix misspelling of accommodate --- erts/emulator/test/distribution_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erts/emulator/test/distribution_SUITE.erl b/erts/emulator/test/distribution_SUITE.erl index 4bebae51cc..e4af5c00a6 100644 --- a/erts/emulator/test/distribution_SUITE.erl +++ b/erts/emulator/test/distribution_SUITE.erl @@ -173,7 +173,7 @@ bulk_sendsend(Terms, BinSize) -> Ratio = if MonitorCount2 == 0 -> MonitorCount1 / 1.0; true -> MonitorCount1 / MonitorCount2 end, - %% A somewhat arbitrary ratio, but hopefully one that will accomodate + %% A somewhat arbitrary ratio, but hopefully one that will accommodate %% a wide range of CPU speeds. true = (Ratio > 8.0), {comment, -- cgit v1.2.3 From 2f696e43d2d3fbcc60d92311d1175dc869c34688 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 31 Aug 2011 15:41:10 +0200 Subject: Fix misspelling of compatibility --- erts/aclocal.m4 | 2 +- erts/include/internal/ethread_header_config.h.in | 2 +- lib/common_test/doc/src/ct_hooks.xml | 2 +- lib/common_test/src/ct_framework.erl | 2 +- lib/diameter/make/rules.mk.in | 4 ++-- lib/inets/doc/src/http_server.xml | 2 +- lib/stdlib/src/dets_v8.erl | 2 +- lib/test_server/src/test_server_ctrl.erl | 4 ++-- lib/test_server/src/ts.config | 2 +- lib/tools/emacs/erlang.el | 2 +- make/otp.mk.in | 4 ++-- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/erts/aclocal.m4 b/erts/aclocal.m4 index b64380e817..2bceb31983 100644 --- a/erts/aclocal.m4 +++ b/erts/aclocal.m4 @@ -1298,7 +1298,7 @@ int main(void) esac test $enable_ethread_pre_pentium4_compatibility = yes && - AC_DEFINE(ETHR_PRE_PENTIUM4_COMPAT, 1, [Define if you want compatibilty with x86 processors before pentium4.]) + AC_DEFINE(ETHR_PRE_PENTIUM4_COMPAT, 1, [Define if you want compatibility with x86 processors before pentium4.]) AC_DEFINE(ETHR_HAVE_ETHREAD_DEFINES, 1, \ [Define if you have all ethread defines]) diff --git a/erts/include/internal/ethread_header_config.h.in b/erts/include/internal/ethread_header_config.h.in index f394d790d2..1fb630cb78 100644 --- a/erts/include/internal/ethread_header_config.h.in +++ b/erts/include/internal/ethread_header_config.h.in @@ -90,7 +90,7 @@ /* Define if sched_yield() returns an int. */ #undef ETHR_SCHED_YIELD_RET_INT -/* Define if you want compatibilty with x86 processors before pentium4. */ +/* Define if you want compatibility with x86 processors before pentium4. */ #undef ETHR_PRE_PENTIUM4_COMPAT /* Define if you have the pthread_rwlockattr_setkind_np() function. */ diff --git a/lib/common_test/doc/src/ct_hooks.xml b/lib/common_test/doc/src/ct_hooks.xml index 0ece3199bb..f9fc1858d0 100644 --- a/lib/common_test/doc/src/ct_hooks.xml +++ b/lib/common_test/doc/src/ct_hooks.xml @@ -302,7 +302,7 @@

Note that it is not possible to add CTH's here right now, that feature might be added later, - but it would right now break backwards compatability.

+ but it would right now break backwards compatibility.

diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl index 9e597edf38..2ebc6c311a 100644 --- a/lib/common_test/src/ct_framework.erl +++ b/lib/common_test/src/ct_framework.erl @@ -437,7 +437,7 @@ try_set_default(Name,Key,Info,Where) -> %%% @doc Test server framework callback, called by the test_server %%% when a test case is finished. end_tc(Mod, Fun, Args) -> - %% Have to keep end_tc/3 for backwards compatabilty issues + %% Have to keep end_tc/3 for backwards compatibility issues end_tc(Mod, Fun, Args, '$end_tc_dummy'). end_tc(?MODULE,error_in_suite,_, _) -> % bad start! ok; diff --git a/lib/diameter/make/rules.mk.in b/lib/diameter/make/rules.mk.in index 4a1a55b8d3..6318f2bc9c 100644 --- a/lib/diameter/make/rules.mk.in +++ b/lib/diameter/make/rules.mk.in @@ -164,7 +164,7 @@ $(MAN3DIR)/%.3:: %.xml date=`date +"%B %e %Y"`; \ xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< -# left for compatability +# left for compatibility $(MAN4DIR)/%.4:: %.xml date=`date +"%B %e %Y"`; \ xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< @@ -173,7 +173,7 @@ $(MAN4DIR)/%.5:: %.xml date=`date +"%B %e %Y"`; \ xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< -# left for compatability +# left for compatibility $(MAN6DIR)/%.6:: %_app.xml date=`date +"%B %e %Y"`; \ xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< diff --git a/lib/inets/doc/src/http_server.xml b/lib/inets/doc/src/http_server.xml index 599a939913..f29b505bc7 100644 --- a/lib/inets/doc/src/http_server.xml +++ b/lib/inets/doc/src/http_server.xml @@ -406,7 +406,7 @@ http://your.server.org/***/Module[:/]Function(?QueryString|/PathInfo) phase instead of first generating the whole web page and then sending it to the client. The option to implement a function with arity two is only kept for - backwardcompatibilty reasons. + backwards compatibility reasons. See mod_esi(3) for implementation details of the esi callback function.

diff --git a/lib/stdlib/src/dets_v8.erl b/lib/stdlib/src/dets_v8.erl index af36958c1c..299b037c28 100644 --- a/lib/stdlib/src/dets_v8.erl +++ b/lib/stdlib/src/dets_v8.erl @@ -163,7 +163,7 @@ %% The 8(c) version uses a different hashing algorithm, erlang:phash %% (former versions use erlang:hash). %% Version 8(b) files are only converted to version 8(c) if repair is -%% done, so we need compatability with 8(b) for a _long_ time. +%% done, so we need compatibility with 8(b) for a _long_ time. %% %% There are known bugs due to the fact that keys and objects are %% sometimes compared (==) and sometimes matched (=:=). The version diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl index de9b962dfc..f3445b742b 100644 --- a/lib/test_server/src/test_server_ctrl.erl +++ b/lib/test_server/src/test_server_ctrl.erl @@ -4674,13 +4674,13 @@ collect_subcases(Mod, Case, MFA, St, Suite) -> [] when Case == all -> {ok,[],St}; [] when element(1, Case) == conf -> {ok,[],St}; [] -> {ok,[MFA],St}; -%%%! --- START Kept for backwards compatibilty --- +%%%! --- START Kept for backwards compatibility --- %%%! Requirements are not used {req,ReqList} -> collect_case_deny(Mod, Case, MFA, ReqList, [], St); {req,ReqList,SubCases} -> collect_case_deny(Mod, Case, MFA, ReqList, SubCases, St); -%%%! --- END Kept for backwards compatibilty --- +%%%! --- END Kept for backwards compatibility --- {Skip,Reason} when Skip==skip; Skip==skipped -> {ok,[{skip_case,{MFA,Reason}}],St}; {error,Reason} -> diff --git a/lib/test_server/src/ts.config b/lib/test_server/src/ts.config index f021f5958b..cf3d269616 100644 --- a/lib/test_server/src/ts.config +++ b/lib/test_server/src/ts.config @@ -12,7 +12,7 @@ % "10.10.0.1", %IP string % {10,10,0,1}, %IP tuple % ["my_ip4_host"], %Any aliases -% "::ffff:10.10.0.1", %IPv6 string (compatibilty addr) +% "::ffff:10.10.0.1", %IPv6 string (compatibility addr) % {0,0,0,0,0,65535,2570,1} %IPv6 tuple % }}. diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el index a8dd3ec3ac..bc7a190fb4 100644 --- a/lib/tools/emacs/erlang.el +++ b/lib/tools/emacs/erlang.el @@ -1225,7 +1225,7 @@ Lock syntax table. The effect is that `apply' in the atom `( (char-after (1- (or ,pos (point))))))) ;; defvar some obsolete variables, which we still support for -;; backwardscompatibility reasons. +;; backwards compatibility reasons. (eval-when-compile (defvar comment-indent-hook) (defvar dabbrev-case-fold-search) diff --git a/make/otp.mk.in b/make/otp.mk.in index 1ba74a3048..4dd309b6ec 100644 --- a/make/otp.mk.in +++ b/make/otp.mk.in @@ -269,7 +269,7 @@ $(MAN3DIR)/%.3: %.xml xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< endif -# left for compatability +# left for compatibility $(MAN4DIR)/%.4: %.xml date=`date +"%B %e %Y"`; \ xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< @@ -278,7 +278,7 @@ $(MAN4DIR)/%.5: %.xml date=`date +"%B %e %Y"`; \ xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< -# left for compatability +# left for compatibility $(MAN6DIR)/%.6: %_app.xml date=`date +"%B %e %Y"`; \ xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/docbuilder_dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< -- cgit v1.2.3 From 41683d2b8d0cacadc5f66643568e02949b746586 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 31 Aug 2011 15:41:53 +0200 Subject: Fix misspelling of compatibility in ssl_basic_SUITE --- lib/ssl/test/ssl_basic_SUITE.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl index 37a021e7cf..8da1d947d3 100644 --- a/lib/ssl/test/ssl_basic_SUITE.erl +++ b/lib/ssl/test/ssl_basic_SUITE.erl @@ -253,7 +253,7 @@ all() -> unknown_server_ca_fail, der_input, unknown_server_ca_accept_verify_none, unknown_server_ca_accept_verify_peer, - unknown_server_ca_accept_backwardscompatibilty, + unknown_server_ca_accept_backwardscompatibility, %%different_ca_peer_sign, no_reuses_session_server_restart_new_cert, no_reuses_session_server_restart_new_cert_file, reuseaddr, @@ -3282,11 +3282,11 @@ unknown_server_ca_accept_verify_peer(Config) when is_list(Config) -> ssl_test_lib:close(Client). %%-------------------------------------------------------------------- -unknown_server_ca_accept_backwardscompatibilty(doc) -> +unknown_server_ca_accept_backwardscompatibility(doc) -> ["Test that old style verify_funs will work"]; -unknown_server_ca_accept_backwardscompatibilty(suite) -> +unknown_server_ca_accept_backwardscompatibility(suite) -> []; -unknown_server_ca_accept_backwardscompatibilty(Config) when is_list(Config) -> +unknown_server_ca_accept_backwardscompatibility(Config) when is_list(Config) -> ClientOpts = ?config(client_opts, Config), ServerOpts = ?config(server_opts, Config), {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config), -- cgit v1.2.3 From 411edcef850f1db74260902bbb55724b35b3a505 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 31 Aug 2011 15:54:47 +0200 Subject: Fix misspelling of kept --- lib/inets/src/http_client/httpc_cookie.erl | 2 +- lib/inets/src/http_client/httpc_handler.erl | 2 +- lib/inets/src/http_server/httpd_conf.erl | 2 +- lib/inets/src/http_server/httpd_esi.erl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/inets/src/http_client/httpc_cookie.erl b/lib/inets/src/http_client/httpc_cookie.erl index 4d61f82b5a..d1f46c0b0b 100644 --- a/lib/inets/src/http_client/httpc_cookie.erl +++ b/lib/inets/src/http_client/httpc_cookie.erl @@ -404,7 +404,7 @@ path_default(#http_cookie{path = undefined} = Cookie, DefaultPath) -> path_default(Cookie, _) -> Cookie. -%% Note: if the path is only / that / will be keept +%% Note: if the path is only / that / will be kept skip_right_most_slash("/") -> "/"; skip_right_most_slash(Str) -> diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl index 9ac9ee6f7b..587e24cc8d 100644 --- a/lib/inets/src/http_client/httpc_handler.erl +++ b/lib/inets/src/http_client/httpc_handler.erl @@ -1157,7 +1157,7 @@ handle_cookies(Headers, Request, #options{cookies = enabled}, ProfileName) -> httpc_manager:store_cookies(Cookies, Request#request.address, ProfileName). -%% This request could not be pipelined or used as sequential keept alive +%% This request could not be pipelined or used as sequential keep alive %% queue handle_queue(#state{status = close} = State, _) -> {stop, normal, State}; diff --git a/lib/inets/src/http_server/httpd_conf.erl b/lib/inets/src/http_server/httpd_conf.erl index f4d8a6c09f..8727224b75 100644 --- a/lib/inets/src/http_server/httpd_conf.erl +++ b/lib/inets/src/http_server/httpd_conf.erl @@ -305,7 +305,7 @@ load("MaxKeepAliveRequests " ++ MaxRequests, []) -> " is an invalid MaxKeepAliveRequests")} end; -%% This clause is keept for backwards compability +%% This clause is kept for backwards compability load("MaxKeepAliveRequest " ++ MaxRequests, []) -> case make_integer(MaxRequests) of {ok, Integer} -> diff --git a/lib/inets/src/http_server/httpd_esi.erl b/lib/inets/src/http_server/httpd_esi.erl index 026ec9a5fe..aac5645282 100644 --- a/lib/inets/src/http_server/httpd_esi.erl +++ b/lib/inets/src/http_server/httpd_esi.erl @@ -39,7 +39,7 @@ %% body part. Note that it is presumed that starts with a %% string including "\r\n\r\n" if there is any header information %% present. The returned headers will not contain the HTTP header body -%% delimiter \r\n. (All header, header delimiters are keept.) +%% delimiter \r\n. (All header, header delimiters are kept.) %% Ex: ["Content-Type : text/html\r\n Connection : closing \r\n\r\n" | %% io_list()] --> {"Content-Type : text/html\r\n Connection : closing \r\n", %% io_list()} -- cgit v1.2.3 From c59dc075b6306e38d7b4bd52d29cfd4d144756cb Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Wed, 31 Aug 2011 16:08:27 +0200 Subject: Fix more misspellings of compatibility --- erts/emulator/beam/erl_bif_trace.c | 2 +- lib/hipe/rtl/hipe_rtl_lcm.erl | 2 +- lib/inets/src/http_server/httpd_conf.erl | 2 +- lib/inets/src/http_server/mod_auth_mnesia.erl | 2 +- lib/ssl/src/ssl.erl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/erts/emulator/beam/erl_bif_trace.c b/erts/emulator/beam/erl_bif_trace.c index 0509e51a6f..fbd8757751 100644 --- a/erts/emulator/beam/erl_bif_trace.c +++ b/erts/emulator/beam/erl_bif_trace.c @@ -679,7 +679,7 @@ trace_3(Process* p, Eterm pid_spec, Eterm how, Eterm list) } else if (tracer != NIL) { tracee_port->tracer_proc = tracer; } - /* matches are not counted for ports since it would violate compability */ + /* matches are not counted for ports since it would violate compatibility */ /* This could be a reason to modify this function or make a new one. */ } } diff --git a/lib/hipe/rtl/hipe_rtl_lcm.erl b/lib/hipe/rtl/hipe_rtl_lcm.erl index 5d65389d48..d45ab4ed46 100644 --- a/lib/hipe/rtl/hipe_rtl_lcm.erl +++ b/lib/hipe/rtl/hipe_rtl_lcm.erl @@ -269,7 +269,7 @@ insert_expr_last(CFG0, Label, Instr) -> %% is a branch operation). insert_expr_last_work(_, Instr, []) -> %% This case should not happen since this means that block was completely - %% empty when the function was called. For compability we insert it last. + %% empty when the function was called. For compatibility we insert it last. [Instr]; insert_expr_last_work(_, Instr, [Code1]) -> %% We insert the code next to last. diff --git a/lib/inets/src/http_server/httpd_conf.erl b/lib/inets/src/http_server/httpd_conf.erl index 8727224b75..d1b1ea0e14 100644 --- a/lib/inets/src/http_server/httpd_conf.erl +++ b/lib/inets/src/http_server/httpd_conf.erl @@ -305,7 +305,7 @@ load("MaxKeepAliveRequests " ++ MaxRequests, []) -> " is an invalid MaxKeepAliveRequests")} end; -%% This clause is kept for backwards compability +%% This clause is kept for backwards compatibility load("MaxKeepAliveRequest " ++ MaxRequests, []) -> case make_integer(MaxRequests) of {ok, Integer} -> diff --git a/lib/inets/src/http_server/mod_auth_mnesia.erl b/lib/inets/src/http_server/mod_auth_mnesia.erl index ffe028617b..b7b9520649 100644 --- a/lib/inets/src/http_server/mod_auth_mnesia.erl +++ b/lib/inets/src/http_server/mod_auth_mnesia.erl @@ -55,7 +55,7 @@ store_directory_data(_Directory, _DirData, _Server_root) -> %% API %% -%% Compability API +%% Compatibility API store_user(UserName, Password, Port, Dir, _AccessPassword) -> %% AccessPassword is ignored - was not used in previous version diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index 59f8479a4c..d1ec0c141e 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -1007,7 +1007,7 @@ version() -> %% Only used to remove exit messages from old ssl %% First is a nonsense clause to provide some -%% backward compability for orber that uses this +%% backward compatibility for orber that uses this %% function in a none recommended way, but will %% work correctly if a valid pid is returned. pid(#sslsocket{fd = new_ssl}) -> -- cgit v1.2.3 From 067b7a98111f22eeff11e4b2e75af11da0b09f8e Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Fri, 16 Sep 2011 16:22:38 +0200 Subject: Fix typos in erts/preloaded/src --- erts/preloaded/src/erl_prim_loader.erl | 4 ++-- erts/preloaded/src/init.erl | 2 +- erts/preloaded/src/prim_file.erl | 4 ++-- erts/preloaded/src/prim_zip.erl | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/erts/preloaded/src/erl_prim_loader.erl b/erts/preloaded/src/erl_prim_loader.erl index ccfa7978c8..4a72bae105 100644 --- a/erts/preloaded/src/erl_prim_loader.erl +++ b/erts/preloaded/src/erl_prim_loader.erl @@ -396,7 +396,7 @@ handle_timeout(State = #state{loader = inet}, Parent) -> inet_timeout_handler(State, Parent). %%% -------------------------------------------------------- -%%% Functions which handles efile as prim_loader (default). +%%% Functions which handle efile as prim_loader (default). %%% -------------------------------------------------------- %%% Reading many files in parallel is an optimization. @@ -523,7 +523,7 @@ efile_timeout_handler(#state{n_timeouts = N} = State, _Parent) -> end. %%% -------------------------------------------------------- -%%% Functions which handles inet prim_loader +%%% Functions which handle inet prim_loader %%% -------------------------------------------------------- %% diff --git a/erts/preloaded/src/init.erl b/erts/preloaded/src/init.erl index e52c813029..c9c434dea0 100644 --- a/erts/preloaded/src/init.erl +++ b/erts/preloaded/src/init.erl @@ -345,7 +345,7 @@ notify(Pids) -> lists:foreach(fun(Pid) -> Pid ! {init,started} end, Pids). %% Garbage collect all info about initially loaded modules. -%% This information is temporary stored until the code_server +%% This information is temporarily stored until the code_server %% is started. %% We force the garbage collection as the init process holds %% this information during the initialisation of the system and diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl index ac2797ec03..fd2d4a1530 100644 --- a/erts/preloaded/src/prim_file.erl +++ b/erts/preloaded/src/prim_file.erl @@ -374,7 +374,7 @@ read(#file_descriptor{module = ?MODULE, data = {Port, _}}, Size) {ok, Data}; {error, enomem} -> %% Garbage collecting here might help if - %% the current processes has some old binaries left. + %% the current processes have some old binaries left. erlang:garbage_collect(), case drv_command(Port, <>) of {ok, {0, _Data}} when Size =/= 0 -> @@ -940,7 +940,7 @@ drv_get_response(Port) -> -%% Converts a list of mode atoms into an mode word for the driver. +%% Converts a list of mode atoms into a mode word for the driver. %% Returns {Mode, Portopts, Setopts} where Portopts is a list of %% options for erlang:open_port/2 and Setopts is a list of %% setopt commands to send to the port, or error Reason upon failure. diff --git a/erts/preloaded/src/prim_zip.erl b/erts/preloaded/src/prim_zip.erl index 6a9856fdad..5dc8e3ca13 100644 --- a/erts/preloaded/src/prim_zip.erl +++ b/erts/preloaded/src/prim_zip.erl @@ -21,7 +21,7 @@ -module(prim_zip). -%% unzipping piecemal +%% unzipping piecemeal -export([ open/1, open/3, -- cgit v1.2.3 From 85b7372843cd20cb8d0733ffa2c7b2e0d3934912 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Fri, 16 Sep 2011 16:23:08 +0200 Subject: Fix misspelling of intermediate --- erts/doc/src/alt_dist.xml | 2 +- lib/kernel/examples/uds_dist/c_src/uds_drv.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erts/doc/src/alt_dist.xml b/erts/doc/src/alt_dist.xml index 36d83a685b..c30e04fce7 100644 --- a/erts/doc/src/alt_dist.xml +++ b/erts/doc/src/alt_dist.xml @@ -377,7 +377,7 @@ ( 1) typedef enum { ( 2) portTypeUnknown, /* An uninitialized port */ ( 3) portTypeListener, /* A listening port/socket */ -( 4) portTypeAcceptor, /* An intermidiate stage when accepting +( 4) portTypeAcceptor, /* An intermediate stage when accepting ( 5) on a listen port */ ( 6) portTypeConnector, /* An intermediate stage when connecting */ ( 7) portTypeCommand, /* A connected open port in command mode */ diff --git a/lib/kernel/examples/uds_dist/c_src/uds_drv.c b/lib/kernel/examples/uds_dist/c_src/uds_drv.c index a4bcd81240..9327ab19dc 100644 --- a/lib/kernel/examples/uds_dist/c_src/uds_drv.c +++ b/lib/kernel/examples/uds_dist/c_src/uds_drv.c @@ -111,7 +111,7 @@ do { \ typedef enum { portTypeUnknown, /* An uninitialized port */ portTypeListener, /* A listening port/socket */ - portTypeAcceptor, /* An intermidiate stage when accepting + portTypeAcceptor, /* An intermediate stage when accepting on a listen port */ portTypeConnector, /* An intermediate stage when connecting */ portTypeCommand, /* A connected open port in command mode */ @@ -401,7 +401,7 @@ static void uds_finish(void) /* ** Protocol to control: ** 'C': Set port in command mode. -** 'I': Set port in intermidiate mode +** 'I': Set port in intermediate mode ** 'D': Set port in data mode ** 'N': Get identification number for listen port ** 'S': Get statistics -- cgit v1.2.3