Index: libcio/clusmap.c
===================================================================
--- libcio/clusmap.c	(revision ea232f984b55590cfb594e0c01ab8b3601ca2d89)
+++ libcio/clusmap.c	(revision d60f436ae355378a9cc7229dd74e18a9625c185a)
@@ -258,5 +258,5 @@
 	chclo arg;
 	int16_t ft;
-	int8_t	*ds, *fsn, *fse;
+	int8_t	*fsn, *fse;
 	struct	fcb	*fcp;
 
@@ -275,6 +275,6 @@
 	if (arg EQ _nopc) {
 
-		ds = ((struct devtabl *)chantab[fp->_unit].c_arg)->d_name;
-		printf(" is a device:  [%s]\n", ds);
+		printf(" has device kind:  [%d]\n",
+			(int16_t)(int32_t)chantab[fp->_unit].c_arg);
 
 	} else if (arg EQ _filecl) {
Index: libcio/conwr.c
===================================================================
--- libcio/conwr.c	(revision ea232f984b55590cfb594e0c01ab8b3601ca2d89)
+++ libcio/conwr.c	(revision d60f436ae355378a9cc7229dd74e18a9625c185a)
@@ -18,13 +18,13 @@
 int16_t _conwr(io_arg arg, void *buff, int16_t len)
 {
-	struct devtabl *dp;
+	int16_t kind;
 	int8_t *buff8;
 	register int16_t count;
 
-	dp = (struct devtabl *)arg;
+	kind = (int16_t)arg;
 	buff8 = buff;
 
 	for (count = 0; count < len; ++count)
-		BIOS(B_PUTC, dp->d_kind, *buff8++);
+		BIOS(B_PUTC, kind, *buff8++);
 
 	return(count);
Index: libcio/fsinit.c
===================================================================
--- libcio/fsinit.c	(revision ea232f984b55590cfb594e0c01ab8b3601ca2d89)
+++ libcio/fsinit.c	(revision d60f436ae355378a9cc7229dd74e18a9625c185a)
@@ -157,5 +157,5 @@
 
 	for (i = 3; i < MAXCHAN; i++)	/*  3..MAXCHAN-1 - not preassigned */
-		InitCH(&chantab[i], 0, 0, 0, 0, _badfc, (io_arg)0L );
+		InitCH(&chantab[i], 0, 0, 0, 0, _badfc, (io_arg)-1 );
 
 	_bpbin  = FALSE;	/* BPB isn't in memory */
Index: libcio/open.c
===================================================================
--- libcio/open.c	(revision ea232f984b55590cfb594e0c01ab8b3601ca2d89)
+++ libcio/open.c	(revision d60f436ae355378a9cc7229dd74e18a9625c185a)
@@ -8,6 +8,6 @@
 #include "ram.h"
 
-static struct device condev  = { 2, 2, 1, 0, _nopo  };
-static struct device filedev = { 1, 1, 0, 1, _fileop };
+static struct device condev  = { 2, 2, 1, 0, _nopo,   CON_DEV };
+static struct device filedev = { 1, 1, 0, 1, _fileop,      -1 };
 
 /*
@@ -19,8 +19,8 @@
 static struct devtabl devtabl[] = {
 
-	{ "con:", &condev,  &devtabl[0], CON_DEV },	/* console device */
-	{ "CON:", &condev,  &devtabl[1], CON_DEV },
-
-	{      0, &filedev,        NULL,      -1 }	/* this MUST be the last entry */
+	{ "con:", &condev  },	/* console device */
+	{ "CON:", &condev  },
+
+	{      0, &filedev }	/* this MUST be the last entry */
 };
 
@@ -80,5 +80,5 @@
 	/* setup the channel table entries */
 
-	chp->c_arg   = dp->d_arg;
+	chp->c_arg   = (io_arg)(int32_t)dp->d_dev->d_kind;
 	chp->c_ioctl = dev->d_ioctl;
 	chp->c_seek  = dev->d_seek;
