From: morgana Date: Thu, 18 Dec 2008 17:17:54 +0000 (+0000) Subject: Detect Solaris 10 and compile DDP driver without the tpi_identify handler. X-Git-Tag: before_acls~33 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=2c0cbd9fa7bbf6ab2ae089a2de514fde7305e329 Detect Solaris 10 and compile DDP driver without the tpi_identify handler. --- diff --git a/sys/solaris/tpi.c b/sys/solaris/tpi.c index 60bac2b4..0bf89ed0 100644 --- a/sys/solaris/tpi.c +++ b/sys/solaris/tpi.c @@ -36,6 +36,8 @@ tpi_getinfo( dev_info_t *dip, ddi_info_cmd_t cmd, void *arg, void **resultp ) return( DDI_FAILURE ); } +/* Solaris 10 removed DDI_IDENTIFIED and replaced "identify" with "nulldev" */ +#ifdef DDI_IDENTIFIED static int tpi_identify( dev_info_t *dip ) { @@ -49,6 +51,7 @@ tpi_identify( dev_info_t *dip ) return( DDI_NOT_IDENTIFIED ); } } +#endif /* DDI_IDENTIFIED */ static int tpi_attach( dev_info_t *dip, ddi_attach_cmd_t cmd ) @@ -463,7 +466,7 @@ cmn_err( CE_CONT, "tpi_wput T_UNITDATA_REQ mblk size %X %X\n", m->b_rptr + tl->u } 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; } @@ -701,7 +704,11 @@ static struct dev_ops tpi_devops = { DEVO_REV, 0, tpi_getinfo, +#ifdef DDI_IDENTIFIED tpi_identify, +#else + nulldev, +#endif nulldev, tpi_attach, tpi_detach,