Source-Changes-HG archive

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

[src/nathanw_sa]: src/sys Sync with HEAD.



details:   https://anonhg.NetBSD.org/src/rev/2cf8a7a5e68f
branches:  nathanw_sa
changeset: 506629:2cf8a7a5e68f
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Dec 29 20:55:43 2002 +0000

description:
Sync with HEAD.

diffstat:

 sys/net/if_pppoe.c          |    30 +-
 sys/net/if_spppsubr.c       |    17 +-
 sys/net/if_tun.c            |    10 +-
 sys/netatalk/aarp.c         |     5 +-
 sys/netisdn/i4b_ipr.c       |     6 +-
 sys/ntfs/Makefile           |     7 -
 sys/ntfs/TODO               |    40 -
 sys/ntfs/files.ntfs         |    12 -
 sys/ntfs/ntfs.h             |   340 -------
 sys/ntfs/ntfs_compr.c       |   123 --
 sys/ntfs/ntfs_compr.h       |    35 -
 sys/ntfs/ntfs_conv.c        |   173 ---
 sys/ntfs/ntfs_ihash.c       |   174 ---
 sys/ntfs/ntfs_ihash.h       |    38 -
 sys/ntfs/ntfs_inode.h       |   126 --
 sys/ntfs/ntfs_subr.c        |  2081 -------------------------------------------
 sys/ntfs/ntfs_subr.h        |   109 --
 sys/ntfs/ntfs_vfsops.c      |  1087 ----------------------
 sys/ntfs/ntfs_vfsops.h      |    39 -
 sys/ntfs/ntfs_vnops.c       |   989 --------------------
 sys/ntfs/ntfsmount.h        |    44 -
 sys/sys/cdefs.h             |     4 +-
 sys/sys/ktrace.h            |     5 +-
 sys/sys/proc.h              |     3 +-
 sys/sys/protosw.h           |     4 +-
 sys/sys/syscall.h           |     4 +-
 sys/sys/syscallargs.h       |     4 +-
 sys/sys/sysctl.h            |    10 +-
 sys/sys/systm.h             |     4 +-
 sys/sys/unistd.h            |     3 +-
 sys/ufs/ffs/ffs_alloc.c     |     5 +-
 sys/ufs/lfs/lfs_bio.c       |   172 +++-
 sys/ufs/lfs/lfs_extern.h    |     4 +-
 sys/ufs/lfs/lfs_inode.c     |    19 +-
 sys/ufs/lfs/lfs_syscalls.c  |    32 +-
 sys/ufs/lfs/lfs_vnops.c     |    55 +-
 sys/ufs/ufs/ufs_readwrite.c |    28 +-
 37 files changed, 326 insertions(+), 5515 deletions(-)

diffs (truncated from 6559 to 300 lines):

diff -r 4bb6c633adbb -r 2cf8a7a5e68f sys/net/if_pppoe.c
--- a/sys/net/if_pppoe.c        Sun Dec 29 20:45:30 2002 +0000
+++ b/sys/net/if_pppoe.c        Sun Dec 29 20:55:43 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pppoe.c,v 1.3.2.16 2002/09/17 21:22:50 nathanw Exp $ */
+/* $NetBSD: if_pppoe.c,v 1.3.2.17 2002/12/29 20:55:43 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.3.2.16 2002/09/17 21:22:50 nathanw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.3.2.17 2002/12/29 20:55:43 thorpej Exp $");
 
 #include "pppoe.h"
 #include "bpfilter.h"
@@ -993,20 +993,31 @@
 static int
 pppoe_connect(struct pppoe_softc *sc)
 {
-       int x, err;
+       int x, err, retry;
 
        if (sc->sc_state != PPPOE_STATE_INITIAL)
                return EBUSY;
 
        x = splnet();
+       /* save state, in case we fail to send PADI */
+       retry = sc->sc_padr_retried;
        sc->sc_state = PPPOE_STATE_PADI_SENT;
        sc->sc_padr_retried = 0;
        err = pppoe_send_padi(sc);
-       if (err == 0)
+       if (err != 0) {
+               /*
+                * We failed to send a single PADI packet.
+                * This is unfortunate, because we have no good way to recover
+                * from here.
+                */
+                
+               /* recover state and return the error */
+               sc->sc_state = PPPOE_STATE_INITIAL;
+               sc->sc_padr_retried = retry;
+       } else {
                callout_reset(&sc->sc_timeout, PPPOE_DISC_TIMEOUT,
                    pppoe_timeout, sc);
-       else
-               pppoe_abort_connect(sc);
+       }
        splx(x);
        return err;
 }
