diff options
author | Henrik Nord <[email protected]> | 2012-07-18 11:26:09 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-07-18 11:26:09 +0200 |
commit | 9b13eaca6cf8a72b95a74a882dd6cb13a8aa2390 (patch) | |
tree | ef6344901bc1f7c505eab25c3f85840b6229beba /lib/kernel/src | |
parent | 0ccc6e476e261b5057ed8d74204c6b52cbdd2605 (diff) | |
parent | 95bf75bc27c07bc6a5054fb762cd07335d64b642 (diff) | |
download | otp-9b13eaca6cf8a72b95a74a882dd6cb13a8aa2390.tar.gz otp-9b13eaca6cf8a72b95a74a882dd6cb13a8aa2390.tar.bz2 otp-9b13eaca6cf8a72b95a74a882dd6cb13a8aa2390.zip |
Merge branch 'maint'
Conflicts:
erts/preloaded/ebin/erl_prim_loader.beam
lib/kernel/src/code.erl
Diffstat (limited to 'lib/kernel/src')
-rw-r--r-- | lib/kernel/src/code.erl | 11 | ||||
-rw-r--r-- | lib/kernel/src/code_server.erl | 4 | ||||
-rw-r--r-- | lib/kernel/src/rpc.erl | 2 |
3 files changed, 10 insertions, 7 deletions
diff --git a/lib/kernel/src/code.erl b/lib/kernel/src/code.erl index a9259817ea..c808ac7cb7 100644 --- a/lib/kernel/src/code.erl +++ b/lib/kernel/src/code.erl @@ -63,7 +63,7 @@ which/1, where_is_file/1, where_is_file/2, - set_primary_archive/3, + set_primary_archive/4, clash/0]). -export_type([load_error_rsn/0, load_ret/0]). @@ -474,13 +474,16 @@ where_is_file(Path, File) when is_list(Path), is_list(File) -> -spec set_primary_archive(ArchiveFile :: file:filename(), ArchiveBin :: binary(), - FileInfo :: file:file_info()) + FileInfo :: file:file_info(), + ParserFun :: fun()) -> 'ok' | {'error', atom()}. -set_primary_archive(ArchiveFile0, ArchiveBin, #file_info{} = FileInfo) +set_primary_archive(ArchiveFile0, ArchiveBin, #file_info{} = FileInfo, + ParserFun) when is_list(ArchiveFile0), is_binary(ArchiveBin) -> ArchiveFile = filename:absname(ArchiveFile0), - case call({set_primary_archive, ArchiveFile, ArchiveBin, FileInfo}) of + case call({set_primary_archive, ArchiveFile, ArchiveBin, FileInfo, + ParserFun}) of {ok, []} -> ok; {ok, _Mode, Ebins} -> diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl index a2db7c9790..00ad923466 100644 --- a/lib/kernel/src/code_server.erl +++ b/lib/kernel/src/code_server.erl @@ -394,8 +394,8 @@ handle_call(stop,{_From,_Tag}, S) -> handle_call({is_cached,_File}, {_From,_Tag}, S=#state{cache=no_cache}) -> {reply, no, S}; -handle_call({set_primary_archive, File, ArchiveBin, FileInfo}, {_From,_Tag}, S=#state{mode=Mode}) -> - case erl_prim_loader:set_primary_archive(File, ArchiveBin, FileInfo) of +handle_call({set_primary_archive, File, ArchiveBin, FileInfo, ParserFun}, {_From,_Tag}, S=#state{mode=Mode}) -> + case erl_prim_loader:set_primary_archive(File, ArchiveBin, FileInfo, ParserFun) of {ok, Files} -> {reply, {ok, Mode, Files}, S}; {error, _Reason} = Error -> diff --git a/lib/kernel/src/rpc.erl b/lib/kernel/src/rpc.erl index e214ffa404..a3fc57a124 100644 --- a/lib/kernel/src/rpc.erl +++ b/lib/kernel/src/rpc.erl @@ -286,7 +286,7 @@ call(N,M,F,A) -> Reason :: term(), Timeout :: timeout(). -call(N,M,F,A,_Timeout) when node() =:= N -> %% Optimize local call +call(N,M,F,A,infinity) when node() =:= N -> %% Optimize local call local_call(M,F,A); call(N,M,F,A,infinity) -> do_call(N, {call,M,F,A,group_leader()}, infinity); |