aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded
diff options
context:
space:
mode:
Diffstat (limited to 'erts/preloaded')
-rw-r--r--erts/preloaded/ebin/prim_file.beambin46840 -> 46736 bytes
-rw-r--r--erts/preloaded/src/prim_file.erl22
2 files changed, 9 insertions, 13 deletions
diff --git a/erts/preloaded/ebin/prim_file.beam b/erts/preloaded/ebin/prim_file.beam
index 9d6c47ffc1..6778fe353c 100644
--- a/erts/preloaded/ebin/prim_file.beam
+++ b/erts/preloaded/ebin/prim_file.beam
Binary files differ
diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl
index 5c9cad3a2c..46ce3ab1a4 100644
--- a/erts/preloaded/src/prim_file.erl
+++ b/erts/preloaded/src/prim_file.erl
@@ -1493,19 +1493,15 @@ to_seconds({_,_} = Datetime, universal) ->
to_seconds({_,_} = Datetime, local) ->
erlang:universaltime_to_posixtime(erlang:localtime_to_universaltime(Datetime)).
-%% TODO: Duplicate code!
get_dtrace_utag() ->
- case get(dtrace_utag) of
- X when is_list(X) ->
- X;
- _ ->
- ""
+ %% We cannot call dtrace:get_utag() because this is prim_file.erl.
+ %% We must reimplement it here.
+ case get('_dtrace_utag_@_@') of
+ undefined ->
+ <<>>;
+ X ->
+ X
end.
-%% TODO: Measure if it's worth checking (re:run()?) for NUL byte first?
-enc_utag([0|Cs]) ->
- enc_utag(Cs);
-enc_utag([C|Cs]) ->
- [C|enc_utag(Cs)];
-enc_utag([]) ->
- [0].
+enc_utag(UTag) ->
+ [UTag, 0].