aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/unix/ttsl_drv.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-01-31 19:43:23 +0100
committerSverker Eriksson <[email protected]>2019-01-31 19:43:23 +0100
commit5ab76d9263e4a81ccac2fc5591c520dbce6927de (patch)
tree270c1724d0be6ae3f9ec62ab7303f368b6887cf2 /erts/emulator/drivers/unix/ttsl_drv.c
parent10b400a0433cf2ebcffe9ca702a26690123df81f (diff)
parent14fe4c3ccf93c023f851512e573e2bac7d00b232 (diff)
downloadotp-5ab76d9263e4a81ccac2fc5591c520dbce6927de.tar.gz
otp-5ab76d9263e4a81ccac2fc5591c520dbce6927de.tar.bz2
otp-5ab76d9263e4a81ccac2fc5591c520dbce6927de.zip
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/drivers/unix/ttsl_drv.c')
-rw-r--r--erts/emulator/drivers/unix/ttsl_drv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/drivers/unix/ttsl_drv.c b/erts/emulator/drivers/unix/ttsl_drv.c
index 11bb4373d8..f6864f96da 100644
--- a/erts/emulator/drivers/unix/ttsl_drv.c
+++ b/erts/emulator/drivers/unix/ttsl_drv.c
@@ -394,6 +394,8 @@ static ErlDrvSSizeT ttysl_control(ErlDrvData drv_data,
{
char resbuff[2*sizeof(Uint32)];
ErlDrvSizeT res_size;
+
+ command -= ERTS_TTYSL_DRV_CONTROL_MAGIC_NUMBER;
switch (command) {
case CTRL_OP_GET_WINSIZE:
{
@@ -419,7 +421,7 @@ static ErlDrvSSizeT ttysl_control(ErlDrvData drv_data,
}
break;
default:
- return 0;
+ return -1;
}
if (rlen < res_size) {
*rbuf = driver_alloc(res_size);