diff options
author | Sverker Eriksson <[email protected]> | 2019-01-28 17:36:31 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2019-01-28 19:43:24 +0100 |
commit | ad5822c6b1401111bbdbc5e77fe097a3f1b2b3cb (patch) | |
tree | 2d8520bde623c7aeb6812f4fe63a597467812e79 /lib/kernel/src/user_drv.erl | |
parent | a4aeacd28e4e31d3d79b091afcdc528082be2865 (diff) | |
download | otp-ad5822c6b1401111bbdbc5e77fe097a3f1b2b3cb.tar.gz otp-ad5822c6b1401111bbdbc5e77fe097a3f1b2b3cb.tar.bz2 otp-ad5822c6b1401111bbdbc5e77fe097a3f1b2b3cb.zip |
erts: Add magic port control numbers
to increase the probablity of a nice badarg
from erlang:port_control.
Diffstat (limited to 'lib/kernel/src/user_drv.erl')
-rw-r--r-- | lib/kernel/src/user_drv.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/kernel/src/user_drv.erl b/lib/kernel/src/user_drv.erl index 9f914aa222..08286dd476 100644 --- a/lib/kernel/src/user_drv.erl +++ b/lib/kernel/src/user_drv.erl @@ -32,9 +32,10 @@ -define(OP_BEEP,4). -define(OP_PUTC_SYNC,5). % Control op --define(CTRL_OP_GET_WINSIZE,100). --define(CTRL_OP_GET_UNICODE_STATE,101). --define(CTRL_OP_SET_UNICODE_STATE,102). +-define(ERTS_TTYSL_DRV_CONTROL_MAGIC_NUMBER, 16#018b0900). +-define(CTRL_OP_GET_WINSIZE, (100 + ?ERTS_TTYSL_DRV_CONTROL_MAGIC_NUMBER)). +-define(CTRL_OP_GET_UNICODE_STATE, (101 + ?ERTS_TTYSL_DRV_CONTROL_MAGIC_NUMBER)). +-define(CTRL_OP_SET_UNICODE_STATE, (102 + ?ERTS_TTYSL_DRV_CONTROL_MAGIC_NUMBER)). %% start() %% start(ArgumentList) |