Improved device tags and sample usage
authorRonald G. Minnich <rminnich@google.com>
Mon, 20 Jan 2014 21:14:28 +0000 (13:14 -0800)
committerRonald G. Minnich <rminnich@google.com>
Mon, 20 Jan 2014 21:14:28 +0000 (13:14 -0800)
Signed-off-by: Ronald G. Minnich <rminnich@google.com>
kern/drivers/dev/ether.c
kern/drivers/dev/ether8139.c
kern/include/ns.h

index b309ee8..cf92f9b 100644 (file)
@@ -779,7 +779,7 @@ ethercrc(uint8_t *p, int len)
        return crc;
 }
 
        return crc;
 }
 
-struct dev etherdevtab = {
+struct dev etherdevtab __devtab = {
        'l',
        "ether",
 
        'l',
        "ether",
 
index ce90ed8..ae371c9 100644 (file)
@@ -755,7 +755,7 @@ rtl8139pnp(struct ether* edev)
        return 0;
 }
 
        return 0;
 }
 
-void
+void __etherlink
 ether8139link(void)
 {
        addethercard("rtl8139", rtl8139pnp);
 ether8139link(void)
 {
        addethercard("rtl8139", rtl8139pnp);
index d89ceb4..2bf3b09 100644 (file)
@@ -1021,7 +1021,8 @@ extern char *eve;
 
 /* special sections */
 #define __devtab  __attribute__((__section__(".devtab")))
 
 /* special sections */
 #define __devtab  __attribute__((__section__(".devtab")))
-#define __ether  __attribute__((__section__(".ether")))
+#define __devlink  __attribute__((__section__(".devlink")))
+#define __etherlink  __attribute__((__section__(".etherlink")))
 #define __media  __attribute__((__section__(".media")))
 
 #endif /* ROS_KERN_NS_H */
 #define __media  __attribute__((__section__(".media")))
 
 #endif /* ROS_KERN_NS_H */