[haiku-commits] r42314 - in haiku/trunk/src/libs/compat/freebsd_network: . compat/net

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 25 Jun 2011 13:03:20 +0200 (CEST)

Author: korli
Date: 2011-06-25 13:03:20 +0200 (Sat, 25 Jun 2011)
New Revision: 42314
Changeset: https://dev.haiku-os.org/changeset/42314

Modified:
   haiku/trunk/src/libs/compat/freebsd_network/bus.c
   haiku/trunk/src/libs/compat/freebsd_network/compat.c
   haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_media.h
Log:
added some missing functions and definitions for FreeBSD 8.2


Modified: haiku/trunk/src/libs/compat/freebsd_network/bus.c
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/bus.c   2011-06-25 10:50:23 UTC 
(rev 42313)
+++ haiku/trunk/src/libs/compat/freebsd_network/bus.c   2011-06-25 11:03:20 UTC 
(rev 42314)
@@ -455,6 +455,22 @@
 
 
 int
+bus_print_child_header(device_t dev, device_t child)
+{
+       UNIMPLEMENTED();
+       return B_ERROR;
+}
+
+
+int
+bus_print_child_footer(device_t dev, device_t child)
+{
+       UNIMPLEMENTED();
+       return B_ERROR;
+}
+
+
+int
 bus_generic_print_child(device_t dev, device_t child)
 {
        UNIMPLEMENTED();

Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_media.h
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_media.h   
2011-06-25 10:50:23 UTC (rev 42313)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat/net/if_media.h   
2011-06-25 11:03:20 UTC (rev 42314)
@@ -149,6 +149,8 @@
 /* note 31 is the max! */
 
 #define        IFM_ETH_MASTER  0x00000100      /* master mode (1000baseT) */
+#define        IFM_ETH_RXPAUSE 0x00000200      /* receive PAUSE frames */
+#define        IFM_ETH_TXPAUSE 0x00000400      /* transmit PAUSE frames */
 
 /*
  * Token ring

Modified: haiku/trunk/src/libs/compat/freebsd_network/compat.c
===================================================================
--- haiku/trunk/src/libs/compat/freebsd_network/compat.c        2011-06-25 
10:50:23 UTC (rev 42313)
+++ haiku/trunk/src/libs/compat/freebsd_network/compat.c        2011-06-25 
11:03:20 UTC (rev 42314)
@@ -175,6 +175,35 @@
 }
 
 
+int
+device_get_children(device_t dev, device_t **devlistp, int *devcountp)
+{
+       int count;
+       device_t child = NULL;
+       device_t *list;
+
+       count = 0;
+       while (list_get_next_item(&dev->children, child) != NULL) {
+               count++;
+       }
+       
+       list = malloc(count * sizeof(device_t));
+       if (!list)
+               return (ENOMEM);
+
+       count = 0;
+       while ((child = list_get_next_item(&dev->children, child)) != NULL) {
+               list[count] = child;
+               count++;
+       }
+
+       *devlistp = list;
+       *devcountp = count;
+
+       return (0);
+}
+
+
 void
 device_set_ivars(device_t dev, void *ivars)
 {


Other related posts:

  • » [haiku-commits] r42314 - in haiku/trunk/src/libs/compat/freebsd_network: . compat/net - korli