Date: Tue, 12 Apr 2005 11:25:42 GMT From: David Xu <davidxu@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 74972 for review Message-ID: <200504121125.j3CBPgwt023812@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=74972 Change 74972 by davidxu@davidxu_alona on 2005/04/12 11:25:31 IFC. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libc/amd64/string/Makefile.inc#3 integrate .. //depot/projects/davidxu_thread/src/lib/libc/amd64/string/strcmp.S#1 branch .. //depot/projects/davidxu_thread/src/lib/libc/net/name6.c#5 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/inet.4#3 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/sched_4bsd.4#2 integrate .. //depot/projects/davidxu_thread/src/share/man/man4/witness.4#3 integrate .. //depot/projects/davidxu_thread/src/share/man/man9/Makefile#8 integrate .. //depot/projects/davidxu_thread/src/sys/alpha/alpha/interrupt.c#4 integrate .. //depot/projects/davidxu_thread/src/sys/amd64/conf/NOTES#6 integrate .. //depot/projects/davidxu_thread/src/sys/boot/i386/libi386/vidconsole.c#2 integrate .. //depot/projects/davidxu_thread/src/sys/kern/subr_witness.c#5 integrate .. //depot/projects/davidxu_thread/src/sys/kern/vfs_lookup.c#7 integrate .. //depot/projects/davidxu_thread/src/sys/kern/vfs_syscalls.c#6 integrate .. //depot/projects/davidxu_thread/src/sys/powerpc/powerpc/machdep.c#9 integrate .. //depot/projects/davidxu_thread/src/sys/sys/namei.h#4 integrate .. //depot/projects/davidxu_thread/src/usr.bin/calendar/calendars/calendar.freebsd#10 integrate .. //depot/projects/davidxu_thread/src/usr.bin/du/du.c#3 integrate .. //depot/projects/davidxu_thread/src/usr.bin/id/id.c#2 integrate .. //depot/projects/davidxu_thread/src/usr.bin/nl/nl.c#2 integrate .. //depot/projects/davidxu_thread/src/usr.bin/sed/process.c#2 integrate .. //depot/projects/davidxu_thread/src/usr.bin/systat/mbufs.c#2 integrate .. //depot/projects/davidxu_thread/src/usr.bin/tr/tr.c#2 integrate .. //depot/projects/davidxu_thread/src/usr.bin/whereis/whereis.c#3 integrate .. //depot/projects/davidxu_thread/src/usr.sbin/mountd/mountd.c#3 integrate .. //depot/projects/davidxu_thread/src/usr.sbin/pstat/pstat.c#4 integrate .. //depot/projects/davidxu_thread/src/usr.sbin/pw/cpdir.c#2 integrate .. //depot/projects/davidxu_thread/src/usr.sbin/quot/quot.c#2 integrate .. //depot/projects/davidxu_thread/src/usr.sbin/sliplogin/sliplogin.c#2 integrate Differences ... ==== //depot/projects/davidxu_thread/src/lib/libc/amd64/string/Makefile.inc#3 (text+ko) ==== @@ -1,3 +1,4 @@ -# $FreeBSD: src/lib/libc/amd64/string/Makefile.inc,v 1.2 2005/04/08 05:15:55 alc Exp $ +# $FreeBSD: src/lib/libc/amd64/string/Makefile.inc,v 1.3 2005/04/09 20:47:08 alc Exp $ -MDSRCS+= bcmp.S bcopy.S bzero.S memcmp.S memcpy.S memmove.S memset.S +MDSRCS+= bcmp.S bcopy.S bzero.S memcmp.S memcpy.S memmove.S memset.S \ + strcmp.S ==== //depot/projects/davidxu_thread/src/lib/libc/net/name6.c#5 (text+ko) ==== @@ -88,10 +88,12 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/net/name6.c,v 1.43 2005/04/06 15:36:34 ume Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/name6.c,v 1.44 2005/04/09 14:20:18 ume Exp $"); #include "namespace.h" +#if defined(YP) || defined(ICMPNL) #include "reentrant.h" +#endif #include <sys/param.h> #include <sys/socket.h> #include <sys/time.h> @@ -235,9 +237,11 @@ * XXX: Many dependencies are not thread-safe. Still, we cannot use * getipnodeby*() in conjunction with other functions which call them. */ +#if defined(YP) || defined(ICMPNL) static mutex_t _getipnodeby_thread_lock = MUTEX_INITIALIZER; #define THREAD_LOCK() mutex_lock(&_getipnodeby_thread_lock); #define THREAD_UNLOCK() mutex_unlock(&_getipnodeby_thread_lock); +#endif /* Host lookup order if nsswitch.conf is broken or nonexistant */ static const ns_src default_src[] = { ==== //depot/projects/davidxu_thread/src/share/man/man4/inet.4#3 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93 -.\" $FreeBSD: src/share/man/man4/inet.4,v 1.35 2005/01/21 10:29:12 ru Exp $ +.\" $FreeBSD: src/share/man/man4/inet.4,v 1.36 2005/04/09 08:44:57 maxim Exp $ .\" -.Dd October 23, 2004 +.Dd April 9, 2005 .Dt INET 4 .Os .Sh NAME @@ -248,6 +248,15 @@ cycle greatly. Default is 0 (sequential IP IDs). IPv6 flow IDs and fragment IDs are always random. +.It Va ip.maxfragpackets +Integer: maximum number of fragmented packets the host will accept and hold +in the reassembling queue simultaneously. +0 means that the host will not accept any fragmented packets. +\-1 means that the host will accept as many fragmented packets as it receives. +.It Va ip.maxfragsperpacket +Integer: maximum number of fragments the host will accept and hold +in the reassembling queue for a packet. +0 means that the host will not accept any fragmented packets. .El .Sh SEE ALSO .Xr ioctl 2 , ==== //depot/projects/davidxu_thread/src/share/man/man4/sched_4bsd.4#2 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/sched_4bsd.4,v 1.1 2005/04/07 21:57:19 rwatson Exp $ +.\" $FreeBSD: src/share/man/man4/sched_4bsd.4,v 1.2 2005/04/09 08:47:38 joel Exp $ .\" .Dd April 7, 2005 .Os @@ -68,5 +68,5 @@ .Sh BUGS While a highly robust and time-tested scheduler, .Nm -lacks specific knowledge of how to schedule advantageously in non-symetric +lacks specific knowledge of how to schedule advantageously in non-symmetric processor configurations, such as hyper-threading. ==== //depot/projects/davidxu_thread/src/share/man/man4/witness.4#3 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/witness.4,v 1.7 2004/11/26 13:54:56 simon Exp $ +.\" $FreeBSD: src/share/man/man4/witness.4,v 1.8 2005/04/09 14:09:54 alfred Exp $ .\" .Dd February 18, 2001 .Dt WITNESS 4 @@ -91,6 +91,16 @@ set via the read-only sysctl .Va debug.witness.skipspin . .Pp +The sysctl +.Va debug.witness.watch +specifies the level of witness involvment in the system. A value of +1 specifies that witness is enabled. A value of 0 specifies that +witness is disabled. This sysctl can be written to in order to +disable witness, however it may not be used to enable witness. +.Va debug.witness.watch +can be set via +.Xr loader 8 . +.Pp The .Nm code also provides two extra ==== //depot/projects/davidxu_thread/src/share/man/man9/Makefile#8 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/man/man9/Makefile,v 1.255 2005/04/07 17:27:14 njl Exp $ +# $FreeBSD: src/share/man/man9/Makefile,v 1.256 2005/04/09 18:38:54 pjd Exp $ MAN= accept_filter.9 \ accf_data.9 \ @@ -416,6 +416,20 @@ critical_enter.9 cpu_critical_exit.9 \ critical_enter.9 critical_exit.9 \ critical_enter.9 critical.9 +MLINKS+=crypto.9 crypto_get_driverid.9 \ + crypto.9 crypto_register.9 \ + crypto.9 crypto_kregister.9 \ + crypto.9 crypto_unregister.9 \ + crypto.9 crypto_unregister_all.9 \ + crypto.9 crypto_done.9 \ + crypto.9 crypto_kdone.9 \ + crypto.9 crypto_newsession.9 \ + crypto.9 crypto_freesession.9 \ + crypto.9 crypto_dispatch.9 \ + crypto.9 crypto_kdispatch.9 \ + crypto.9 crypto_unblock.9 \ + crypto.9 crypto_getreq.9 \ + crypto.9 crypto_freereq.9 MLINKS+=devclass_add_driver.9 devclass_delete_driver.9 \ devclass_add_driver.9 devclass_find_driver.9 MLINKS+=device_add_child.9 device_add_child_ordered.9 ==== //depot/projects/davidxu_thread/src/sys/alpha/alpha/interrupt.c#4 (text+ko) ==== @@ -33,7 +33,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ /* __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.23 1998/02/24 07:38:01 thorpej Exp $");*/ -__FBSDID("$FreeBSD: src/sys/alpha/alpha/interrupt.c,v 1.84 2005/01/05 20:05:49 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/interrupt.c,v 1.85 2005/04/09 18:15:17 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -436,7 +436,7 @@ critical_enter(); ih->ih_handler(ih->ih_argument); /* XXX */ - curthread->td_pflags &= ~TDP_OWEPREEMPT; + curthread->td_owepreempt = 0; critical_exit(); return; } ==== //depot/projects/davidxu_thread/src/sys/amd64/conf/NOTES#6 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.27 2005/03/31 20:21:42 scottl Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.28 2005/04/08 20:24:45 obrien Exp $ # # @@ -21,11 +21,6 @@ ##################################################################### # SMP OPTIONS: # -# The apic device enables the use of the I/O APIC for interrupt delivery. -# The apic device can be used in both UP and SMP kernels, but is required -# for SMP kernels. Thus, the apic device is not strictly an SMP option, -# but it is a prerequisite for SMP. -# # Notes: # # By default, mixed mode is used to route IRQ0 from the AT timer via ==== //depot/projects/davidxu_thread/src/sys/boot/i386/libi386/vidconsole.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/vidconsole.c,v 1.19 2003/08/25 23:28:31 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/vidconsole.c,v 1.20 2005/04/09 14:07:13 stefanf Exp $"); #include <stand.h> #include <bootstrap.h> @@ -358,7 +358,7 @@ } static void -get_arg(c) +get_arg(int c) { if (argc < 0) ==== //depot/projects/davidxu_thread/src/sys/kern/subr_witness.c#5 (text+ko) ==== @@ -82,7 +82,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/subr_witness.c,v 1.189 2005/03/09 21:38:53 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_witness.c,v 1.191 2005/04/09 13:32:01 pjd Exp $"); #include "opt_ddb.h" #include "opt_witness.h" @@ -323,6 +323,7 @@ { "bpf global lock", &lock_class_mtx_sleep }, { "bpf interface lock", &lock_class_mtx_sleep }, { "bpf cdev lock", &lock_class_mtx_sleep }, + { NULL, NULL }, /* * NFS server */ @@ -330,6 +331,12 @@ { "so_snd", &lock_class_mtx_sleep }, { NULL, NULL }, /* + * CDEV + */ + { "cdev", &lock_class_mtx_sleep }, + { "system map", &lock_class_mtx_sleep }, + { NULL, NULL }, + /* * spin locks */ #ifdef SMP ==== //depot/projects/davidxu_thread/src/sys/kern/vfs_lookup.c#7 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.77 2005/04/05 08:58:49 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.78 2005/04/09 11:53:16 jeff Exp $"); #include "opt_ktrace.h" #include "opt_mac.h" @@ -118,7 +118,6 @@ struct componentname *cnp = &ndp->ni_cnd; struct thread *td = cnp->cn_thread; struct proc *p = td->td_proc; - struct mount *mp; int vfslocked; ndp->ni_cnd.cn_cred = ndp->ni_cnd.cn_thread->td_ucred; @@ -229,8 +228,6 @@ ndp->ni_cnd.cn_flags |= GIANTHELD; return (0); } - if ((cnp->cn_flags & LOCKPARENT) && ndp->ni_pathlen == 1) - VOP_UNLOCK(ndp->ni_dvp, 0, td); if (ndp->ni_loopcnt++ >= MAXSYMLINKS) { error = ELOOP; break; @@ -290,11 +287,10 @@ cnp->cn_pnbuf = NULL; cnp->cn_nameptr = NULL; #endif + vput(ndp->ni_vp); + ndp->ni_vp = NULL; vrele(ndp->ni_dvp); - mp = ndp->ni_vp->v_mount; - vput(ndp->ni_vp); VFS_UNLOCK_GIANT(vfslocked); - ndp->ni_vp = NULL; return (error); } @@ -498,12 +494,12 @@ goto bad; } tdp = dp; + dp = dp->v_mount->mnt_vnodecovered; tvfslocked = vfslocked; - dp = dp->v_mount->mnt_vnodecovered; + vfslocked = VFS_LOCK_GIANT(dp->v_mount); + VREF(dp); vput(tdp); - vfslocked = VFS_LOCK_GIANT(dp->v_mount); VFS_UNLOCK_GIANT(tvfslocked); - VREF(dp); vn_lock(dp, cnp->cn_lkflags | LK_RETRY, td); } } @@ -548,12 +544,12 @@ (dp->v_vflag & VV_ROOT) && (dp->v_mount != NULL) && (dp->v_mount->mnt_flag & MNT_UNION)) { tdp = dp; + dp = dp->v_mount->mnt_vnodecovered; tvfslocked = vfslocked; - dp = dp->v_mount->mnt_vnodecovered; + vfslocked = VFS_LOCK_GIANT(dp->v_mount); + VREF(dp); vput(tdp); - vfslocked = VFS_LOCK_GIANT(dp->v_mount); VFS_UNLOCK_GIANT(tvfslocked); - VREF(dp); vn_lock(dp, cnp->cn_lkflags | LK_RETRY, td); goto unionlookup; } @@ -596,22 +592,11 @@ printf("found\n"); #endif /* - * In the DOTDOT case dp is unlocked, we may have to relock it if - * this is the parent of the last component. Otherwise, we have to - * unlock if this is not the last component, or if it is and - * LOCKPARENT is set. + * In the DOTDOT case dp is unlocked, we relock it here even if we + * may not need it to simplify the code below. */ - if (cnp->cn_flags & ISDOTDOT) { - if ((cnp->cn_flags & (ISLASTCN | LOCKPARENT)) == - (ISLASTCN | LOCKPARENT)) - vn_lock(dp, LK_EXCLUSIVE | LK_RETRY, td); - } else if (dp != ndp->ni_vp) { - if ((cnp->cn_flags & (ISLASTCN | LOCKPARENT)) == ISLASTCN) - VOP_UNLOCK(dp, 0, td); - else if ((cnp->cn_flags & ISLASTCN) == 0) - VOP_UNLOCK(dp, 0, td); - } - + if (cnp->cn_flags & ISDOTDOT) + vn_lock(dp, LK_EXCLUSIVE | LK_RETRY, td); /* * Take into account any additional components consumed by * the underlying filesystem. @@ -631,21 +616,20 @@ */ while (dp->v_type == VDIR && (mp = dp->v_mountedhere) && (cnp->cn_flags & NOCROSSMOUNT) == 0) { + KASSERT(dp != ndp->ni_dvp, ("XXX")); if (vfs_busy(mp, 0, 0, td)) continue; - VOP_UNLOCK(dp, 0, td); + vput(dp); tvfslocked = VFS_LOCK_GIANT(mp); + VFS_UNLOCK_GIANT(vfslocked); + vfslocked = tvfslocked; error = VFS_ROOT(mp, cnp->cn_lkflags, &tdp, td); vfs_unbusy(mp, td); if (error) { - VFS_UNLOCK_GIANT(tvfslocked); dpunlocked = 1; goto bad2; } - vrele(dp); - VFS_UNLOCK_GIANT(vfslocked); ndp->ni_vp = dp = tdp; - vfslocked = tvfslocked; } /* @@ -665,6 +649,11 @@ error = EACCES; goto bad2; } + /* + * Symlink code always expects an unlocked dvp. + */ + if (ndp->ni_dvp != ndp->ni_vp) + VOP_UNLOCK(ndp->ni_dvp, 0, td); goto success; } @@ -689,9 +678,10 @@ cnp->cn_nameptr++; ndp->ni_pathlen--; } - if (ndp->ni_dvp != ndp->ni_vp) - ASSERT_VOP_UNLOCKED(ndp->ni_dvp, "lookup"); - vrele(ndp->ni_dvp); + if (ndp->ni_dvp != dp) + vput(ndp->ni_dvp); + else + vrele(ndp->ni_dvp); goto dirloop; } /* @@ -706,8 +696,13 @@ ndp->ni_startdir = ndp->ni_dvp; VREF(ndp->ni_startdir); } - if (!wantparent) - vrele(ndp->ni_dvp); + if (!wantparent) { + if (ndp->ni_dvp != dp) + vput(ndp->ni_dvp); + else + vrele(ndp->ni_dvp); + } else if ((cnp->cn_flags & LOCKPARENT) == 0 && ndp->ni_dvp != dp) + VOP_UNLOCK(ndp->ni_dvp, 0, td); if ((cnp->cn_flags & LOCKLEAF) == 0) VOP_UNLOCK(dp, 0, td); @@ -717,14 +712,12 @@ return (0); bad2: - if ((cnp->cn_flags & LOCKPARENT) && *ndp->ni_next == '\0') + if (dp != ndp->ni_dvp) vput(ndp->ni_dvp); else vrele(ndp->ni_dvp); bad: - if (dpunlocked) - vrele(dp); - else + if (!dpunlocked) vput(dp); VFS_UNLOCK_GIANT(vfslocked); ndp->ni_cnd.cn_flags &= ~GIANTHELD; @@ -887,29 +880,45 @@ struct nameidata *ndp; const u_int flags; { + int unlock_dvp; + int unlock_vp; + + unlock_dvp = 0; + unlock_vp = 0; if (!(flags & NDF_NO_FREE_PNBUF) && (ndp->ni_cnd.cn_flags & HASBUF)) { uma_zfree(namei_zone, ndp->ni_cnd.cn_pnbuf); ndp->ni_cnd.cn_flags &= ~HASBUF; } + if (!(flags & NDF_NO_VP_UNLOCK) && + (ndp->ni_cnd.cn_flags & LOCKLEAF) && ndp->ni_vp) + unlock_vp = 1; + if (!(flags & NDF_NO_VP_RELE) && ndp->ni_vp) { + if (unlock_vp) { + vput(ndp->ni_vp); + unlock_vp = 0; + } else + vrele(ndp->ni_vp); + ndp->ni_vp = NULL; + } + if (unlock_vp) + VOP_UNLOCK(ndp->ni_vp, 0, ndp->ni_cnd.cn_thread); if (!(flags & NDF_NO_DVP_UNLOCK) && (ndp->ni_cnd.cn_flags & LOCKPARENT) && ndp->ni_dvp != ndp->ni_vp) - VOP_UNLOCK(ndp->ni_dvp, 0, ndp->ni_cnd.cn_thread); + unlock_dvp = 1; if (!(flags & NDF_NO_DVP_RELE) && (ndp->ni_cnd.cn_flags & (LOCKPARENT|WANTPARENT))) { - vrele(ndp->ni_dvp); + if (unlock_dvp) { + vput(ndp->ni_dvp); + unlock_dvp = 0; + } else + vrele(ndp->ni_dvp); ndp->ni_dvp = NULL; } - if (!(flags & NDF_NO_VP_UNLOCK) && - (ndp->ni_cnd.cn_flags & LOCKLEAF) && ndp->ni_vp) - VOP_UNLOCK(ndp->ni_vp, 0, ndp->ni_cnd.cn_thread); - if (!(flags & NDF_NO_VP_RELE) && - ndp->ni_vp) { - vrele(ndp->ni_vp); - ndp->ni_vp = NULL; - } + if (unlock_dvp) + VOP_UNLOCK(ndp->ni_dvp, 0, ndp->ni_cnd.cn_thread); if (!(flags & NDF_NO_STARTDIR_RELE) && (ndp->ni_cnd.cn_flags & SAVESTART)) { vrele(ndp->ni_startdir); ==== //depot/projects/davidxu_thread/src/sys/kern/vfs_syscalls.c#6 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.376 2005/03/24 07:31:38 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.377 2005/04/09 12:04:36 jeff Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -1402,7 +1402,7 @@ int error; bwillwrite(); - NDINIT(&nd, LOOKUP, FOLLOW | NOOBJ | MPSAFE, segflg, path, td); + NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, segflg, path, td); if ((error = namei(&nd)) != 0) return (error); vfslocked = NDHASGIANT(&nd); @@ -1418,7 +1418,7 @@ VFS_UNLOCK_GIANT(vfslocked); return (error); } - NDINIT(&nd, CREATE, LOCKPARENT | NOOBJ | SAVENAME, segflg, link, td); + NDINIT(&nd, CREATE, LOCKPARENT | SAVENAME, segflg, link, td); if ((error = namei(&nd)) == 0) { lvfslocked = NDHASGIANT(&nd); if (nd.ni_vp != NULL) { @@ -1494,7 +1494,7 @@ } restart: bwillwrite(); - NDINIT(&nd, CREATE, LOCKPARENT | NOOBJ | SAVENAME | MPSAFE, + NDINIT(&nd, CREATE, LOCKPARENT | SAVENAME | MPSAFE, segflg, link, td); if ((error = namei(&nd)) != 0) goto out; @@ -1878,8 +1878,7 @@ tmpcred->cr_uid = cred->cr_ruid; tmpcred->cr_groups[0] = cred->cr_rgid; td->td_ucred = tmpcred; - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | NOOBJ | MPSAFE, pathseg, - path, td); + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE, pathseg, path, td); if ((error = namei(&nd)) != 0) goto out1; vfslocked = NDHASGIANT(&nd); @@ -1917,7 +1916,7 @@ int vfslocked; int error; - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | NOOBJ | MPSAFE, UIO_USERSPACE, + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE, UIO_USERSPACE, uap->path, td); if ((error = namei(&nd)) != 0) return (error); @@ -2052,7 +2051,7 @@ struct stat sb; int error, vfslocked; - NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | NOOBJ | MPSAFE, + NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | MPSAFE, pathseg, path, td); if ((error = namei(&nd)) != 0) return (error); @@ -2101,7 +2100,7 @@ struct nameidata nd; int error, vfslocked; - NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED | NOOBJ | MPSAFE, + NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED | MPSAFE, pathseg, path, td); if ((error = namei(&nd)) != 0) return (error); @@ -2226,8 +2225,7 @@ struct nameidata nd; int error, vfslocked; - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | NOOBJ | MPSAFE, pathseg, path, - td); + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE, pathseg, path, td); if ((error = namei(&nd)) != 0) return (error); vfslocked = NDHASGIANT(&nd); @@ -2278,8 +2276,7 @@ struct nameidata nd; int vfslocked; - NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | NOOBJ | MPSAFE, - pathseg, path, td); + NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | MPSAFE, pathseg, path, td); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -3211,7 +3208,7 @@ goto out1; } NDINIT(&tond, RENAME, LOCKPARENT | LOCKLEAF | NOCACHE | SAVESTART | - NOOBJ | MPSAFE, pathseg, to, td); + MPSAFE, pathseg, to, td); if (fromnd.ni_vp->v_type == VDIR) tond.ni_cnd.cn_flags |= WILLBEDIR; if ((error = namei(&tond)) != 0) { ==== //depot/projects/davidxu_thread/src/sys/powerpc/powerpc/machdep.c#9 (text+ko) ==== @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/powerpc/powerpc/machdep.c,v 1.88 2005/04/04 21:53:55 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/powerpc/powerpc/machdep.c,v 1.89 2005/04/08 14:26:55 jhb Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -742,7 +742,7 @@ #ifdef INVARIANTS if ((mfmsr() & PSL_EE) != PSL_EE) { struct thread *td = curthread; - printf("td crit %x\n", td->td_md.md_savecrit); + printf("td msr %x\n", td->td_md.md_saved_msr); panic("ints disabled in idleproc!"); } #endif ==== //depot/projects/davidxu_thread/src/sys/sys/namei.h#4 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)namei.h 8.5 (Berkeley) 1/9/95 - * $FreeBSD: src/sys/sys/namei.h,v 1.45 2005/03/29 10:04:25 jeff Exp $ + * $FreeBSD: src/sys/sys/namei.h,v 1.46 2005/04/09 12:04:35 jeff Exp $ */ #ifndef _SYS_NAMEI_H_ @@ -105,7 +105,6 @@ #define WANTPARENT 0x0010 /* want parent vnode returned unlocked */ #define NOCACHE 0x0020 /* name must not be left in cache */ #define FOLLOW 0x0040 /* follow symbolic links */ -#define NOOBJ 0x0080 /* don't create object */ #define LOCKSHARED 0x0100 /* Shared lock leaf */ #define NOFOLLOW 0x0000 /* do not follow symbolic links (pseudo) */ #define MODMASK 0x01fc /* mask of operational modifiers */ ==== //depot/projects/davidxu_thread/src/usr.bin/calendar/calendars/calendar.freebsd#10 (text+ko) ==== @@ -1,7 +1,7 @@ /* * FreeBSD * - * $FreeBSD: src/usr.bin/calendar/calendars/calendar.freebsd,v 1.158 2005/03/31 23:15:14 cperciva Exp $ + * $FreeBSD: src/usr.bin/calendar/calendars/calendar.freebsd,v 1.159 2005/04/08 09:04:29 joel Exp $ */ #ifndef _calendar_freebsd_ @@ -192,6 +192,7 @@ 10/17 Maho NAKATA <maho@FreeBSD.org> born in Osaka, Japan, 1974 10/18 Sheldon Hearn <sheldonh@FreeBSD.org> born in Cape Town, Western Cape, South Africa, 1974 10/19 Nicholas Souchu <nsouch@FreeBSD.org> born in Suresnes, Hauts-de-Seine, France, 1972 +10/20 Joel Dahl <joel@FreeBSD.org> born in Lidkoping, Sweden, 1983 10/21 Dan Moschuk <dan@FreeBSD.org> born in Halifax, Nova Scotia, Canada, 1980 10/21 Ben Smithurst <ben@FreeBSD.org> born in Sheffield, South Yorkshire, United Kingdom, 1981 10/22 Jean-Sebastien Pedron <dumbbell@FreeBSD.org> born in Redon, Ille-et-Vilaine, France, 1980 ==== //depot/projects/davidxu_thread/src/usr.bin/du/du.c#3 (text+ko) ==== @@ -46,7 +46,7 @@ #endif #endif /* not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/usr.bin/du/du.c,v 1.37 2005/01/07 00:12:24 pjd Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/du/du.c,v 1.38 2005/04/09 14:31:40 stefanf Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -307,7 +307,7 @@ struct links_entry *le, **new_buckets; struct stat *st; size_t i, new_size; - int count, hash; + int hash; st = p->fts_statp; @@ -325,7 +325,6 @@ if (number_entries > number_buckets * 10 && !stop_allocating) { new_size = number_buckets * 2; new_buckets = malloc(new_size * sizeof(struct links_entry *)); - count = 0; /* Try releasing the free list to see if that helps. */ if (new_buckets == NULL && free_list != NULL) { ==== //depot/projects/davidxu_thread/src/usr.bin/id/id.c#2 (text+ko) ==== @@ -43,7 +43,7 @@ #endif #endif /* not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/usr.bin/id/id.c,v 1.22 2004/10/02 11:40:48 stefanf Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/id/id.c,v 1.23 2005/04/09 14:31:40 stefanf Exp $"); #include <sys/param.h> #include <sys/mac.h> @@ -379,10 +379,9 @@ void pline(struct passwd *pw) { - u_int rid; if (!pw) { - if ((pw = getpwuid(rid = getuid())) == NULL) + if ((pw = getpwuid(getuid())) == NULL) err(1, "getpwuid"); } ==== //depot/projects/davidxu_thread/src/usr.bin/nl/nl.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ __COPYRIGHT( "@(#) Copyright (c) 1999\ The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$FreeBSD: src/usr.bin/nl/nl.c,v 1.9 2004/07/13 02:18:21 tjr Exp $"); +__RCSID("$FreeBSD: src/usr.bin/nl/nl.c,v 1.10 2005/04/09 14:31:41 stefanf Exp $"); #endif #include <sys/types.h> @@ -144,7 +144,7 @@ int argc; char *argv[]; { - int c, n; + int c; long val; unsigned long uval; char *ep; ==== //depot/projects/davidxu_thread/src/usr.bin/sed/process.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/usr.bin/sed/process.c,v 1.38 2004/08/09 15:29:41 dds Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/sed/process.c,v 1.39 2005/04/09 14:31:41 stefanf Exp $"); #ifndef lint static const char sccsid[] = "@(#)process.c 8.6 (Berkeley) 4/20/94"; @@ -92,9 +92,8 @@ { struct s_command *cp; SPACE tspace; - size_t len, oldpsl = 0; + size_t oldpsl = 0; char *p; - char nc; p = NULL; ==== //depot/projects/davidxu_thread/src/usr.bin/systat/mbufs.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/usr.bin/systat/mbufs.c,v 1.17 2004/05/31 21:46:06 bmilekic Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/systat/mbufs.c,v 1.18 2005/04/09 14:31:41 stefanf Exp $"); #ifdef lint static const char sccsid[] = "@(#)mbufs.c 8.1 (Berkeley) 6/6/93"; @@ -168,7 +168,6 @@ int initmbufs() { - int i; size_t len; len = sizeof *mbstat; ==== //depot/projects/davidxu_thread/src/usr.bin/tr/tr.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/usr.bin/tr/tr.c,v 1.23 2004/07/09 05:15:46 tjr Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/tr/tr.c,v 1.24 2005/04/09 14:31:41 stefanf Exp $"); #ifndef lint static const char copyright[] = @@ -76,7 +76,7 @@ struct cset *delete, *squeeze; int n, *p; int Cflag, cflag, dflag, sflag, isstring2; - wint_t ch, cnt, i, lastch; + wint_t ch, cnt, lastch; (void)setlocale(LC_ALL, ""); ==== //depot/projects/davidxu_thread/src/usr.bin/whereis/whereis.c#3 (text+ko) ==== @@ -32,7 +32,7 @@ #include <sys/types.h> -__FBSDID("$FreeBSD: src/usr.bin/whereis/whereis.c,v 1.14 2005/02/10 16:07:23 ru Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/whereis/whereis.c,v 1.15 2005/04/09 14:31:41 stefanf Exp $"); #include <sys/stat.h> #include <sys/sysctl.h> @@ -102,10 +102,9 @@ void scanopts(int argc, char **argv) { - int c, i, opt_f; + int c, i; ccharp **dirlist; - opt_f = 0; while ((c = getopt(argc, argv, "BMSabfmqsux")) != -1) switch (c) { case 'B': ==== //depot/projects/davidxu_thread/src/usr.sbin/mountd/mountd.c#3 (text+ko) ==== @@ -43,7 +43,7 @@ #endif #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/usr.sbin/mountd/mountd.c,v 1.79 2004/12/11 12:51:20 phk Exp $"); +__FBSDID("$FreeBSD: src/usr.sbin/mountd/mountd.c,v 1.80 2005/04/09 14:59:09 stefanf Exp $"); #include <sys/param.h> #include <sys/mount.h> @@ -568,7 +568,6 @@ struct fhreturn fhr; struct stat stb; struct statfs fsb; - struct addrinfo *ai; char host[NI_MAXHOST], numerichost[NI_MAXHOST]; int lookup_failed = 1; struct sockaddr *saddr; @@ -595,7 +594,6 @@ NULL, 0, 0); getnameinfo(saddr, saddr->sa_len, numerichost, sizeof numerichost, NULL, 0, NI_NUMERICHOST); - ai = NULL; switch (rqstp->rq_proc) { case NULLPROC: if (!svc_sendreply(transp, (xdrproc_t)xdr_void, NULL)) ==== //depot/projects/davidxu_thread/src/usr.sbin/pstat/pstat.c#4 (text+ko) ==== @@ -46,7 +46,7 @@ #endif /* not lint */ #endif #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/usr.sbin/pstat/pstat.c,v 1.94 2005/03/21 18:11:31 keramida Exp $"); +__FBSDID("$FreeBSD: src/usr.sbin/pstat/pstat.c,v 1.95 2005/04/09 14:59:10 stefanf Exp $"); #include <sys/param.h> #include <sys/time.h> @@ -336,7 +336,6 @@ ttyprt(struct xtty *xt) { int i, j; - pid_t pgid; char *name, state[20]; if (xt->xt_size != sizeof *xt) @@ -357,7 +356,6 @@ state[j++] = '-'; state[j] = '\0'; (void)printf("%-6s %8d", state, xt->xt_sid); - pgid = 0; (void)printf("%6d ", xt->xt_pgid); switch (xt->xt_line) { case TTYDISC: ==== //depot/projects/davidxu_thread/src/usr.sbin/pw/cpdir.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ #ifndef lint static const char rcsid[] = - "$FreeBSD: src/usr.sbin/pw/cpdir.c,v 1.6 2000/07/13 23:52:49 davidn Exp $"; + "$FreeBSD: src/usr.sbin/pw/cpdir.c,v 1.7 2005/04/09 14:59:10 stefanf Exp $"; #endif /* not lint */ #include <err.h> @@ -46,7 +46,6 @@ void copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid) { - int rc = 0; char src[MAXPATHLEN]; char dst[MAXPATHLEN]; @@ -61,9 +60,7 @@ ++counter; chown(dir, uid, gid); - if (skel == NULL || *skel == '\0') - rc = 1; - else { + if (skel != NULL && *skel != '\0') { DIR *d = opendir(skel); if (d != NULL) { ==== //depot/projects/davidxu_thread/src/usr.sbin/quot/quot.c#2 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/usr.sbin/quot/quot.c,v 1.22 2003/05/03 21:06:38 obrien Exp $"); +__FBSDID("$FreeBSD: src/usr.sbin/quot/quot.c,v 1.23 2005/04/09 14:59:10 stefanf Exp $"); #include <sys/param.h> #include <sys/stdint.h> @@ -477,7 +477,7 @@ char *name; { int c; - ino_t inode, inode1; + ino_t inode; ino_t maxino; union dinode *dp; @@ -486,7 +486,6 @@ while ((c = getchar()) != EOF && (c < '0' || c > '9')) while ((c = getchar()) != EOF && c != '\n'); ungetc(c,stdin); - inode1 = -1; while (scanf("%u",&inode) == 1) { if (inode > maxino) { warnx("illegal inode %d",inode); @@ -504,7 +503,6 @@ c = getchar(); } putchar('\n'); - inode1 = inode; } else { if (errno) { err(1, "%s", name); ==== //depot/projects/davidxu_thread/src/usr.sbin/sliplogin/sliplogin.c#2 (text+ko) ==== @@ -35,7 +35,7 @@ #ifndef lint static char sccsid[] = "@(#)sliplogin.c 8.2 (Berkeley) 2/1/94"; -static char rscid[] = "@(#)$FreeBSD: src/usr.sbin/sliplogin/sliplogin.c,v 1.15 2004/08/07 04:28:55 imp Exp $"; +static char rscid[] = "@(#)$FreeBSD: src/usr.sbin/sliplogin/sliplogin.c,v 1.16 2005/04/09 15:00:51 stefanf Exp $"; #endif /* not lint */ /* @@ -370,9 +370,8 @@ { int fd, s, ldisc; char *name; - struct termios tios, otios; + struct termios tios; char logincmd[2*BUFSIZ+32]; - extern uid_t getuid(); FILE *pidfile; /* pid file */ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504121125.j3CBPgwt023812>