diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-02-07 19:19:27 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2012-03-22 18:16:13 +0100 |
commit | 0fd4e39abeea3fc87b78eec8495109f9245b5ac8 (patch) | |
tree | e4e8de912a44e58d0f5e1d108ce3e8d9ed822558 /erts/preloaded/src/prim_file.erl | |
parent | ad6387b0242caa2b3c64d62a133752e10546211b (diff) | |
download | otp-0fd4e39abeea3fc87b78eec8495109f9245b5ac8.tar.gz otp-0fd4e39abeea3fc87b78eec8495109f9245b5ac8.tar.bz2 otp-0fd4e39abeea3fc87b78eec8495109f9245b5ac8.zip |
Update dtrace for changes in R15
Diffstat (limited to 'erts/preloaded/src/prim_file.erl')
-rw-r--r-- | erts/preloaded/src/prim_file.erl | 22 |
1 files changed, 9 insertions, 13 deletions
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]. |