+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
#include <sys/types.h>
#include <sys/kmem.h>
#include <sys/conf.h>
return( DDI_FAILURE );
}
+/* Solaris 10 removed DDI_IDENTIFIED and replaced "identify" with "nulldev" */
+#ifdef DDI_IDENTIFIED
static int
tpi_identify( dev_info_t *dip )
{
- if ( strcmp( ddi_get_name( dip ), "ddp" ) == 0 ) {
+ char *tmp;
+
+ /* don't use strcmp under Solaris 9, problem loading kernel module */
+ tmp = ddi_get_name( dip );
+ if ((tmp[0]== 'd') && (tmp[1]=='d') && (tmp[2]=='p') && tmp[3]==0) {
return( DDI_IDENTIFIED );
} else {
return( DDI_NOT_IDENTIFIED );
}
}
+#endif /* DDI_IDENTIFIED */
static int
tpi_attach( dev_info_t *dip, ddi_attach_cmd_t cmd )
freemsg( m );
break;
}
-#endif notdef
+#endif /* notdef */
sat = *(struct sockaddr_at *)(m->b_rptr +
tl->unitdata_req.DEST_offset );
}
cp = (struct copyresp *)m->b_rptr;
if ( cp->cp_rval != 0 ) {
- cmn_err( CE_CONT, "tpi_wput IOCDATA failed %d\n", cp->cp_rval );
+ cmn_err( CE_CONT, "tpi_wput IOCDATA failed %s\n", cp->cp_rval );
freemsg( m );
break;
}
DEVO_REV,
0,
tpi_getinfo,
+#ifdef DDI_IDENTIFIED
tpi_identify,
+#else
+ nulldev,
+#endif
nulldev,
tpi_attach,
tpi_detach,