summaryrefslogtreecommitdiff
path: root/erts/preloaded/src/init.erl
diff options
context:
space:
mode:
Diffstat (limited to 'erts/preloaded/src/init.erl')
-rw-r--r--erts/preloaded/src/init.erl13
1 files changed, 12 insertions, 1 deletions
diff --git a/erts/preloaded/src/init.erl b/erts/preloaded/src/init.erl
index 784696e834..5ea349511d 100644
--- a/erts/preloaded/src/init.erl
+++ b/erts/preloaded/src/init.erl
@@ -591,7 +591,7 @@ set_flag(_Flag,false,Flags) ->
{ok,Flags};
set_flag(Flag,Value,Flags) when is_list(Value) ->
%% The flag here can be -boot or -config, which means the value is
- %% a file name! Thus the file name encoding is used when coverting.
+ %% a file name! Thus the file name encoding is used when converting.
Encoding = file:native_name_encoding(),
case catch unicode:characters_to_binary(Value,Encoding,Encoding) of
{'EXIT',_} ->
@@ -889,6 +889,7 @@ do_boot(Flags,Start) ->
do_boot(Init,Flags,Start) ->
process_flag(trap_exit,true),
Root = get_root(Flags),
+ true = check_bindir(Flags),
Path = get_flag_list(path, Flags, false),
{Pa,Pz} = PathFls = path_flags(Flags),
start_prim_loader(Init, bs2ss(Path), PathFls),
@@ -923,6 +924,14 @@ get_root(Flags) ->
exit(no_or_multiple_root_variables)
end.
+check_bindir(Flags) ->
+ case get_argument(bindir, Flags) of
+ {ok,[[_Bindir]]} ->
+ true;
+ _ ->
+ exit(no_or_multiple_bindir_variables)
+ end.
+
get_boot_vars(Root, Flags) ->
BootVars = get_boot_vars_1(#{}, Flags),
RootKey = <<"ROOT">>,
@@ -1552,6 +1561,8 @@ collect_mfas([MFA|MFAs],Info) ->
collect_mfas(MFAs,Info);
{call_time, false} ->
collect_mfas(MFAs,Info);
+ {call_time, undefined} ->
+ collect_mfas(MFAs,Info);
{call_time, Data} ->
case collect_mfa(MFA,Data,0,0) of
{{0,_},_} ->