Dev IP initialization
[akaros.git] / kern / src / net / devip.c
index 1e6d9f6..3d904d2 100644 (file)
@@ -257,7 +257,7 @@ ipgen(struct chan *c, char *unused_char_p_t, struct dirtab*d, int unused_int, in
 }
 
 static void
-ipreset(void)
+ipinit(void)
 {
        qlock_init(&fslock);
        nullmediumlink();
@@ -271,6 +271,11 @@ ipreset(void)
 */
 }
 
+static void
+ipreset(void)
+{
+}
+
 static struct Fs*
 ipgetfs(int dev)
 {
@@ -409,11 +414,11 @@ ipopen(struct chan* c, int omode)
        case Qstats:
        case Qbootp:
        case Qipselftab:
-               if(omode != OREAD)
+               if((omode & OREAD) != OREAD)
                        error(Eperm);
                break;
        case Qsnoop:
-               if(omode != OREAD)
+               if((omode & OREAD) != OREAD)
                        error(Eperm);
                p = f->p[PROTO(c->qid)];
                cv = p->conv[CONV(c->qid)];
@@ -1208,7 +1213,7 @@ struct dev ipdevtab = {
        "ip",
 
        ipreset,
-       devinit,
+       ipinit,
        devshutdown,
        ipattach,
        ipwalk,