diff options
author | Patrik Nyblom <[email protected]> | 2013-08-16 14:42:53 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2013-08-23 16:50:58 +0200 |
commit | c82784a8fc24ede2760cc96b5f5d6596684ba7e2 (patch) | |
tree | 3c122d99d85581217f136c873ea73c262bb7c0fd /erts/emulator/drivers | |
parent | fa5cc308af8c073832cc7b58dd52fa2f523582cc (diff) | |
download | otp-c82784a8fc24ede2760cc96b5f5d6596684ba7e2.tar.gz otp-c82784a8fc24ede2760cc96b5f5d6596684ba7e2.tar.bz2 otp-c82784a8fc24ede2760cc96b5f5d6596684ba7e2.zip |
Add debug functionality to retrieve async key
Diffstat (limited to 'erts/emulator/drivers')
-rw-r--r-- | erts/emulator/drivers/common/efile_drv.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c index 9e95325c24..779ecd1bd2 100644 --- a/erts/emulator/drivers/common/efile_drv.c +++ b/erts/emulator/drivers/common/efile_drv.c @@ -3133,25 +3133,25 @@ file_flush(ErlDrvData e) { /********************************************************************* * Driver entry point -> control + * Only debug functionality... */ static ErlDrvSSizeT file_control(ErlDrvData e, unsigned int command, char* buf, ErlDrvSizeT len, char **rbuf, ErlDrvSizeT rlen) { - /* - * warning: variable ‘desc’ set but not used - * [-Wunused-but-set-variable] - * ... no kidding ... - * - * file_descriptor *desc = (file_descriptor *)e; switch (command) { + case 'K' : + if (rlen < 4) { + *rbuf = EF_ALLOC(4); + } + (*rbuf)[0] = ((desc->key) >> 24) & 0xFF; + (*rbuf)[1] = ((desc->key) >> 16) & 0xFF; + (*rbuf)[2] = ((desc->key) >> 8) & 0xFF; + (*rbuf)[3] = (desc->key) & 0xFF; + return 4; default: return 0; - } - ASSERT(0); - desc = NULL; - */ - return 0; + } } /********************************************************************* |