diff options
author | Stavros Aronis <[email protected]> | 2011-05-27 14:28:38 +0300 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2011-06-08 15:04:26 +0200 |
commit | ec62c1c046dd17ae49f9182995a11202924fc750 (patch) | |
tree | 5c588d3d5131dd87ec18c5b874b14dd43b429f1c /erts/preloaded/src/prim_file.erl | |
parent | 8ad38e22ca724906fb1e3c789f4846c0c81d284d (diff) | |
download | otp-ec62c1c046dd17ae49f9182995a11202924fc750.tar.gz otp-ec62c1c046dd17ae49f9182995a11202924fc750.tar.bz2 otp-ec62c1c046dd17ae49f9182995a11202924fc750.zip |
Replace atom in DRV macro in prim_file with string
An experimental version of Dialyzer discovered that the atom that
replaced the DRV macro in prim_file ends up in calls to
erlang:open_port({spawn, Driver}, Portopts) as the Driver argument. The
documentation states that this call requires a string there.
This change is also consistent with the one introduced in commit
0f03b1e9d2bef3bc830c31a369261af4c5234727 by Kostis Sagonas.
Diffstat (limited to 'erts/preloaded/src/prim_file.erl')
-rw-r--r-- | erts/preloaded/src/prim_file.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl index 8e0790e74a..ac7570582e 100644 --- a/erts/preloaded/src/prim_file.erl +++ b/erts/preloaded/src/prim_file.erl @@ -63,7 +63,7 @@ -include("file.hrl"). --define(DRV, efile). +-define(DRV, "efile"). -define(FD_DRV, "efile"). -define(LARGEFILESIZE, (1 bsl 63)). @@ -549,7 +549,7 @@ write_file(_, _) -> %% Returns {ok, Port}, the Port should be used as first argument in all %% the following functions. Returns {error, Reason} upon failure. start() -> - try erlang:open_port({spawn, atom_to_list(?DRV)}, [binary]) of + try erlang:open_port({spawn, ?DRV}, [binary]) of Port -> {ok, Port} catch |