@@ -1052,11 +1063,14 @@
 {
        printf("%s: could not establish connection\n",
                sc->sc_sppp.pp_if.if_xname);
-       sc->sc_state = PPPOE_STATE_INITIAL;
-       memcpy(&sc->sc_dest, etherbroadcastaddr, sizeof(sc->sc_dest));
+       sc->sc_state = PPPOE_STATE_CLOSING;
 
        /* notify upper layer */
        sc->sc_sppp.pp_down(&sc->sc_sppp);
+
+       /* clear connection state */
+       memcpy(&sc->sc_dest, etherbroadcastaddr, sizeof(sc->sc_dest));
+       sc->sc_state = PPPOE_STATE_INITIAL;
 }
 
 /* Send a PADR packet */
diff -r 4bb6c633adbb -r 2cf8a7a5e68f sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Sun Dec 29 20:45:30 2002 +0000
+++ b/sys/net/if_spppsubr.c     Sun Dec 29 20:55:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.20.2.16 2002/10/18 02:45:12 nathanw Exp $     */
+/*     $NetBSD: if_spppsubr.c,v 1.20.2.17 2002/12/29 20:55:44 thorpej Exp $     */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.20.2.16 2002/10/18 02:45:12 nathanw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.20.2.17 2002/12/29 20:55:44 thorpej Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipx.h"
@@ -1129,15 +1129,22 @@
 #define ifr_mtu ifr_metric
 #endif
        case SIOCSIFMTU:
-               if (ifr->ifr_mtu < 128 || ifr->ifr_mtu > sp->lcp.their_mru)
-                       return (EINVAL);
+               if (ifr->ifr_mtu < 128 || ifr->ifr_mtu > sp->lcp.their_mru) {
+                       error = EINVAL;
+                       break;
+               }
+
                ifp->if_mtu = ifr->ifr_mtu;
                break;
 #endif
 #ifdef SLIOCSETMTU
        case SLIOCSETMTU:
                if (*(short *)data < 128 || *(short *)data > sp->lcp.their_mru)
-                       return (EINVAL);
+               {
+                       error = EINVAL;
+                       break;
+               }
+
                ifp->if_mtu = *(short *)data;
                break;
 #endif
diff -r 4bb6c633adbb -r 2cf8a7a5e68f sys/net/if_tun.c
--- a/sys/net/if_tun.c  Sun Dec 29 20:45:30 2002 +0000
+++ b/sys/net/if_tun.c  Sun Dec 29 20:55:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tun.c,v 1.42.2.9 2002/12/11 06:46:32 thorpej Exp $  */
+/*     $NetBSD: if_tun.c,v 1.42.2.10 2002/12/29 20:55:45 thorpej Exp $ */
 
 /*
  * Copyright (c) 1988, Julian Onions <jpo%cs.nott.ac.uk@localhost>
@@ -15,7 +15,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.42.2.9 2002/12/11 06:46:32 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.42.2.10 2002/12/29 20:55:45 thorpej Exp $");
 
 #include "tun.h"
 
@@ -161,6 +161,8 @@
        ifp->if_oerrors = 0;
        ifp->if_ipackets = 0;
        ifp->if_opackets = 0;
+       ifp->if_ibytes   = 0;
+       ifp->if_obytes   = 0;
        ifp->if_dlt = DLT_NULL;
        IFQ_SET_READY(&ifp->if_snd);
        if_attach(ifp);
@@ -438,6 +440,7 @@
        int             s;
        int             error;
 #endif
+       int             mlen;
        ALTQ_DECL(struct altq_pktattr pktattr;)
 
        simple_lock(&tp->tun_lock);
@@ -499,8 +502,10 @@
                        ifp->if_collisions++;
                        return (error);
                }
+               mlen = m0->m_pkthdr.len;
                splx(s);
                ifp->if_opackets++;
+               ifp->if_obytes += mlen;
                break;
 #endif
        default:
@@ -841,6 +846,7 @@
        IF_ENQUEUE(ifq, top);
        splx(s);
        ifp->if_ipackets++;
+       ifp->if_ibytes += tlen;
        schednetisr(isr);
        simple_unlock(&tp->tun_lock);
        return (error);
diff -r 4bb6c633adbb -r 2cf8a7a5e68f sys/netatalk/aarp.c
--- a/sys/netatalk/aarp.c       Sun Dec 29 20:45:30 2002 +0000
+++ b/sys/netatalk/aarp.c       Sun Dec 29 20:55:43 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aarp.c,v 1.5.6.4 2002/11/11 22:15:08 nathanw Exp $     */
+/*     $NetBSD: aarp.c,v 1.5.6.5 2002/12/29 20:55:45 thorpej Exp $     */
 
 /*
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aarp.c,v 1.5.6.4 2002/11/11 22:15:08 nathanw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aarp.c,v 1.5.6.5 2002/12/29 20:55:45 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/socket.h>
@@ -62,7 +62,6 @@
 #define AARPTAB_NB     19
 #define AARPTAB_SIZE   (AARPTAB_BSIZ * AARPTAB_NB)
 struct aarptab  aarptab[AARPTAB_SIZE];
-int             aarptab_size = AARPTAB_SIZE;
 
 #define AARPTAB_HASH(a) \
     ((((a).s_net << 8 ) + (a).s_node ) % AARPTAB_NB )
diff -r 4bb6c633adbb -r 2cf8a7a5e68f sys/netisdn/i4b_ipr.c
--- a/sys/netisdn/i4b_ipr.c     Sun Dec 29 20:45:30 2002 +0000
+++ b/sys/netisdn/i4b_ipr.c     Sun Dec 29 20:55:43 2002 +0000
@@ -27,7 +27,7 @@
  *     i4b_ipr.c - isdn4bsd IP over raw HDLC ISDN network driver
  *     ---------------------------------------------------------
  *
- *     $Id: i4b_ipr.c,v 1.4.2.7 2002/07/15 20:34:02 nathanw Exp $
+ *     $Id: i4b_ipr.c,v 1.4.2.8 2002/12/29 20:55:45 thorpej Exp $
  *
  * $FreeBSD$
  *
@@ -59,7 +59,7 @@
  *---------------------------------------------------------------------------*/ 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i4b_ipr.c,v 1.4.2.7 2002/07/15 20:34:02 nathanw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i4b_ipr.c,v 1.4.2.8 2002/12/29 20:55:45 thorpej Exp $");
 
 #include "irip.h"
 
