]> arthur.barton.de Git - netatalk.git/commitdiff
AppleTalk Solaris 10 patches, from Andrew Morgan
authordidg <didg>
Thu, 18 Dec 2008 18:22:40 +0000 (18:22 +0000)
committerdidg <didg>
Thu, 18 Dec 2008 18:22:40 +0000 (18:22 +0000)
sys/netatalk/at.h
sys/solaris/tpi.c

index b9214bef43f672c4c548299551758798406ad2c7..4a3cae25d5a70c1f29ae0ae010beb5e00007e9e9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: at.h,v 1.3.10.1 2003-12-12 19:29:55 didg Exp $
+ * $Id: at.h,v 1.3.10.1.2.1 2008-12-18 18:22:40 didg Exp $
  *
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  *
  * These should really be in some global header file, but we can't
  * count on them being there, and it's annoying to patch system files.
  */
+#ifndef ETHERTYPE_AT
 #define ETHERTYPE_AT   0x809B          /* AppleTalk protocol */
+#endif
+#ifndef ETHERTYPE_AARP
 #define ETHERTYPE_AARP 0x80F3          /* AppleTalk ARP */
+#endif
 
 #define DDP_MAXSZ      587
 
index 60bac2b4c36c870d8bcaf61b92bf422312ec07ce..0bf89ed01bf2286adf239dfbb7760db1e22453c0 100644 (file)
@@ -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,