Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/stand/lib/netif cleanup, delete declarations n...



details:   https://anonhg.NetBSD.org/src/rev/8862a64230f7
branches:  trunk
changeset: 544173:8862a64230f7
user:      drochner <drochner%NetBSD.org@localhost>
date:      Thu Mar 13 16:02:39 2003 +0000

description:
cleanup, delete declarations now in libsa/iodesc.h

diffstat:

 sys/arch/i386/stand/lib/netif/netif_small.c |  24 +++++++++++-------------
 sys/arch/i386/stand/lib/netif/netif_small.h |  13 +++----------
 2 files changed, 14 insertions(+), 23 deletions(-)

diffs (108 lines):

diff -r 3504bdc53e09 -r 8862a64230f7 sys/arch/i386/stand/lib/netif/netif_small.c
--- a/sys/arch/i386/stand/lib/netif/netif_small.c       Thu Mar 13 15:36:06 2003 +0000
+++ b/sys/arch/i386/stand/lib/netif/netif_small.c       Thu Mar 13 16:02:39 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netif_small.c,v 1.7 2002/06/21 23:18:45 gmcgarry Exp $ */
+/*     $NetBSD: netif_small.c,v 1.8 2003/03/13 16:02:39 drochner Exp $ */
 
 /* minimal netif - for boot ROMs we don't have to select between
   several interfaces, and we have to save space
@@ -68,7 +68,7 @@
        int sock;
 {
        if (sock != 0) {
-               return(NULL);
+               return (NULL);
        }
        return (&iosocket);
 }
@@ -80,40 +80,38 @@
 
        io = &iosocket;
        if (io->io_netif) {
-#ifdef DEBUG
+#ifdef NETIF_DEBUG
                printf("netif_open: device busy\n");
 #endif
                return (-1);
        }
        memset(io, 0, sizeof(*io));
 
-       if(!EtherInit(io->myea)) {
+       if (!EtherInit(io->myea)) {
                printf("EtherInit failed\n");
-               return(-1);
+               return (-1);
        }
 
        io->io_netif = (void*)1; /* mark busy */
 
-       return(0);
+       return (0);
 }
 
-int
+void
 netif_close(fd)
        int fd;
 {
        struct iodesc *io;
 
        if (fd != 0) {
-               errno = EBADF;
-               return(-1);
+               return;
        }
 
        io = &iosocket;
-       if(io->io_netif) {
+       if (io->io_netif) {
                EtherStop();
                io->io_netif = NULL;
        }
-       return(0);
 }
 
 /*
@@ -138,7 +136,7 @@
                printf("type: 0x%x\n", eh->ether_type & 0xFFFF);
        }
 #endif
-       return(EtherSend(pkt, len));
+       return (EtherSend(pkt, len));
 }
 
 /*
@@ -164,7 +162,7 @@
        t = getsecs();
        len = 0;
        while (((getsecs() - t) < timo) && !len) {
-           len = EtherReceive(pkt, maxlen);
+               len = EtherReceive(pkt, maxlen);
        }
 
 #ifdef NETIF_DEBUG
diff -r 3504bdc53e09 -r 8862a64230f7 sys/arch/i386/stand/lib/netif/netif_small.h
--- a/sys/arch/i386/stand/lib/netif/netif_small.h       Thu Mar 13 15:36:06 2003 +0000
+++ b/sys/arch/i386/stand/lib/netif/netif_small.h       Thu Mar 13 16:02:39 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netif_small.h,v 1.2 1997/09/17 18:21:42 drochner Exp $ */
+/*     $NetBSD: netif_small.h,v 1.3 2003/03/13 16:02:39 drochner Exp $ */
 
 /*
  * Copyright (c) 1995 Gordon W. Ross
@@ -36,12 +36,5 @@
 /* minimal netif - for boot ROMs we don't have to select between
  several interfaces, and we have to save space */
 
-struct netif; /* dummy */
-
-int            netif_get __P((struct iodesc*, void*, size_t, time_t));
-int            netif_put __P((struct iodesc*, void*, size_t));
-
-int            netif_open __P((void));
-int            netif_close __P((int));
-
-struct iodesc  *socktodesc __P((int));
+int netif_open __P((void));
+void netif_close __P((int));



Home | Main Index | Thread Index | Old Index