Fixes a few warnings and printfmt %i
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 29 Jan 2014 19:45:02 +0000 (11:45 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 29 Jan 2014 19:45:02 +0000 (11:45 -0800)
The warning was hiding the wrong order of hnputl.  Hopefully this does
what we want.  =)

I also commented out the mii.c, which we're not using right now.

kern/drivers/net/Kbuild
kern/src/net/ethermedium.c
kern/src/printfmt.c

index f6ce675..c3892e1 100644 (file)
@@ -1,7 +1,7 @@
 # need at least one obj file to build for Kbuild
 obj-y                                                  += dummy.o
 obj-y                                                  += ether8139.o
-obj-y                                                  += mii.o
 # Following are from gpxe and need a lot of help.
+#obj-y                                                 += mii.o
 #obj-y                                                 += r8169.o
 #obj-y                                                 += e1000/
index e571bd7..64f8643 100644 (file)
@@ -265,7 +265,9 @@ static void
 etherunbind(struct Ipifc *ifc)
 {
        Etherrock *er = ifc->arg;
-#warning "postnote"
+       printk("[kernel] etherunbind not supported yet!\n");
+       
+       // we'll need to tell the ktasks to exit, maybe via flags and a wakeup
 #if 0
        if(er->read4p)
                postnote(er->read4p, 1, "unbind", 0);
index a3bd013..68b59da 100644 (file)
@@ -12,6 +12,7 @@
 #include <string.h>
 #include <stdarg.h>
 #include <kthread.h>
+#include <ns.h>
 
 /* Print a number (base <= 16) in reverse order,
  * using specified putch function and associated pointer putdat. */
@@ -161,7 +162,7 @@ void vprintfmt(void (*putch)(int, void**), void **putdat, const char *fmt, va_li
                        if ((lp = va_arg(ap, uint32_t *)) != NULL){
                                uint32_t hostfmt;
                                for(i = 0; i < 4; i++){
-                                       hnputl(&lp[i], &hostfmt);
+                                       hnputl(&hostfmt, lp[i]);
                                        printfmt(putch, putdat, "%08lx", hostfmt);
                                }
                        }