aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-11-29 11:05:37 +0100
committerLukas Larsson <[email protected]>2011-12-02 10:39:38 +0100
commit1bbf8cee44b8836d66d289cc0b5b314ed83de821 (patch)
tree6d7ab44fd0d11c33f885816ddb12dfbc785f4540 /erts/preloaded/src
parent27faa34693f35b6aa41fa67cbfe365bd082a5757 (diff)
downloadotp-1bbf8cee44b8836d66d289cc0b5b314ed83de821.tar.gz
otp-1bbf8cee44b8836d66d289cc0b5b314ed83de821.tar.bz2
otp-1bbf8cee44b8836d66d289cc0b5b314ed83de821.zip
Remove header/trailer support
Since the API for headers/trailers seem to be very awkward to work with when using non-blocking io the feature is dropped for now. See unix_efile.c for more details.
Diffstat (limited to 'erts/preloaded/src')
-rw-r--r--erts/preloaded/src/prim_file.erl13
1 files changed, 4 insertions, 9 deletions
diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl
index 6f35162feb..7316e0be99 100644
--- a/erts/preloaded/src/prim_file.erl
+++ b/erts/preloaded/src/prim_file.erl
@@ -545,7 +545,7 @@ write_file(_, _) ->
%sendfile(_,_,_,_,_,_,_,_,_,_) ->
% {error, enotsup};
sendfile(#file_descriptor{module = ?MODULE, data = {Port, _}},
- Dest, Offset, Bytes, _ChunkSize, _Headers, _Trailers,
+ Dest, Offset, Bytes, _ChunkSize, Headers, Trailers,
_Nodiskio, _MNowait, _Sync) ->
case erlang:port_get_data(Dest) of
Data when Data == inet_tcp; Data == inet6_tcp ->
@@ -555,8 +555,9 @@ sendfile(#file_descriptor{module = ?MODULE, data = {Port, _}},
0:8,
Offset:64/unsigned,
Bytes:64/unsigned,
- 0:32/unsigned,
- 0:32/unsigned>>])
+ (iolist_size(Headers)):32/unsigned,
+ (iolist_size(Trailers)):32/unsigned>>,
+ Headers,Trailers])
after
ok = inet:lock_socket(Dest,false)
end;
@@ -564,12 +565,6 @@ sendfile(#file_descriptor{module = ?MODULE, data = {Port, _}},
{error,badarg}
end.
-get_bit(true) ->
- 1;
-get_bit(false) ->
- 0.
-
-
%%%-----------------------------------------------------------------
%%% Functions operating on files without handle to the file. ?DRV.