@@ -641,7 +641,7 @@
 #else
                        if((error = suser(p->p_ucred, &p->p_acflag)) != 0)
 #endif
-                               return (error);
+                               break;
                        sl_compress_setup(sc->sc_compr, *(int *)data);
                        }
                        break;
diff -r 4bb6c633adbb -r 2cf8a7a5e68f sys/ntfs/Makefile
--- a/sys/ntfs/Makefile Sun Dec 29 20:45:30 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#      $NetBSD: Makefile,v 1.3.8.1 2002/12/11 06:46:53 thorpej Exp $
-
-INCSDIR= /usr/include/ntfs
-
-INCS=  ntfs.h ntfs_inode.h ntfsmount.h
-
-.include <bsd.kinc.mk>
diff -r 4bb6c633adbb -r 2cf8a7a5e68f sys/ntfs/TODO
--- a/sys/ntfs/TODO     Sun Dec 29 20:45:30 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-$NetBSD: TODO,v 1.17.2.3 2002/01/08 00:34:36 nathanw Exp $
-
-- convert the code to do caching in buffer cache indexed by
-  file-vnode/file-offset so that NTFS would take advantage of UBC;
-  it should also improve performance somewhat, because if it's necessary
-  to find some offset in a file, it's possible to check if the data
-  are available in the cache before doing the bmap operation first
-       (from Chuq)
-
-- working VOP_BALLOC() (new in UBC)
-       (from Chuq)
-
-- working mmap (broken with UBC?) - kern/13355
-
-- readdir: evalutate impact of using variable length reclen - should
-  enable us to store much more entries into buf in typical case with
-  short filenames, though more work would need to be done in offset != 0
-  case
-
-- readdir: fill in proper "inode" number for '..' entry
-
-- handle Unicode filenames more inteligently - they are translated to UTF-2
-  form currently, adding hooks for various character sets or other encodings
-  would be trivial
-
-- implement writing into resident attributes, so it would be possible
-   to write into "small" files (<30KB) too
-       (from Semen Ustimenko <semenu%FreeBSD.org@localhost>)
-  generally, better write support
-
-
-- support mount update
-
-- really implement sync
-
-- write necessary bits to support NTFS in libsa
-
-- basic sysinst support for NTFS
-
-- NTFS ACL support (though usefullness of such feature is arguable)
diff -r 4bb6c633adbb -r 2cf8a7a5e68f sys/ntfs/files.ntfs
--- a/sys/ntfs/files.ntfs       Sun Dec 29 20:45:30 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-#      $NetBSD: files.ntfs,v 1.1.6.2 2002/06/20 03:50:06 nathanw Exp $
-
-deffs  fs_ntfs.h               NTFS
-
-defflag        opt_ntfs.h              NTFS_DEBUG
-
-file   ntfs/ntfs_compr.c       ntfs
-file   ntfs/ntfs_conv.c        ntfs
-file   ntfs/ntfs_ihash.c       ntfs
-file   ntfs/ntfs_subr.c        ntfs
-file   ntfs/ntfs_vfsops.c      ntfs
-file   ntfs/ntfs_vnops.c       ntfs
diff -r 4bb6c633adbb -r 2cf8a7a5e68f sys/ntfs/ntfs.h
--- a/sys/ntfs/ntfs.h   Sun Dec 29 20:45:30 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,340 +0,0 @@



Home | Main Index | Thread Index | Old Index