diff options
author | Björn-Egil Dahlberg <[email protected]> | 2011-05-09 15:34:42 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2011-05-09 15:34:42 +0200 |
commit | e3af9123e7ef9291535cafbd0ecb9d3309d674f7 (patch) | |
tree | 685dc9c8564e7613aa594a7e3ad5a43250873754 | |
parent | b20244d0f730a950749919245eec3abd42b44cc5 (diff) | |
parent | c159e558ee9724eb160f9047c34ffc2a6a9d0da7 (diff) | |
download | otp-e3af9123e7ef9291535cafbd0ecb9d3309d674f7.tar.gz otp-e3af9123e7ef9291535cafbd0ecb9d3309d674f7.tar.bz2 otp-e3af9123e7ef9291535cafbd0ecb9d3309d674f7.zip |
Merge branch 'egil/file-write/OTP-9276' into dev
* egil/file-write/OTP-9276:
Update prim_file.beam
Remove unnecessary copy in prim_file:drv_command/3
-rw-r--r-- | erts/preloaded/ebin/prim_file.beam | bin | 31588 -> 31528 bytes | |||
-rw-r--r-- | erts/preloaded/src/prim_file.erl | 6 |
2 files changed, 3 insertions, 3 deletions
diff --git a/erts/preloaded/ebin/prim_file.beam b/erts/preloaded/ebin/prim_file.beam Binary files differindex c2ae01d0d5..bfb1e48365 100644 --- a/erts/preloaded/ebin/prim_file.beam +++ b/erts/preloaded/ebin/prim_file.beam diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl index fb0aef8947..13e8e8fb5b 100644 --- a/erts/preloaded/src/prim_file.erl +++ b/erts/preloaded/src/prim_file.erl @@ -864,9 +864,9 @@ drv_command(Port, Command) -> drv_command(Port, Command, R) when is_binary(Command) -> drv_command(Port, Command, true, R); drv_command(Port, Command, R) -> - try erlang:iolist_to_binary(Command) of - Bin -> - drv_command(Port, Bin, true, R) + try erlang:iolist_size(Command) of + _ -> + drv_command(Port, Command, true, R) catch error:Reason -> {error, Reason} |