aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2012-08-08 02:20:05 +0200
committerRickard Green <[email protected]>2012-12-03 21:18:05 +0100
commitb434a3ab242dde66e23a72122474854f51a61eff (patch)
treef205873230fb86943e6667c0b0de2e2563c82d1e /erts/emulator/sys
parent3b523c25af0df45fbf68ab3cf50c0556f1d4e0a1 (diff)
downloadotp-b434a3ab242dde66e23a72122474854f51a61eff.tar.gz
otp-b434a3ab242dde66e23a72122474854f51a61eff.tar.bz2
otp-b434a3ab242dde66e23a72122474854f51a61eff.zip
Prepare for use of ptab functionality also for ports
Diffstat (limited to 'erts/emulator/sys')
-rw-r--r--erts/emulator/sys/common/erl_check_io.c10
-rw-r--r--erts/emulator/sys/unix/sys.c6
2 files changed, 8 insertions, 8 deletions
diff --git a/erts/emulator/sys/common/erl_check_io.c b/erts/emulator/sys/common/erl_check_io.c
index 20bc1a6f55..5d814e0164 100644
--- a/erts/emulator/sys/common/erl_check_io.c
+++ b/erts/emulator/sys/common/erl_check_io.c
@@ -206,7 +206,7 @@ drvport2id(ErlDrvPort dp)
{
Port *pp = erts_drvport2port(dp, NULL);
if (pp)
- return pp->id;
+ return pp->common.id;
else {
ASSERT(0);
return am_undefined;
@@ -970,8 +970,8 @@ print_select_op(erts_dsprintf_buf_t *dsbufp,
mode & ERL_DRV_USE ? " ERL_DRV_USE" : "",
mode & (ERL_DRV_USE_NO_CALLBACK & ~ERL_DRV_USE) ? "_NO_CALLBACK" : "",
on);
- print_driver_name(dsbufp, pp->id);
- erts_dsprintf(dsbufp, "driver %T ", pp ? pp->id : NIL);
+ print_driver_name(dsbufp, pp->common.id);
+ erts_dsprintf(dsbufp, "driver %T ", pp ? pp->common.id : NIL);
}
static void
@@ -1061,8 +1061,8 @@ print_event_op(erts_dsprintf_buf_t *dsbufp,
(unsigned int) event_data->events,
(unsigned int) event_data->revents);
erts_dsprintf(dsbufp, ") by ");
- print_driver_name(dsbufp, pp->id);
- erts_dsprintf(dsbufp, "driver %T ", pp ? pp->id : NIL);
+ print_driver_name(dsbufp, pp->common.id);
+ erts_dsprintf(dsbufp, "driver %T ", pp ? pp->common.id : NIL);
}
static void
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index f94e0f2296..57ffb9f151 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -1153,7 +1153,7 @@ static int set_driver_data(int port_num,
report_exit = erts_alloc(ERTS_ALC_T_PRT_REP_EXIT,
sizeof(ErtsSysReportExit));
report_exit->next = report_exit_list;
- report_exit->port = erts_port[port_num].id;
+ report_exit->port = erts_port[port_num].common.id;
report_exit->pid = pid;
report_exit->ifd = read_write & DO_READ ? ifd : -1;
report_exit->ofd = read_write & DO_WRITE ? ofd : -1;
@@ -2570,7 +2570,7 @@ report_exit_status(ErtsSysReportExit *rep, int status)
if (rep->ifd >= 0) {
driver_data[rep->ifd].alive = 0;
driver_data[rep->ifd].status = status;
- (void) driver_select((ErlDrvPort) internal_port_index(pp->id),
+ (void) driver_select((ErlDrvPort) internal_port_index(pp->common.id),
rep->ifd,
(ERL_DRV_READ|ERL_DRV_USE),
1);
@@ -2578,7 +2578,7 @@ report_exit_status(ErtsSysReportExit *rep, int status)
if (rep->ofd >= 0) {
driver_data[rep->ofd].alive = 0;
driver_data[rep->ofd].status = status;
- (void) driver_select((ErlDrvPort) internal_port_index(pp->id),
+ (void) driver_select((ErlDrvPort) internal_port_index(pp->common.id),
rep->ofd,
(ERL_DRV_WRITE|ERL_DRV_USE),
1);