aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2011-05-09 15:34:42 +0200
committerBjörn-Egil Dahlberg <[email protected]>2011-05-09 15:34:42 +0200
commite3af9123e7ef9291535cafbd0ecb9d3309d674f7 (patch)
tree685dc9c8564e7613aa594a7e3ad5a43250873754 /erts
parentb20244d0f730a950749919245eec3abd42b44cc5 (diff)
parentc159e558ee9724eb160f9047c34ffc2a6a9d0da7 (diff)
downloadotp-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
Diffstat (limited to 'erts')
-rw-r--r--erts/preloaded/ebin/prim_file.beambin31588 -> 31528 bytes
-rw-r--r--erts/preloaded/src/prim_file.erl6
2 files changed, 3 insertions, 3 deletions
diff --git a/erts/preloaded/ebin/prim_file.beam b/erts/preloaded/ebin/prim_file.beam
index c2ae01d0d5..bfb1e48365 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 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}