diff options
author | Hans Bolinder <[email protected]> | 2019-06-12 10:46:01 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2019-08-20 09:33:26 +0200 |
commit | 5e59a04c56efb9e824c1c357930f046408239157 (patch) | |
tree | c00f671917b42598eef0c187b870c2fd028cd22b /lib | |
parent | 227a93f6d1b5e856a7b880257c2e1c08f396e19f (diff) | |
download | otp-5e59a04c56efb9e824c1c357930f046408239157.tar.gz otp-5e59a04c56efb9e824c1c357930f046408239157.tar.bz2 otp-5e59a04c56efb9e824c1c357930f046408239157.zip |
kernel: Update old format I/O-requests
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel/src/file.erl | 6 | ||||
-rw-r--r-- | lib/kernel/test/file_SUITE.erl | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl index a0616da670..853fa26871 100644 --- a/lib/kernel/src/file.erl +++ b/lib/kernel/src/file.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2018. All Rights Reserved. +%% Copyright Ericsson AB 1996-2019. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -545,7 +545,7 @@ allocate(#file_descriptor{module = Module} = Handle, Offset, Length) -> | {no_translation, unicode, latin1}. read(File, Sz) when (is_pid(File) orelse is_atom(File)), is_integer(Sz), Sz >= 0 -> - case io:request(File, {get_chars, '', Sz}) of + case io:request(File, {get_chars, latin1, '', Sz}) of Data when is_list(Data); is_binary(Data) -> {ok, Data}; Other -> @@ -566,7 +566,7 @@ read(_, _) -> | {no_translation, unicode, latin1}. read_line(File) when (is_pid(File) orelse is_atom(File)) -> - case io:request(File, {get_line, ''}) of + case io:request(File, {get_line, latin1, ''}) of Data when is_list(Data); is_binary(Data) -> {ok, Data}; Other -> diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl index 21aaefa654..cd7dc8ea9d 100644 --- a/lib/kernel/test/file_SUITE.erl +++ b/lib/kernel/test/file_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2018. All Rights Reserved. +%% Copyright Ericsson AB 1996-2019. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -273,11 +273,11 @@ mini_server(Parent) -> Parent ! {io_request,From,To,{put_chars,Data}}, From ! {io_reply, To, ok}, mini_server(Parent); - {io_request,From,To,{get_chars,'',N}} -> + {io_request,From,To,{get_chars,_Encoding,'',N}} -> Parent ! {io_request,From,To,{get_chars,'',N}}, From ! {io_reply, To, {ok, lists:duplicate(N,$a)}}, mini_server(Parent); - {io_request,From,To,{get_line,''}} -> + {io_request,From,To,{get_line,_Encoding,''}} -> Parent ! {io_request,From,To,{get_line,''}}, From ! {io_reply, To, {ok, "hej\n"}}, mini_server(Parent) |