aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/io.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-12-07 12:27:57 +0100
committerBjörn Gustavsson <[email protected]>2011-12-09 11:46:26 +0100
commit0d24b1cc87cb72b1e1737aec55abf87914e2fc82 (patch)
treef09fc1e2f22efefbb43f717922205f67abeca954 /erts/emulator/beam/io.c
parent261fc9e444187f30e0b1afe69adbafc715124ba1 (diff)
downloadotp-0d24b1cc87cb72b1e1737aec55abf87914e2fc82.tar.gz
otp-0d24b1cc87cb72b1e1737aec55abf87914e2fc82.tar.bz2
otp-0d24b1cc87cb72b1e1737aec55abf87914e2fc82.zip
Remove support for old drivers without ERL_DRV_EXTENDED_MARKER
Because of the extensive changes in the driver API (and especially the change of return types for callbacks such as 'control'), we can no longer allow drivers without version numbers.
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r--erts/emulator/beam/io.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index 1749cac66c..49cd0e5f53 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -4814,16 +4814,11 @@ static int
init_driver(erts_driver_t *drv, ErlDrvEntry *de, DE_Handle *handle)
{
drv->name = de->driver_name;
- if (de->extended_marker == ERL_DRV_EXTENDED_MARKER) {
- drv->version.major = de->major_version;
- drv->version.minor = de->minor_version;
- drv->flags = de->driver_flags;
- }
- else {
- drv->version.major = 0;
- drv->version.minor = 0;
- drv->flags = 0;
- }
+ ASSERT(de->extended_marker == ERL_DRV_EXTENDED_MARKER);
+ ASSERT(de->major_version >= 2);
+ drv->version.major = de->major_version;
+ drv->version.minor = de->minor_version;
+ drv->flags = de->driver_flags;
drv->handle = handle;
#ifdef ERTS_SMP
if (drv->flags & ERL_DRV_FLAG_USE_PORT_LOCKING)
@@ -4856,13 +4851,8 @@ init_driver(erts_driver_t *drv, ErlDrvEntry *de, DE_Handle *handle)
drv->ready_output = de->ready_output ? de->ready_output : no_ready_output_callback;
drv->timeout = de->timeout ? de->timeout : no_timeout_callback;
drv->ready_async = de->ready_async;
- if (de->extended_marker == ERL_DRV_EXTENDED_MARKER)
- drv->process_exit = de->process_exit;
- else
- drv->process_exit = NULL;
- if ((de->major_version >= 2
- || (de->major_version == 1 && de->minor_version >= 3)/*R13A*/)
- && de->stop_select)
+ drv->process_exit = de->process_exit;
+ if (de->stop_select)
drv->stop_select = de->stop_select;
else
drv->stop_select = no_stop_select_callback;