From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 00:04:25 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EF6D10656A5; Sun, 22 Aug 2010 00:04:25 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EFC428FC17; Sun, 22 Aug 2010 00:04:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7M04OqB084584; Sun, 22 Aug 2010 00:04:24 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7M04O4V084577; Sun, 22 Aug 2010 00:04:24 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201008220004.o7M04O4V084577@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 22 Aug 2010 00:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211595 - in stable/8/sys: conf powerpc/aim powerpc/booke powerpc/include powerpc/powerpc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 00:04:25 -0000 Author: nwhitehorn Date: Sun Aug 22 00:04:24 2010 New Revision: 211595 URL: http://svn.freebsd.org/changeset/base/211595 Log: MFC r209950: Unify ABI-related bits of the Book-E and AIM machdep routines (exec_setregs, etc.) in order to simplify the addition of 64-bit support, and possible future extension of the Book-E code to handle hard floating point and Altivec. Added: stable/8/sys/powerpc/powerpc/exec_machdep.c - copied, changed from r209950, head/sys/powerpc/powerpc/exec_machdep.c Modified: stable/8/sys/conf/files.powerpc stable/8/sys/powerpc/aim/machdep.c stable/8/sys/powerpc/aim/vm_machdep.c stable/8/sys/powerpc/booke/machdep.c stable/8/sys/powerpc/booke/vm_machdep.c stable/8/sys/powerpc/include/psl.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cam/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/conf/files.powerpc ============================================================================== --- stable/8/sys/conf/files.powerpc Sat Aug 21 23:13:16 2010 (r211594) +++ stable/8/sys/conf/files.powerpc Sun Aug 22 00:04:24 2010 (r211595) @@ -157,6 +157,7 @@ powerpc/powerpc/db_interface.c optional powerpc/powerpc/db_trace.c optional ddb powerpc/powerpc/dump_machdep.c standard powerpc/powerpc/elf_machdep.c standard +powerpc/powerpc/exec_machdep.c standard powerpc/powerpc/fpu.c optional aim powerpc/powerpc/fuswintr.c standard powerpc/powerpc/gdb_machdep.c optional gdb Modified: stable/8/sys/powerpc/aim/machdep.c ============================================================================== --- stable/8/sys/powerpc/aim/machdep.c Sat Aug 21 23:13:16 2010 (r211594) +++ stable/8/sys/powerpc/aim/machdep.c Sun Aug 22 00:04:24 2010 (r211595) @@ -154,8 +154,6 @@ void install_extint(void (*)(void)); int setfault(faultbuf); /* defined in locore.S */ -static int grab_mcontext(struct thread *, mcontext_t *, int); - void asm_panic(char *); long Maxmem = 0; @@ -579,295 +577,6 @@ bzero(void *buf, size_t len) } void -sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) -{ - struct trapframe *tf; - struct sigframe *sfp; - struct sigacts *psp; - struct sigframe sf; - struct thread *td; - struct proc *p; - int oonstack, rndfsize; - int sig; - int code; - - td = curthread; - p = td->td_proc; - PROC_LOCK_ASSERT(p, MA_OWNED); - sig = ksi->ksi_signo; - code = ksi->ksi_code; - psp = p->p_sigacts; - mtx_assert(&psp->ps_mtx, MA_OWNED); - tf = td->td_frame; - oonstack = sigonstack(tf->fixreg[1]); - - rndfsize = ((sizeof(sf) + 15) / 16) * 16; - - CTR4(KTR_SIG, "sendsig: td=%p (%s) catcher=%p sig=%d", td, p->p_comm, - catcher, sig); - - /* - * Save user context - */ - memset(&sf, 0, sizeof(sf)); - grab_mcontext(td, &sf.sf_uc.uc_mcontext, 0); - sf.sf_uc.uc_sigmask = *mask; - sf.sf_uc.uc_stack = td->td_sigstk; - sf.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK) - ? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE; - - sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; - - /* - * Allocate and validate space for the signal handler context. - */ - if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && - SIGISMEMBER(psp->ps_sigonstack, sig)) { - sfp = (struct sigframe *)(td->td_sigstk.ss_sp + - td->td_sigstk.ss_size - rndfsize); - } else { - sfp = (struct sigframe *)(tf->fixreg[1] - rndfsize); - } - - /* - * Translate the signal if appropriate (Linux emu ?) - */ - if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; - - /* - * Save the floating-point state, if necessary, then copy it. - */ - /* XXX */ - - /* - * Set up the registers to return to sigcode. - * - * r1/sp - sigframe ptr - * lr - sig function, dispatched to by blrl in trampoline - * r3 - sig number - * r4 - SIGINFO ? &siginfo : exception code - * r5 - user context - * srr0 - trampoline function addr - */ - tf->lr = (register_t)catcher; - tf->fixreg[1] = (register_t)sfp; - tf->fixreg[FIRSTARG] = sig; - tf->fixreg[FIRSTARG+2] = (register_t)&sfp->sf_uc; - if (SIGISMEMBER(psp->ps_siginfo, sig)) { - /* - * Signal handler installed with SA_SIGINFO. - */ - tf->fixreg[FIRSTARG+1] = (register_t)&sfp->sf_si; - - /* - * Fill siginfo structure. - */ - sf.sf_si = ksi->ksi_info; - sf.sf_si.si_signo = sig; - sf.sf_si.si_addr = (void *)((tf->exc == EXC_DSI) ? - tf->cpu.aim.dar : tf->srr0); - } else { - /* Old FreeBSD-style arguments. */ - tf->fixreg[FIRSTARG+1] = code; - tf->fixreg[FIRSTARG+3] = (tf->exc == EXC_DSI) ? - tf->cpu.aim.dar : tf->srr0; - } - mtx_unlock(&psp->ps_mtx); - PROC_UNLOCK(p); - - tf->srr0 = (register_t)(PS_STRINGS - *(p->p_sysent->sv_szsigcode)); - - /* - * copy the frame out to userland. - */ - if (copyout(&sf, sfp, sizeof(*sfp)) != 0) { - /* - * Process has trashed its stack. Kill it. - */ - CTR2(KTR_SIG, "sendsig: sigexit td=%p sfp=%p", td, sfp); - PROC_LOCK(p); - sigexit(td, SIGILL); - } - - CTR3(KTR_SIG, "sendsig: return td=%p pc=%#x sp=%#x", td, - tf->srr0, tf->fixreg[1]); - - PROC_LOCK(p); - mtx_lock(&psp->ps_mtx); -} - -int -sigreturn(struct thread *td, struct sigreturn_args *uap) -{ - ucontext_t uc; - int error; - - CTR2(KTR_SIG, "sigreturn: td=%p ucp=%p", td, uap->sigcntxp); - - if (copyin(uap->sigcntxp, &uc, sizeof(uc)) != 0) { - CTR1(KTR_SIG, "sigreturn: efault td=%p", td); - return (EFAULT); - } - - error = set_mcontext(td, &uc.uc_mcontext); - if (error != 0) - return (error); - - kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); - - CTR3(KTR_SIG, "sigreturn: return td=%p pc=%#x sp=%#x", - td, uc.uc_mcontext.mc_srr0, uc.uc_mcontext.mc_gpr[1]); - - return (EJUSTRETURN); -} - -#ifdef COMPAT_FREEBSD4 -int -freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) -{ - - return sigreturn(td, (struct sigreturn_args *)uap); -} -#endif - -/* - * Construct a PCB from a trapframe. This is called from kdb_trap() where - * we want to start a backtrace from the function that caused us to enter - * the debugger. We have the context in the trapframe, but base the trace - * on the PCB. The PCB doesn't have to be perfect, as long as it contains - * enough for a backtrace. - */ -void -makectx(struct trapframe *tf, struct pcb *pcb) -{ - - pcb->pcb_lr = tf->srr0; - pcb->pcb_sp = tf->fixreg[1]; -} - -/* - * get_mcontext/sendsig helper routine that doesn't touch the - * proc lock - */ -static int -grab_mcontext(struct thread *td, mcontext_t *mcp, int flags) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - - memset(mcp, 0, sizeof(mcontext_t)); - - mcp->mc_vers = _MC_VERSION; - mcp->mc_flags = 0; - memcpy(&mcp->mc_frame, td->td_frame, sizeof(struct trapframe)); - if (flags & GET_MC_CLEAR_RET) { - mcp->mc_gpr[3] = 0; - mcp->mc_gpr[4] = 0; - } - - /* - * This assumes that floating-point context is *not* lazy, - * so if the thread has used FP there would have been a - * FP-unavailable exception that would have set things up - * correctly. - */ - if (pcb->pcb_flags & PCB_FPU) { - KASSERT(td == curthread, - ("get_mcontext: fp save not curthread")); - critical_enter(); - save_fpu(td); - critical_exit(); - mcp->mc_flags |= _MC_FP_VALID; - memcpy(&mcp->mc_fpscr, &pcb->pcb_fpu.fpscr, sizeof(double)); - memcpy(mcp->mc_fpreg, pcb->pcb_fpu.fpr, 32*sizeof(double)); - } - - /* - * Repeat for Altivec context - */ - - if (pcb->pcb_flags & PCB_VEC) { - KASSERT(td == curthread, - ("get_mcontext: fp save not curthread")); - critical_enter(); - save_vec(td); - critical_exit(); - mcp->mc_flags |= _MC_AV_VALID; - mcp->mc_vscr = pcb->pcb_vec.vscr; - mcp->mc_vrsave = pcb->pcb_vec.vrsave; - memcpy(mcp->mc_avec, pcb->pcb_vec.vr, sizeof(mcp->mc_avec)); - } - - mcp->mc_len = sizeof(*mcp); - - return (0); -} - -int -get_mcontext(struct thread *td, mcontext_t *mcp, int flags) -{ - int error; - - error = grab_mcontext(td, mcp, flags); - if (error == 0) { - PROC_LOCK(curthread->td_proc); - mcp->mc_onstack = sigonstack(td->td_frame->fixreg[1]); - PROC_UNLOCK(curthread->td_proc); - } - - return (error); -} - -int -set_mcontext(struct thread *td, const mcontext_t *mcp) -{ - struct pcb *pcb; - struct trapframe *tf; - - pcb = td->td_pcb; - tf = td->td_frame; - - if (mcp->mc_vers != _MC_VERSION || - mcp->mc_len != sizeof(*mcp)) - return (EINVAL); - - /* - * Don't let the user set privileged MSR bits - */ - if ((mcp->mc_srr1 & PSL_USERSTATIC) != (tf->srr1 & PSL_USERSTATIC)) { - return (EINVAL); - } - - memcpy(tf, mcp->mc_frame, sizeof(mcp->mc_frame)); - - if (mcp->mc_flags & _MC_FP_VALID) { - if ((pcb->pcb_flags & PCB_FPU) != PCB_FPU) { - critical_enter(); - enable_fpu(td); - critical_exit(); - } - memcpy(&pcb->pcb_fpu.fpscr, &mcp->mc_fpscr, sizeof(double)); - memcpy(pcb->pcb_fpu.fpr, mcp->mc_fpreg, 32*sizeof(double)); - } - - if (mcp->mc_flags & _MC_AV_VALID) { - if ((pcb->pcb_flags & PCB_VEC) != PCB_VEC) { - critical_enter(); - enable_vec(td); - critical_exit(); - } - pcb->pcb_vec.vscr = mcp->mc_vscr; - pcb->pcb_vec.vrsave = mcp->mc_vrsave; - memcpy(pcb->pcb_vec.vr, mcp->mc_avec, sizeof(mcp->mc_avec)); - } - - - return (0); -} - -void cpu_boot(int howto) { } @@ -929,123 +638,6 @@ cpu_idle_wakeup(int cpu) return (0); } -/* - * Set set up registers on exec. - */ -void -exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings) -{ - struct trapframe *tf; - struct ps_strings arginfo; - - tf = trapframe(td); - bzero(tf, sizeof *tf); - tf->fixreg[1] = -roundup(-stack + 8, 16); - - /* - * XXX Machine-independent code has already copied arguments and - * XXX environment to userland. Get them back here. - */ - (void)copyin((char *)PS_STRINGS, &arginfo, sizeof(arginfo)); - - /* - * Set up arguments for _start(): - * _start(argc, argv, envp, obj, cleanup, ps_strings); - * - * Notes: - * - obj and cleanup are the auxilliary and termination - * vectors. They are fixed up by ld.elf_so. - * - ps_strings is a NetBSD extention, and will be - * ignored by executables which are strictly - * compliant with the SVR4 ABI. - * - * XXX We have to set both regs and retval here due to different - * XXX calling convention in trap.c and init_main.c. - */ - /* - * XXX PG: these get overwritten in the syscall return code. - * execve() should return EJUSTRETURN, like it does on NetBSD. - * Emulate by setting the syscall return value cells. The - * registers still have to be set for init's fork trampoline. - */ - td->td_retval[0] = arginfo.ps_nargvstr; - td->td_retval[1] = (register_t)arginfo.ps_argvstr; - tf->fixreg[3] = arginfo.ps_nargvstr; - tf->fixreg[4] = (register_t)arginfo.ps_argvstr; - tf->fixreg[5] = (register_t)arginfo.ps_envstr; - tf->fixreg[6] = 0; /* auxillary vector */ - tf->fixreg[7] = 0; /* termination vector */ - tf->fixreg[8] = (register_t)PS_STRINGS; /* NetBSD extension */ - - tf->srr0 = entry; - tf->srr1 = PSL_MBO | PSL_USERSET | PSL_FE_DFLT; - td->td_pcb->pcb_flags = 0; -} - -int -fill_regs(struct thread *td, struct reg *regs) -{ - struct trapframe *tf; - - tf = td->td_frame; - memcpy(regs, tf, sizeof(struct reg)); - - return (0); -} - -int -fill_dbregs(struct thread *td, struct dbreg *dbregs) -{ - /* No debug registers on PowerPC */ - return (ENOSYS); -} - -int -fill_fpregs(struct thread *td, struct fpreg *fpregs) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - - if ((pcb->pcb_flags & PCB_FPU) == 0) - memset(fpregs, 0, sizeof(struct fpreg)); - else - memcpy(fpregs, &pcb->pcb_fpu, sizeof(struct fpreg)); - - return (0); -} - -int -set_regs(struct thread *td, struct reg *regs) -{ - struct trapframe *tf; - - tf = td->td_frame; - memcpy(tf, regs, sizeof(struct reg)); - - return (0); -} - -int -set_dbregs(struct thread *td, struct dbreg *dbregs) -{ - /* No debug registers on PowerPC */ - return (ENOSYS); -} - -int -set_fpregs(struct thread *td, struct fpreg *fpregs) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - if ((pcb->pcb_flags & PCB_FPU) == 0) - enable_fpu(td); - memcpy(&pcb->pcb_fpu, fpregs, sizeof(struct fpreg)); - - return (0); -} - int ptrace_set_pc(struct thread *td, unsigned long addr) { Modified: stable/8/sys/powerpc/aim/vm_machdep.c ============================================================================== --- stable/8/sys/powerpc/aim/vm_machdep.c Sat Aug 21 23:13:16 2010 (r211594) +++ stable/8/sys/powerpc/aim/vm_machdep.c Sun Aug 22 00:04:24 2010 (r211595) @@ -358,6 +358,7 @@ sf_buf_free(struct sf_buf *sf) void swi_vm(void *dummy) { + if (busdma_swi_pending != 0) busdma_swi(); } @@ -385,31 +386,6 @@ is_physical_memory(addr) /* * Threading functions */ -void -cpu_thread_exit(struct thread *td) -{ -} - -void -cpu_thread_clean(struct thread *td) -{ -} - -void -cpu_thread_alloc(struct thread *td) -{ - struct pcb *pcb; - - pcb = (struct pcb *)((td->td_kstack + td->td_kstack_pages * PAGE_SIZE - - sizeof(struct pcb)) & ~0x2fU); - td->td_pcb = pcb; - td->td_frame = (struct trapframe *)pcb - 1; -} - -void -cpu_thread_free(struct thread *td) -{ -} void cpu_thread_swapin(struct thread *td) @@ -421,121 +397,3 @@ cpu_thread_swapout(struct thread *td) { } -void -cpu_set_syscall_retval(struct thread *td, int error) -{ - struct proc *p; - struct trapframe *tf; - int fixup; - - if (error == EJUSTRETURN) - return; - - p = td->td_proc; - tf = td->td_frame; - - if (tf->fixreg[0] == SYS___syscall) { - int code = tf->fixreg[FIRSTARG + 1]; - if (p->p_sysent->sv_mask) - code &= p->p_sysent->sv_mask; - fixup = (code != SYS_freebsd6_lseek && code != SYS_lseek) ? - 1 : 0; - } else - fixup = 0; - - switch (error) { - case 0: - if (fixup) { - /* - * 64-bit return, 32-bit syscall. Fixup byte order - */ - tf->fixreg[FIRSTARG] = 0; - tf->fixreg[FIRSTARG + 1] = td->td_retval[0]; - } else { - tf->fixreg[FIRSTARG] = td->td_retval[0]; - tf->fixreg[FIRSTARG + 1] = td->td_retval[1]; - } - tf->cr &= ~0x10000000; /* XXX: Magic number */ - break; - case ERESTART: - /* - * Set user's pc back to redo the system call. - */ - tf->srr0 -= 4; - break; - default: - if (p->p_sysent->sv_errsize) { - error = (error < p->p_sysent->sv_errsize) ? - p->p_sysent->sv_errtbl[error] : -1; - } - tf->fixreg[FIRSTARG] = error; - tf->cr |= 0x10000000; /* XXX: Magic number */ - break; - } -} - -void -cpu_set_upcall(struct thread *td, struct thread *td0) -{ - struct pcb *pcb2; - struct trapframe *tf; - struct callframe *cf; - - pcb2 = td->td_pcb; - - /* Copy the upcall pcb */ - bcopy(td0->td_pcb, pcb2, sizeof(*pcb2)); - - /* Create a stack for the new thread */ - tf = td->td_frame; - bcopy(td0->td_frame, tf, sizeof(struct trapframe)); - tf->fixreg[FIRSTARG] = 0; - tf->fixreg[FIRSTARG + 1] = 0; - tf->cr &= ~0x10000000; - - /* Set registers for trampoline to user mode. */ - cf = (struct callframe *)tf - 1; - memset(cf, 0, sizeof(struct callframe)); - cf->cf_func = (register_t)fork_return; - cf->cf_arg0 = (register_t)td; - cf->cf_arg1 = (register_t)tf; - - pcb2->pcb_sp = (register_t)cf; - pcb2->pcb_lr = (register_t)fork_trampoline; - pcb2->pcb_cpu.aim.usr = kernel_pmap->pm_sr[USER_SR]; - - /* Setup to release spin count in fork_exit(). */ - td->td_md.md_spinlock_count = 1; - td->td_md.md_saved_msr = PSL_KERNSET; -} - -void -cpu_set_upcall_kse(struct thread *td, void (*entry)(void *), void *arg, - stack_t *stack) -{ - struct trapframe *tf; - uint32_t sp; - - tf = td->td_frame; - /* align stack and alloc space for frame ptr and saved LR */ - sp = ((uint32_t)stack->ss_sp + stack->ss_size - sizeof(uint64_t)) & - ~0x1f; - bzero(tf, sizeof(struct trapframe)); - - tf->fixreg[1] = (register_t)sp; - tf->fixreg[3] = (register_t)arg; - tf->srr0 = (register_t)entry; - tf->srr1 = PSL_MBO | PSL_USERSET | PSL_FE_DFLT; - td->td_pcb->pcb_flags = 0; - - td->td_retval[0] = (register_t)entry; - td->td_retval[1] = 0; -} - -int -cpu_set_user_tls(struct thread *td, void *tls_base) -{ - - td->td_frame->fixreg[2] = (register_t)tls_base + 0x7008; - return (0); -} Modified: stable/8/sys/powerpc/booke/machdep.c ============================================================================== --- stable/8/sys/powerpc/booke/machdep.c Sat Aug 21 23:13:16 2010 (r211594) +++ stable/8/sys/powerpc/booke/machdep.c Sun Aug 22 00:04:24 2010 (r211595) @@ -507,75 +507,6 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpu #endif } -/* Set set up registers on exec. */ -void -exec_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings) -{ - struct trapframe *tf; - struct ps_strings arginfo; - - tf = trapframe(td); - bzero(tf, sizeof *tf); - tf->fixreg[1] = -roundup(-stack + 8, 16); - - /* - * XXX Machine-independent code has already copied arguments and - * XXX environment to userland. Get them back here. - */ - (void)copyin((char *)PS_STRINGS, &arginfo, sizeof(arginfo)); - - /* - * Set up arguments for _start(): - * _start(argc, argv, envp, obj, cleanup, ps_strings); - * - * Notes: - * - obj and cleanup are the auxilliary and termination - * vectors. They are fixed up by ld.elf_so. - * - ps_strings is a NetBSD extention, and will be - * ignored by executables which are strictly - * compliant with the SVR4 ABI. - * - * XXX We have to set both regs and retval here due to different - * XXX calling convention in trap.c and init_main.c. - */ - /* - * XXX PG: these get overwritten in the syscall return code. - * execve() should return EJUSTRETURN, like it does on NetBSD. - * Emulate by setting the syscall return value cells. The - * registers still have to be set for init's fork trampoline. - */ - td->td_retval[0] = arginfo.ps_nargvstr; - td->td_retval[1] = (register_t)arginfo.ps_argvstr; - tf->fixreg[3] = arginfo.ps_nargvstr; - tf->fixreg[4] = (register_t)arginfo.ps_argvstr; - tf->fixreg[5] = (register_t)arginfo.ps_envstr; - tf->fixreg[6] = 0; /* auxillary vector */ - tf->fixreg[7] = 0; /* termination vector */ - tf->fixreg[8] = (register_t)PS_STRINGS; /* NetBSD extension */ - - tf->srr0 = entry; - tf->srr1 = PSL_USERSET; - td->td_pcb->pcb_flags = 0; -} - -int -fill_regs(struct thread *td, struct reg *regs) -{ - struct trapframe *tf; - - tf = td->td_frame; - memcpy(regs, tf, sizeof(struct reg)); - - return (0); -} - -int -fill_fpregs(struct thread *td, struct fpreg *fpregs) -{ - - return (0); -} - /* * Flush the D-cache for non-DMA I/O so that the I-cache can * be made coherent later. @@ -587,115 +518,6 @@ cpu_flush_dcache(void *ptr, size_t len) } /* - * Construct a PCB from a trapframe. This is called from kdb_trap() where - * we want to start a backtrace from the function that caused us to enter - * the debugger. We have the context in the trapframe, but base the trace - * on the PCB. The PCB doesn't have to be perfect, as long as it contains - * enough for a backtrace. - */ -void -makectx(struct trapframe *tf, struct pcb *pcb) -{ - - pcb->pcb_lr = tf->srr0; - pcb->pcb_sp = tf->fixreg[1]; -} - -/* - * get_mcontext/sendsig helper routine that doesn't touch the - * proc lock. - */ -static int -grab_mcontext(struct thread *td, mcontext_t *mcp, int flags) -{ - struct pcb *pcb; - - pcb = td->td_pcb; - memset(mcp, 0, sizeof(mcontext_t)); - - mcp->mc_vers = _MC_VERSION; - mcp->mc_flags = 0; - memcpy(&mcp->mc_frame, td->td_frame, sizeof(struct trapframe)); - if (flags & GET_MC_CLEAR_RET) { - mcp->mc_gpr[3] = 0; - mcp->mc_gpr[4] = 0; - } - - /* XXX Altivec context ? */ - - mcp->mc_len = sizeof(*mcp); - return (0); -} - -int -get_mcontext(struct thread *td, mcontext_t *mcp, int flags) -{ - int error; - - error = grab_mcontext(td, mcp, flags); - if (error == 0) { - PROC_LOCK(curthread->td_proc); - mcp->mc_onstack = sigonstack(td->td_frame->fixreg[1]); - PROC_UNLOCK(curthread->td_proc); - } - - return (error); -} - -int -set_mcontext(struct thread *td, const mcontext_t *mcp) -{ - struct pcb *pcb; - struct trapframe *tf; - - pcb = td->td_pcb; - tf = td->td_frame; - - if (mcp->mc_vers != _MC_VERSION || mcp->mc_len != sizeof(*mcp)) - return (EINVAL); - - memcpy(tf, mcp->mc_frame, sizeof(mcp->mc_frame)); - - /* XXX Altivec context? */ - - return (0); -} - -int -sigreturn(struct thread *td, struct sigreturn_args *uap) -{ - ucontext_t uc; - int error; - - CTR2(KTR_SIG, "sigreturn: td=%p ucp=%p", td, uap->sigcntxp); - - if (copyin(uap->sigcntxp, &uc, sizeof(uc)) != 0) { - CTR1(KTR_SIG, "sigreturn: efault td=%p", td); - return (EFAULT); - } - - error = set_mcontext(td, &uc.uc_mcontext); - if (error != 0) - return (error); - - kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); - - CTR3(KTR_SIG, "sigreturn: return td=%p pc=%#x sp=%#x", - td, uc.uc_mcontext.mc_srr0, uc.uc_mcontext.mc_gpr[1]); - - return (EJUSTRETURN); -} - -#ifdef COMPAT_FREEBSD4 -int -freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) -{ - - return sigreturn(td, (struct sigreturn_args *)uap); -} -#endif - -/* * cpu_idle * * Set Wait state enable. @@ -761,39 +583,6 @@ cpu_halt(void) } int -set_regs(struct thread *td, struct reg *regs) -{ - struct trapframe *tf; - - tf = td->td_frame; - memcpy(tf, regs, sizeof(struct reg)); - return (0); -} - -int -fill_dbregs(struct thread *td, struct dbreg *dbregs) -{ - - /* No debug registers on PowerPC */ - return (ENOSYS); -} - -int -set_dbregs(struct thread *td, struct dbreg *dbregs) -{ - - /* No debug registers on PowerPC */ - return (ENOSYS); -} - -int -set_fpregs(struct thread *td, struct fpreg *fpregs) -{ - - return (0); -} - -int ptrace_set_pc(struct thread *td, unsigned long addr) { struct trapframe *tf; @@ -847,124 +636,6 @@ kdb_cpu_set_singlestep(void) } void -sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) -{ - struct trapframe *tf; - struct sigframe *sfp; - struct sigacts *psp; - struct sigframe sf; - struct thread *td; - struct proc *p; - int oonstack, rndfsize; - int sig, code; - - td = curthread; - p = td->td_proc; - PROC_LOCK_ASSERT(p, MA_OWNED); - sig = ksi->ksi_signo; - code = ksi->ksi_code; - psp = p->p_sigacts; - mtx_assert(&psp->ps_mtx, MA_OWNED); - tf = td->td_frame; - oonstack = sigonstack(tf->fixreg[1]); - - rndfsize = ((sizeof(sf) + 15) / 16) * 16; - - CTR4(KTR_SIG, "sendsig: td=%p (%s) catcher=%p sig=%d", td, p->p_comm, - catcher, sig); - - /* - * Save user context - */ - memset(&sf, 0, sizeof(sf)); - grab_mcontext(td, &sf.sf_uc.uc_mcontext, 0); - sf.sf_uc.uc_sigmask = *mask; - sf.sf_uc.uc_stack = td->td_sigstk; - sf.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK) - ? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE; - - sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; - - /* - * Allocate and validate space for the signal handler context. - */ - if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && - SIGISMEMBER(psp->ps_sigonstack, sig)) { - sfp = (struct sigframe *)((caddr_t)td->td_sigstk.ss_sp + - td->td_sigstk.ss_size - rndfsize); - } else { - sfp = (struct sigframe *)(tf->fixreg[1] - rndfsize); - } - - /* - * Translate the signal if appropriate (Linux emu ?) - */ - if (p->p_sysent->sv_sigtbl && sig <= p->p_sysent->sv_sigsize) - sig = p->p_sysent->sv_sigtbl[_SIG_IDX(sig)]; - - /* - * Save the floating-point state, if necessary, then copy it. - */ - /* XXX */ - - /* - * Set up the registers to return to sigcode. - * - * r1/sp - sigframe ptr - * lr - sig function, dispatched to by blrl in trampoline - * r3 - sig number - * r4 - SIGINFO ? &siginfo : exception code - * r5 - user context - * srr0 - trampoline function addr - */ - tf->lr = (register_t)catcher; - tf->fixreg[1] = (register_t)sfp; - tf->fixreg[FIRSTARG] = sig; - tf->fixreg[FIRSTARG+2] = (register_t)&sfp->sf_uc; - if (SIGISMEMBER(psp->ps_siginfo, sig)) { - /* - * Signal handler installed with SA_SIGINFO. - */ - tf->fixreg[FIRSTARG+1] = (register_t)&sfp->sf_si; - - /* - * Fill siginfo structure. - */ - sf.sf_si = ksi->ksi_info; - sf.sf_si.si_signo = sig; - sf.sf_si.si_addr = (void *) ((tf->exc == EXC_DSI) ? - tf->cpu.booke.dear : tf->srr0); - } else { - /* Old FreeBSD-style arguments. */ - tf->fixreg[FIRSTARG+1] = code; - tf->fixreg[FIRSTARG+3] = (tf->exc == EXC_DSI) ? - tf->cpu.booke.dear : tf->srr0; - } - mtx_unlock(&psp->ps_mtx); - PROC_UNLOCK(p); - - tf->srr0 = (register_t)(PS_STRINGS - *(p->p_sysent->sv_szsigcode)); - - /* - * copy the frame out to userland. - */ - if (copyout((caddr_t)&sf, (caddr_t)sfp, sizeof(sf)) != 0) { - /* - * Process has trashed its stack. Kill it. - */ - CTR2(KTR_SIG, "sendsig: sigexit td=%p sfp=%p", td, sfp); - PROC_LOCK(p); - sigexit(td, SIGILL); - } - - CTR3(KTR_SIG, "sendsig: return td=%p pc=%#x sp=%#x", td, - tf->srr0, tf->fixreg[1]); - - PROC_LOCK(p); - mtx_lock(&psp->ps_mtx); -} - -void bzero(void *buf, size_t len) { caddr_t p; Modified: stable/8/sys/powerpc/booke/vm_machdep.c ============================================================================== --- stable/8/sys/powerpc/booke/vm_machdep.c Sat Aug 21 23:13:16 2010 (r211594) +++ stable/8/sys/powerpc/booke/vm_machdep.c Sun Aug 22 00:04:24 2010 (r211595) @@ -357,6 +357,7 @@ sf_buf_free(struct sf_buf *sf) void swi_vm(void *dummy) { + if (busdma_swi_pending != 0) busdma_swi(); } @@ -381,34 +382,6 @@ is_physical_memory(vm_offset_t addr) /* * Thread functions */ -void -cpu_thread_exit(struct thread *td) -{ - -} - -void -cpu_thread_clean(struct thread *td) -{ - -} - -void -cpu_thread_alloc(struct thread *td) -{ - struct pcb *pcb; - - pcb = (struct pcb *)((td->td_kstack + td->td_kstack_pages * PAGE_SIZE - - sizeof(struct pcb)) & ~0x3fU); - td->td_pcb = pcb; - td->td_frame = (struct trapframe *)pcb - 1; -} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 08:18:32 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A17410656A4; Sun, 22 Aug 2010 08:18:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8922D8FC28; Sun, 22 Aug 2010 08:18:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7M8IWsa095537; Sun, 22 Aug 2010 08:18:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7M8IWGq095535; Sun, 22 Aug 2010 08:18:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201008220818.o7M8IWGq095535@svn.freebsd.org> From: Andriy Gapon Date: Sun, 22 Aug 2010 08:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211599 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 08:18:32 -0000 Author: avg Date: Sun Aug 22 08:18:32 2010 New Revision: 211599 URL: http://svn.freebsd.org/changeset/base/211599 Log: Fix a mismerge in r211581, MFC of r210427 This is a direct commit. Reported by: many Pointyhat to: avg Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Aug 22 05:36:06 2010 (r211598) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Aug 22 08:18:32 2010 (r211599) @@ -3611,7 +3611,6 @@ arc_memory_throttle(uint64_t reserve, ui { #ifdef _KERNEL uint64_t inflight_data = arc_anon->arcs_size; - uint64_t available_memory = ptoa((uintmax_t)cnt.v_free_count); uint64_t available_memory = ptoa((uintmax_t)cnt.v_free_count + cnt.v_cache_count); static uint64_t page_load = 0; From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 08:47:00 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 732AE1065698; Sun, 22 Aug 2010 08:47:00 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 575398FC0C; Sun, 22 Aug 2010 08:47:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7M8l0ba096157; Sun, 22 Aug 2010 08:47:00 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7M8l0kX096155; Sun, 22 Aug 2010 08:47:00 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201008220847.o7M8l0kX096155@svn.freebsd.org> From: Andre Oppermann Date: Sun, 22 Aug 2010 08:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211600 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 08:47:00 -0000 Author: andre Date: Sun Aug 22 08:47:00 2010 New Revision: 211600 URL: http://svn.freebsd.org/changeset/base/211600 Log: MFC r211327: Add more logging points for failures in syncache_socket() to report when a new socket couldn't be created because one of in_pcbinshash(), in6_pcbconnect() or in_pcbconnect() failed. Modified: stable/8/sys/netinet/tcp_syncache.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cam/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/tcp_syncache.c ============================================================================== --- stable/8/sys/netinet/tcp_syncache.c Sun Aug 22 08:18:32 2010 (r211599) +++ stable/8/sys/netinet/tcp_syncache.c Sun Aug 22 08:47:00 2010 (r211600) @@ -627,6 +627,7 @@ syncache_socket(struct syncache *sc, str struct inpcb *inp = NULL; struct socket *so; struct tcpcb *tp; + int error = 0; char *s; INP_INFO_WLOCK_ASSERT(&V_tcbinfo); @@ -675,7 +676,7 @@ syncache_socket(struct syncache *sc, str } #endif inp->inp_lport = sc->sc_inc.inc_lport; - if (in_pcbinshash(inp) != 0) { + if ((error = in_pcbinshash(inp)) != 0) { /* * Undo the assignments above if we failed to * put the PCB on the hash lists. @@ -687,6 +688,12 @@ syncache_socket(struct syncache *sc, str #endif inp->inp_laddr.s_addr = INADDR_ANY; inp->inp_lport = 0; + if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: in_pcbinshash failed " + "with error %i\n", + s, __func__, error); + free(s, M_TCPLOG); + } goto abort; } #ifdef IPSEC @@ -721,9 +728,15 @@ syncache_socket(struct syncache *sc, str laddr6 = inp->in6p_laddr; if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) inp->in6p_laddr = sc->sc_inc.inc6_laddr; - if (in6_pcbconnect(inp, (struct sockaddr *)&sin6, - thread0.td_ucred)) { + if ((error = in6_pcbconnect(inp, (struct sockaddr *)&sin6, + thread0.td_ucred)) != 0) { inp->in6p_laddr = laddr6; + if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: in6_pcbconnect failed " + "with error %i\n", + s, __func__, error); + free(s, M_TCPLOG); + } goto abort; } /* Override flowlabel from in6_pcbconnect. */ @@ -750,9 +763,15 @@ syncache_socket(struct syncache *sc, str laddr = inp->inp_laddr; if (inp->inp_laddr.s_addr == INADDR_ANY) inp->inp_laddr = sc->sc_inc.inc_laddr; - if (in_pcbconnect(inp, (struct sockaddr *)&sin, - thread0.td_ucred)) { + if ((error = in_pcbconnect(inp, (struct sockaddr *)&sin, + thread0.td_ucred)) != 0) { inp->inp_laddr = laddr; + if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: in_pcbconnect failed " + "with error %i\n", + s, __func__, error); + free(s, M_TCPLOG); + } goto abort; } } From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 08:47:51 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7C3C1065695; Sun, 22 Aug 2010 08:47:51 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC8678FC22; Sun, 22 Aug 2010 08:47:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7M8lpKM096207; Sun, 22 Aug 2010 08:47:51 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7M8lpjN096205; Sun, 22 Aug 2010 08:47:51 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201008220847.o7M8lpjN096205@svn.freebsd.org> From: Andre Oppermann Date: Sun, 22 Aug 2010 08:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211601 - stable/7/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 08:47:52 -0000 Author: andre Date: Sun Aug 22 08:47:51 2010 New Revision: 211601 URL: http://svn.freebsd.org/changeset/base/211601 Log: MFC r211327: Add more logging points for failures in syncache_socket() to report when a new socket couldn't be created because one of in_pcbinshash(), in6_pcbconnect() or in_pcbconnect() failed. Modified: stable/7/sys/netinet/tcp_syncache.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/tcp_syncache.c ============================================================================== --- stable/7/sys/netinet/tcp_syncache.c Sun Aug 22 08:47:00 2010 (r211600) +++ stable/7/sys/netinet/tcp_syncache.c Sun Aug 22 08:47:51 2010 (r211601) @@ -645,6 +645,7 @@ syncache_socket(struct syncache *sc, str struct inpcb *inp = NULL; struct socket *so; struct tcpcb *tp; + int error = 0; char *s; INP_INFO_WLOCK_ASSERT(&tcbinfo); @@ -695,7 +696,7 @@ syncache_socket(struct syncache *sc, str } #endif inp->inp_lport = sc->sc_inc.inc_lport; - if (in_pcbinshash(inp) != 0) { + if ((error = in_pcbinshash(inp)) != 0) { /* * Undo the assignments above if we failed to * put the PCB on the hash lists. @@ -707,6 +708,12 @@ syncache_socket(struct syncache *sc, str #endif inp->inp_laddr.s_addr = INADDR_ANY; inp->inp_lport = 0; + if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: in_pcbinshash failed " + "with error %i\n", + s, __func__, error); + free(s, M_TCPLOG); + } goto abort; } #ifdef IPSEC @@ -741,9 +748,15 @@ syncache_socket(struct syncache *sc, str laddr6 = inp->in6p_laddr; if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) inp->in6p_laddr = sc->sc_inc.inc6_laddr; - if (in6_pcbconnect(inp, (struct sockaddr *)&sin6, - thread0.td_ucred)) { + if ((error = in6_pcbconnect(inp, (struct sockaddr *)&sin6, + thread0.td_ucred)) != 0) { inp->in6p_laddr = laddr6; + if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: in6_pcbconnect failed " + "with error %i\n", + s, __func__, error); + free(s, M_TCPLOG); + } goto abort; } /* Override flowlabel from in6_pcbconnect. */ @@ -770,9 +783,15 @@ syncache_socket(struct syncache *sc, str laddr = inp->inp_laddr; if (inp->inp_laddr.s_addr == INADDR_ANY) inp->inp_laddr = sc->sc_inc.inc_laddr; - if (in_pcbconnect(inp, (struct sockaddr *)&sin, - thread0.td_ucred)) { + if ((error = in_pcbconnect(inp, (struct sockaddr *)&sin, + thread0.td_ucred)) != 0) { inp->inp_laddr = laddr; + if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: in_pcbconnect failed " + "with error %i\n", + s, __func__, error); + free(s, M_TCPLOG); + } goto abort; } } From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 09:01:59 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F319D1065679; Sun, 22 Aug 2010 09:01:58 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7D678FC13; Sun, 22 Aug 2010 09:01:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7M91wxF096652; Sun, 22 Aug 2010 09:01:58 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7M91wZj096649; Sun, 22 Aug 2010 09:01:58 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201008220901.o7M91wZj096649@svn.freebsd.org> From: Andre Oppermann Date: Sun, 22 Aug 2010 09:01:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211602 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 09:01:59 -0000 Author: andre Date: Sun Aug 22 09:01:58 2010 New Revision: 211602 URL: http://svn.freebsd.org/changeset/base/211602 Log: MFC r211333: Fix the interaction between 'ICMP fragmentation needed' MTU updates, path MTU discovery and the tcp_minmss limiter for very small MTU's. Modified: stable/8/sys/netinet/tcp_output.c stable/8/sys/netinet/tcp_subr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cam/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/tcp_output.c ============================================================================== --- stable/8/sys/netinet/tcp_output.c Sun Aug 22 08:47:51 2010 (r211601) +++ stable/8/sys/netinet/tcp_output.c Sun Aug 22 09:01:58 2010 (r211602) @@ -1186,8 +1186,10 @@ timer: * This might not be the best thing to do according to RFC3390 * Section 2. However the tcp hostcache migitates the problem * so it affects only the first tcp connection with a host. + * + * NB: Don't set DF on small MTU/MSS to have a safe fallback. */ - if (V_path_mtu_discovery) + if (V_path_mtu_discovery && tp->t_maxopd > V_tcp_minmss) ip->ip_off |= IP_DF; error = ip_output(m, tp->t_inpcb->inp_options, NULL, Modified: stable/8/sys/netinet/tcp_subr.c ============================================================================== --- stable/8/sys/netinet/tcp_subr.c Sun Aug 22 08:47:51 2010 (r211601) +++ stable/8/sys/netinet/tcp_subr.c Sun Aug 22 09:01:58 2010 (r211602) @@ -1330,11 +1330,9 @@ tcp_ctlinput(int cmd, struct sockaddr *s if (!mtu) mtu = ip_next_mtu(ip->ip_len, 1); - if (mtu < max(296, V_tcp_minmss - + sizeof(struct tcpiphdr))) - mtu = 0; - if (!mtu) - mtu = V_tcp_mssdflt + if (mtu < V_tcp_minmss + + sizeof(struct tcpiphdr)) + mtu = V_tcp_minmss + sizeof(struct tcpiphdr); /* * Only cache the the MTU if it From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 09:02:38 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B85AD10656B1; Sun, 22 Aug 2010 09:02:38 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D16C8FC0C; Sun, 22 Aug 2010 09:02:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7M92cTr096713; Sun, 22 Aug 2010 09:02:38 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7M92cHv096710; Sun, 22 Aug 2010 09:02:38 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201008220902.o7M92cHv096710@svn.freebsd.org> From: Andre Oppermann Date: Sun, 22 Aug 2010 09:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211603 - stable/7/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 09:02:38 -0000 Author: andre Date: Sun Aug 22 09:02:38 2010 New Revision: 211603 URL: http://svn.freebsd.org/changeset/base/211603 Log: MFC r211333: Fix the interaction between 'ICMP fragmentation needed' MTU updates, path MTU discovery and the tcp_minmss limiter for very small MTU's. Modified: stable/7/sys/netinet/tcp_output.c stable/7/sys/netinet/tcp_subr.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/tcp_output.c ============================================================================== --- stable/7/sys/netinet/tcp_output.c Sun Aug 22 09:01:58 2010 (r211602) +++ stable/7/sys/netinet/tcp_output.c Sun Aug 22 09:02:38 2010 (r211603) @@ -1130,8 +1130,10 @@ timer: * This might not be the best thing to do according to RFC3390 * Section 2. However the tcp hostcache migitates the problem * so it affects only the first tcp connection with a host. + * + * NB: Don't set DF on small MTU/MSS to have a safe fallback. */ - if (path_mtu_discovery) + if (path_mtu_discovery && tp->t_maxopd > tcp_minmss) ip->ip_off |= IP_DF; error = ip_output(m, tp->t_inpcb->inp_options, NULL, Modified: stable/7/sys/netinet/tcp_subr.c ============================================================================== --- stable/7/sys/netinet/tcp_subr.c Sun Aug 22 09:01:58 2010 (r211602) +++ stable/7/sys/netinet/tcp_subr.c Sun Aug 22 09:02:38 2010 (r211603) @@ -1241,11 +1241,9 @@ tcp_ctlinput(int cmd, struct sockaddr *s if (!mtu) mtu = ip_next_mtu(ip->ip_len, 1); - if (mtu < max(296, (tcp_minmss) - + sizeof(struct tcpiphdr))) - mtu = 0; - if (!mtu) - mtu = tcp_mssdflt + if (mtu < tcp_minmss + + sizeof(struct tcpiphdr)) + mtu = tcp_minmss + sizeof(struct tcpiphdr); /* * Only cache the the MTU if it From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 09:05:08 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF5B510656A4; Sun, 22 Aug 2010 09:05:08 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E97B8FC17; Sun, 22 Aug 2010 09:05:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7M958ap096816; Sun, 22 Aug 2010 09:05:08 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7M958S9096814; Sun, 22 Aug 2010 09:05:08 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201008220905.o7M958S9096814@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 22 Aug 2010 09:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211604 - stable/8/share/termcap X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 09:05:08 -0000 Author: gavin Date: Sun Aug 22 09:05:08 2010 New Revision: 211604 URL: http://svn.freebsd.org/changeset/base/211604 Log: Merge r211066 from head: Add a termcap entry for rxvt-256color. PR: conf/147726 Submitted by: Sterling (Chip) Camden Modified: stable/8/share/termcap/termcap.src Directory Properties: stable/8/share/termcap/ (props changed) Modified: stable/8/share/termcap/termcap.src ============================================================================== --- stable/8/share/termcap/termcap.src Sun Aug 22 09:02:38 2010 (r211603) +++ stable/8/share/termcap/termcap.src Sun Aug 22 09:05:08 2010 (r211604) @@ -4585,6 +4585,9 @@ rxvt-unicode|rxvt-unicode terminal (X Wi rxvt|rxvt terminal emulator (X Window System):\ :pa#64:Co#8:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:tc=rxvt-mono: +rxvt-256color|rxvt terminal emulator with 256 colors:\ + :Co#256:AF=\E[38;5;%dm:AB=\E[48;5;%dm:tc=rxvt-unicode: + # Termcap entry for Eterm, taken from the sources of Eterm-0.9.2 Eterm|Eterm Terminal Emulator (X11 Window System):\ :am:bw:eo:km:mi:ms:xn:xo:\ From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 09:06:55 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BEA910656A8; Sun, 22 Aug 2010 09:06:55 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B1D48FC08; Sun, 22 Aug 2010 09:06:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7M96tIZ096881; Sun, 22 Aug 2010 09:06:55 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7M96ttR096879; Sun, 22 Aug 2010 09:06:55 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201008220906.o7M96ttR096879@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 22 Aug 2010 09:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211605 - stable/7/share/termcap X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 09:06:55 -0000 Author: gavin Date: Sun Aug 22 09:06:55 2010 New Revision: 211605 URL: http://svn.freebsd.org/changeset/base/211605 Log: Merge r211066 from head: Add a termcap entry for rxvt-256color. PR: conf/147726 Submitted by: Sterling (Chip) Camden Modified: stable/7/share/termcap/termcap.src Directory Properties: stable/7/share/termcap/ (props changed) Modified: stable/7/share/termcap/termcap.src ============================================================================== --- stable/7/share/termcap/termcap.src Sun Aug 22 09:05:08 2010 (r211604) +++ stable/7/share/termcap/termcap.src Sun Aug 22 09:06:55 2010 (r211605) @@ -4585,6 +4585,9 @@ rxvt-unicode|rxvt-unicode terminal (X Wi rxvt|rxvt terminal emulator (X Window System):\ :pa#64:Co#8:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:tc=rxvt-mono: +rxvt-256color|rxvt terminal emulator with 256 colors:\ + :Co#256:AF=\E[38;5;%dm:AB=\E[48;5;%dm:tc=rxvt-unicode: + # Termcap entry for Eterm, taken from the sources of Eterm-0.9.2 Eterm|Eterm Terminal Emulator (X11 Window System):\ :am:bw:eo:km:mi:ms:xn:xo:\ From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 12:03:31 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D8CA10656B9; Sun, 22 Aug 2010 12:03:31 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B5EF8FC0C; Sun, 22 Aug 2010 12:03:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7MC3Vpr003349; Sun, 22 Aug 2010 12:03:31 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7MC3VIl003345; Sun, 22 Aug 2010 12:03:31 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201008221203.o7MC3VIl003345@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 22 Aug 2010 12:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211620 - stable/8/share/syscons/keymaps X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 12:03:31 -0000 Author: gavin Date: Sun Aug 22 12:03:31 2010 New Revision: 211620 URL: http://svn.freebsd.org/changeset/base/211620 Log: Merge r211026 from head: Add a keymap for the Swiss-German Macbook keyboard. PR: conf/139997 Submitted by: Andreas Tobler Added: stable/8/share/syscons/keymaps/swissgerman.macbook.acc.kbd - copied unchanged from r211026, head/share/syscons/keymaps/swissgerman.macbook.acc.kbd Modified: stable/8/share/syscons/keymaps/INDEX.keymaps stable/8/share/syscons/keymaps/Makefile Modified: stable/8/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- stable/8/share/syscons/keymaps/INDEX.keymaps Sun Aug 22 11:48:32 2010 (r211619) +++ stable/8/share/syscons/keymaps/INDEX.keymaps Sun Aug 22 12:03:31 2010 (r211620) @@ -440,6 +440,12 @@ swissgerman.cp850.kbd:fr:Suisse-Allemand swissgerman.cp850.kbd:pt:Suiço-Alemão Codepage 850 swissgerman.cp850.kbd:es:Germanosuizo Codepage 850 +swissgerman.macbook.acc.kbd:en:Swiss-German Macbook/Macbook Pro (accent keys) +swissgerman.macbook.acc.kbd:de:Schweiz-Deutsch Macbook/Macbook Pro (mit Akzenten) +swissgerman.macbook.acc.kbd:fr:Suisse-Allemand Macbook/Macbook Pro (avec accents) +swissgerman.macbook.acc.kbd:pt:Suiço-Alemão Macbook/Macbook Pro (com acentos) +swissgerman.macbook.acc.kbd:es:Germanosuizo Macbook/Macbook Pro (con acentos) + tr.iso9.q.kbd:en:Turkish ISO-8859-9 tr.iso9.q.kbd:fr:Turc ISO-8859-9 tr.iso9.q.kbd:uk:ôÕÒÅÃØËÁ ISO-8859-9 Modified: stable/8/share/syscons/keymaps/Makefile ============================================================================== --- stable/8/share/syscons/keymaps/Makefile Sun Aug 22 11:48:32 2010 (r211619) +++ stable/8/share/syscons/keymaps/Makefile Sun Aug 22 12:03:31 2010 (r211620) @@ -40,6 +40,7 @@ FILES= INDEX.keymaps \ swedish.iso.kbd swedish.cp850.kbd \ swissfrench.iso.kbd swissfrench.iso.acc.kbd swissfrench.cp850.kbd \ swissgerman.iso.kbd swissgerman.iso.acc.kbd swissgerman.cp850.kbd \ + swissgerman.macbook.acc.kbd \ tr.iso9.q.kbd \ ua.koi8-u.kbd ua.koi8-u.shift.alt.kbd ua.iso5.kbd \ uk.iso.kbd uk.iso-ctrl.kbd uk.cp850.kbd uk.cp850-ctrl.kbd \ Copied: stable/8/share/syscons/keymaps/swissgerman.macbook.acc.kbd (from r211026, head/share/syscons/keymaps/swissgerman.macbook.acc.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/syscons/keymaps/swissgerman.macbook.acc.kbd Sun Aug 22 12:03:31 2010 (r211620, copy of r211026, head/share/syscons/keymaps/swissgerman.macbook.acc.kbd) @@ -0,0 +1,134 @@ +# $FreeBSD$ +# +# swissgerman Macbook/Macbook PRO ISO 8859-1 keymap, with accent keys +# derived from swissgerman.iso.acc.kbd +# 06.08.2010 by Andreas Tobler +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '+' nop nop '1' '1' nop nop O + 003 '2' '"' nul nul '2' '2' nul nul O + 004 '3' '*' nop nop '#' '#' nop nop O + 005 '4' 231 nop nop '4' 231 nop nop O + 006 '5' '%' nop nop '[' '[' nop nop O + 007 '6' '&' nop nop ']' ']' nop nop O + 008 '7' '/' nop nop '|' '\' nop nop O + 009 '8' '(' esc esc '{' '{' nop nop O + 010 '9' ')' gs gs '}' '}' nop nop O + 011 '0' '=' nop nop '0' '=' nop nop O + 012 ''' '?' fs fs dacu dacu fs fs O + 013 dcir dgra nop nop dtil dtil nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 017 'w' 'W' etb etb 'w' 'W' etb etb C + 018 'e' 'E' enq enq 164 'E' enq enq C + 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 021 'z' 'Z' sub sub 'z' 'Z' sub sub C + 022 'u' 'U' nak nak 'u' 'U' nak nak C + 023 'i' 'I' ht ht 'i' 'I' ht ht C + 024 'o' 'O' si si 'o' 'O' si si C + 025 'p' 'P' dle dle 'p' 'P' dle dle C + 026 dgra duml esc esc '[' 220 esc esc C + 027 duml '!' gs gs ']' ']' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 032 'd' 'D' eot eot 'd' 'D' eot eot C + 033 'f' 'F' ack ack 'f' 'F' ack ack C + 034 'g' 'G' bel bel '@' '@' bel bel C + 035 'h' 'H' bs bs 'h' 'H' bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 'k' 'K' vt vt C + 038 'l' 'L' ff ff 'l' 'L' ff ff C + 039 233 233 nop nop 246 214 nop nop C + 040 224 224 nop nop '{' 196 nop nop C + 041 '<' '>' nop nop nop nop nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 '$' 163 rs rs '}' '}' rs rs O + 044 'y' 'Y' em em 'y' 'Y' em em C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn 'v' 'V' syn syn C + 048 'b' 'B' stx stx 'b' 'B' stx stx C + 049 'n' 'N' so so '~' '~' so so C + 050 'm' 'M' cr cr 181 181 cr cr C + 051 ',' ';' nop nop ',' ';' nop nop O + 052 '.' ':' nop nop '.' ':' nop nop O + 053 '-' '_' us us '-' '_' us us O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' nop nop '\' '\' nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O + + dacu 180 ( 'a' 225 ) ( 'A' 193 ) ( 'e' 233 ) ( 'E' 201 ) + ( 'i' 237 ) ( 'I' 205 ) ( 'o' 243 ) ( 'O' 211 ) + ( 'u' 250 ) ( 'U' 218 ) ( 'c' 231 ) ( 'C' 199 ) + ( 'y' 253 ) ( 'Y' 221 ) + dgra '`' ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 ) + ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 ) + ( 'u' 249 ) ( 'U' 217 ) + dcir '^' ( 'a' 226 ) ( 'A' 194 ) ( 'e' 234 ) ( 'E' 202 ) + ( 'i' 238 ) ( 'I' 206 ) ( 'o' 244 ) ( 'O' 212 ) + ( 'u' 251 ) ( 'U' 219 ) + dtil '~' ( 'a' 227 ) ( 'A' 195 ) ( 'o' 245 ) ( 'O' 213 ) + ( 'n' 241 ) ( 'N' 209 ) + duml 168 ( 'a' 228 ) ( 'A' 196 ) ( 'e' 235 ) ( 'E' 203 ) + ( 'i' 239 ) ( 'I' 207 ) ( 'o' 246 ) ( 'O' 214 ) + ( 'u' 252 ) ( 'U' 220 ) ( 'y' 255 ) From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 13:27:34 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 101A2106566C; Sun, 22 Aug 2010 13:27:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2C058FC1C; Sun, 22 Aug 2010 13:27:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7MDRXTu005110; Sun, 22 Aug 2010 13:27:33 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7MDRXtp005108; Sun, 22 Aug 2010 13:27:33 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201008221327.o7MDRXtp005108@svn.freebsd.org> From: Andriy Gapon Date: Sun, 22 Aug 2010 13:27:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211623 - stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 13:27:34 -0000 Author: avg Date: Sun Aug 22 13:27:33 2010 New Revision: 211623 URL: http://svn.freebsd.org/changeset/base/211623 Log: Fix a mismerge in r211581, MFC of r210427 This is a direct commit. Reported by: many Pointyhat to: avg Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Aug 22 13:09:12 2010 (r211622) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Aug 22 13:27:33 2010 (r211623) @@ -3296,7 +3296,6 @@ arc_memory_throttle(uint64_t reserve, ui { #ifdef _KERNEL uint64_t inflight_data = arc_anon->arcs_size; - uint64_t available_memory = ptoa((uintmax_t)cnt.v_free_count); uint64_t available_memory = ptoa((uintmax_t)cnt.v_free_count + cnt.v_cache_count); static uint64_t page_load = 0; From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 14:55:00 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DE02106564A; Sun, 22 Aug 2010 14:55:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CFCF8FC12; Sun, 22 Aug 2010 14:55:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7MEt03L006844; Sun, 22 Aug 2010 14:55:00 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7MEt0Ic006842; Sun, 22 Aug 2010 14:55:00 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201008221455.o7MEt0Ic006842@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 22 Aug 2010 14:55:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211624 - stable/8/sys/modules/sem X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 14:55:00 -0000 Author: kib Date: Sun Aug 22 14:54:59 2010 New Revision: 211624 URL: http://svn.freebsd.org/changeset/base/211624 Log: MFC r211339: Add missed dependency. Modified: stable/8/sys/modules/sem/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cam/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/modules/sem/Makefile ============================================================================== --- stable/8/sys/modules/sem/Makefile Sun Aug 22 13:27:33 2010 (r211623) +++ stable/8/sys/modules/sem/Makefile Sun Aug 22 14:54:59 2010 (r211624) @@ -3,6 +3,6 @@ .PATH: ${.CURDIR}/../../kern KMOD= sem -SRCS= uipc_sem.c opt_posix.h vnode_if.h +SRCS= uipc_sem.c opt_compat.h opt_posix.h vnode_if.h .include From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 16:33:00 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63E501065695; Sun, 22 Aug 2010 16:33:00 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 525B68FC1D; Sun, 22 Aug 2010 16:33:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7MGX0ia009110; Sun, 22 Aug 2010 16:33:00 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7MGX0H7009106; Sun, 22 Aug 2010 16:33:00 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201008221633.o7MGX0H7009106@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 22 Aug 2010 16:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211632 - stable/7/share/syscons/keymaps X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 16:33:00 -0000 Author: gavin Date: Sun Aug 22 16:32:59 2010 New Revision: 211632 URL: http://svn.freebsd.org/changeset/base/211632 Log: Merge r211026 from head: Add a keymap for the Swiss-German Macbook keyboard. PR: conf/139997 Submitted by: Andreas Tobler Added: stable/7/share/syscons/keymaps/swissgerman.macbook.acc.kbd - copied unchanged from r211026, head/share/syscons/keymaps/swissgerman.macbook.acc.kbd Modified: stable/7/share/syscons/keymaps/INDEX.keymaps stable/7/share/syscons/keymaps/Makefile Directory Properties: stable/7/share/syscons/keymaps/ (props changed) Modified: stable/7/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- stable/7/share/syscons/keymaps/INDEX.keymaps Sun Aug 22 16:22:44 2010 (r211631) +++ stable/7/share/syscons/keymaps/INDEX.keymaps Sun Aug 22 16:32:59 2010 (r211632) @@ -437,6 +437,12 @@ swissgerman.cp850.kbd:fr:Suisse-Allemand swissgerman.cp850.kbd:pt:Suiço-Alemão Codepage 850 swissgerman.cp850.kbd:es:Germanosuizo Codepage 850 +swissgerman.macbook.acc.kbd:en:Swiss-German Macbook/Macbook Pro (accent keys) +swissgerman.macbook.acc.kbd:de:Schweiz-Deutsch Macbook/Macbook Pro (mit Akzenten) +swissgerman.macbook.acc.kbd:fr:Suisse-Allemand Macbook/Macbook Pro (avec accents) +swissgerman.macbook.acc.kbd:pt:Suiço-Alemão Macbook/Macbook Pro (com acentos) +swissgerman.macbook.acc.kbd:es:Germanosuizo Macbook/Macbook Pro (con acentos) + tr.iso9.q.kbd:en:Turkish ISO-8859-9 tr.iso9.q.kbd:fr:Turc ISO-8859-9 tr.iso9.q.kbd:uk:ôÕÒÅÃØËÁ ISO-8859-9 Modified: stable/7/share/syscons/keymaps/Makefile ============================================================================== --- stable/7/share/syscons/keymaps/Makefile Sun Aug 22 16:22:44 2010 (r211631) +++ stable/7/share/syscons/keymaps/Makefile Sun Aug 22 16:32:59 2010 (r211632) @@ -40,6 +40,7 @@ FILES= INDEX.keymaps \ swedish.iso.kbd swedish.cp850.kbd \ swissfrench.iso.kbd swissfrench.iso.acc.kbd swissfrench.cp850.kbd \ swissgerman.iso.kbd swissgerman.iso.acc.kbd swissgerman.cp850.kbd \ + swissgerman.macbook.acc.kbd \ tr.iso9.q.kbd \ ua.koi8-u.kbd ua.koi8-u.shift.alt.kbd ua.iso5.kbd \ uk.iso.kbd uk.iso-ctrl.kbd uk.cp850.kbd uk.cp850-ctrl.kbd \ Copied: stable/7/share/syscons/keymaps/swissgerman.macbook.acc.kbd (from r211026, head/share/syscons/keymaps/swissgerman.macbook.acc.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/syscons/keymaps/swissgerman.macbook.acc.kbd Sun Aug 22 16:32:59 2010 (r211632, copy of r211026, head/share/syscons/keymaps/swissgerman.macbook.acc.kbd) @@ -0,0 +1,134 @@ +# $FreeBSD$ +# +# swissgerman Macbook/Macbook PRO ISO 8859-1 keymap, with accent keys +# derived from swissgerman.iso.acc.kbd +# 06.08.2010 by Andreas Tobler +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '+' nop nop '1' '1' nop nop O + 003 '2' '"' nul nul '2' '2' nul nul O + 004 '3' '*' nop nop '#' '#' nop nop O + 005 '4' 231 nop nop '4' 231 nop nop O + 006 '5' '%' nop nop '[' '[' nop nop O + 007 '6' '&' nop nop ']' ']' nop nop O + 008 '7' '/' nop nop '|' '\' nop nop O + 009 '8' '(' esc esc '{' '{' nop nop O + 010 '9' ')' gs gs '}' '}' nop nop O + 011 '0' '=' nop nop '0' '=' nop nop O + 012 ''' '?' fs fs dacu dacu fs fs O + 013 dcir dgra nop nop dtil dtil nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 017 'w' 'W' etb etb 'w' 'W' etb etb C + 018 'e' 'E' enq enq 164 'E' enq enq C + 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 021 'z' 'Z' sub sub 'z' 'Z' sub sub C + 022 'u' 'U' nak nak 'u' 'U' nak nak C + 023 'i' 'I' ht ht 'i' 'I' ht ht C + 024 'o' 'O' si si 'o' 'O' si si C + 025 'p' 'P' dle dle 'p' 'P' dle dle C + 026 dgra duml esc esc '[' 220 esc esc C + 027 duml '!' gs gs ']' ']' gs gs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 032 'd' 'D' eot eot 'd' 'D' eot eot C + 033 'f' 'F' ack ack 'f' 'F' ack ack C + 034 'g' 'G' bel bel '@' '@' bel bel C + 035 'h' 'H' bs bs 'h' 'H' bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 'k' 'K' vt vt C + 038 'l' 'L' ff ff 'l' 'L' ff ff C + 039 233 233 nop nop 246 214 nop nop C + 040 224 224 nop nop '{' 196 nop nop C + 041 '<' '>' nop nop nop nop nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 '$' 163 rs rs '}' '}' rs rs O + 044 'y' 'Y' em em 'y' 'Y' em em C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn 'v' 'V' syn syn C + 048 'b' 'B' stx stx 'b' 'B' stx stx C + 049 'n' 'N' so so '~' '~' so so C + 050 'm' 'M' cr cr 181 181 cr cr C + 051 ',' ';' nop nop ',' ';' nop nop O + 052 '.' ':' nop nop '.' ':' nop nop O + 053 '-' '_' us us '-' '_' us us O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' nop nop '\' '\' nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O + + dacu 180 ( 'a' 225 ) ( 'A' 193 ) ( 'e' 233 ) ( 'E' 201 ) + ( 'i' 237 ) ( 'I' 205 ) ( 'o' 243 ) ( 'O' 211 ) + ( 'u' 250 ) ( 'U' 218 ) ( 'c' 231 ) ( 'C' 199 ) + ( 'y' 253 ) ( 'Y' 221 ) + dgra '`' ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 ) + ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 ) + ( 'u' 249 ) ( 'U' 217 ) + dcir '^' ( 'a' 226 ) ( 'A' 194 ) ( 'e' 234 ) ( 'E' 202 ) + ( 'i' 238 ) ( 'I' 206 ) ( 'o' 244 ) ( 'O' 212 ) + ( 'u' 251 ) ( 'U' 219 ) + dtil '~' ( 'a' 227 ) ( 'A' 195 ) ( 'o' 245 ) ( 'O' 213 ) + ( 'n' 241 ) ( 'N' 209 ) + duml 168 ( 'a' 228 ) ( 'A' 196 ) ( 'e' 235 ) ( 'E' 203 ) + ( 'i' 239 ) ( 'I' 207 ) ( 'o' 246 ) ( 'O' 214 ) + ( 'u' 252 ) ( 'U' 220 ) ( 'y' 255 ) From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 20:17:29 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25E5510656A4; Sun, 22 Aug 2010 20:17:29 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14D858FC16; Sun, 22 Aug 2010 20:17:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7MKHSml013617; Sun, 22 Aug 2010 20:17:28 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7MKHSww013615; Sun, 22 Aug 2010 20:17:28 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201008222017.o7MKHSww013615@svn.freebsd.org> From: Christian Brueffer Date: Sun, 22 Aug 2010 20:17:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211639 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 20:17:29 -0000 Author: brueffer Date: Sun Aug 22 20:17:28 2010 New Revision: 211639 URL: http://svn.freebsd.org/changeset/base/211639 Log: MFC: r211355 Fixed a typo and added a comma. Modified: stable/8/share/man/man4/ng_atm.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ng_atm.4 ============================================================================== --- stable/8/share/man/man4/ng_atm.4 Sun Aug 22 20:04:48 2010 (r211638) +++ stable/8/share/man/man4/ng_atm.4 Sun Aug 22 20:17:28 2010 (r211639) @@ -138,7 +138,7 @@ Hooks for dynamically initiated VCIs can .Xr netgraph 4 as long as the name does not collide with one of the three predefined names. .Pp -To initiate packet sending an receiving on a dynamic hook one has to issue +To initiate packet sending and receiving on a dynamic hook, one has to issue a .Dv NGM_ATM_CPCS_INIT control message. From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 20:22:56 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF767106564A; Sun, 22 Aug 2010 20:22:56 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE5C28FC0A; Sun, 22 Aug 2010 20:22:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7MKMui1013827; Sun, 22 Aug 2010 20:22:56 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7MKMu0X013825; Sun, 22 Aug 2010 20:22:56 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201008222022.o7MKMu0X013825@svn.freebsd.org> From: Christian Brueffer Date: Sun, 22 Aug 2010 20:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211641 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 20:22:56 -0000 Author: brueffer Date: Sun Aug 22 20:22:56 2010 New Revision: 211641 URL: http://svn.freebsd.org/changeset/base/211641 Log: MFC: r148681 Fixed a typo and added a comma. Modified: stable/7/share/man/man4/ng_atm.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/ng_atm.4 ============================================================================== --- stable/7/share/man/man4/ng_atm.4 Sun Aug 22 20:21:10 2010 (r211640) +++ stable/7/share/man/man4/ng_atm.4 Sun Aug 22 20:22:56 2010 (r211641) @@ -138,7 +138,7 @@ Hooks for dynamically initiated VCIs can .Xr netgraph 4 as long as the name does not collide with one of the three predefined names. .Pp -To initiate packet sending an receiving on a dynamic hook one has to issue +To initiate packet sending and receiving on a dynamic hook, one has to issue a .Dv NGM_ATM_CPCS_INIT control message. From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 20:24:25 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B0841065697; Sun, 22 Aug 2010 20:24:25 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A0808FC22; Sun, 22 Aug 2010 20:24:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7MKOOcL013937; Sun, 22 Aug 2010 20:24:24 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7MKOOlc013935; Sun, 22 Aug 2010 20:24:24 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201008222024.o7MKOOlc013935@svn.freebsd.org> From: Christian Brueffer Date: Sun, 22 Aug 2010 20:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211642 - stable/8/share/man/man9 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 20:24:25 -0000 Author: brueffer Date: Sun Aug 22 20:24:24 2010 New Revision: 211642 URL: http://svn.freebsd.org/changeset/base/211642 Log: MFC: r148701 Fixed a typo. Modified: stable/8/share/man/man9/crypto.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/crypto.9 ============================================================================== --- stable/8/share/man/man9/crypto.9 Sun Aug 22 20:22:56 2010 (r211641) +++ stable/8/share/man/man9/crypto.9 Sun Aug 22 20:24:24 2010 (r211642) @@ -143,7 +143,7 @@ not The same holds for the framework. Thus, a callback mechanism is used to notify a consumer that a request has been completed (the -callback is specified by the consumer on an per-request basis). +callback is specified by the consumer on a per-request basis). The callback is invoked by the framework whether the request was successfully completed or not. An error indication is provided in the latter case. From owner-svn-src-stable@FreeBSD.ORG Sun Aug 22 20:25:03 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2292106564A; Sun, 22 Aug 2010 20:25:03 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C11088FC16; Sun, 22 Aug 2010 20:25:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7MKP3Ig014009; Sun, 22 Aug 2010 20:25:03 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7MKP30U014007; Sun, 22 Aug 2010 20:25:03 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201008222025.o7MKP30U014007@svn.freebsd.org> From: Christian Brueffer Date: Sun, 22 Aug 2010 20:25:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211643 - stable/7/share/man/man9 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 20:25:03 -0000 Author: brueffer Date: Sun Aug 22 20:25:03 2010 New Revision: 211643 URL: http://svn.freebsd.org/changeset/base/211643 Log: MFC: r148701 Fixed a typo. Modified: stable/7/share/man/man9/crypto.9 Directory Properties: stable/7/share/man/man9/ (props changed) Modified: stable/7/share/man/man9/crypto.9 ============================================================================== --- stable/7/share/man/man9/crypto.9 Sun Aug 22 20:24:24 2010 (r211642) +++ stable/7/share/man/man9/crypto.9 Sun Aug 22 20:25:03 2010 (r211643) @@ -143,7 +143,7 @@ not The same holds for the framework. Thus, a callback mechanism is used to notify a consumer that a request has been completed (the -callback is specified by the consumer on an per-request basis). +callback is specified by the consumer on a per-request basis). The callback is invoked by the framework whether the request was successfully completed or not. An error indication is provided in the latter case. From owner-svn-src-stable@FreeBSD.ORG Mon Aug 23 09:52:05 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03C7910656A7; Mon, 23 Aug 2010 09:52:05 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E69DF8FC2A; Mon, 23 Aug 2010 09:52:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7N9q4FG034127; Mon, 23 Aug 2010 09:52:04 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7N9q4uq034123; Mon, 23 Aug 2010 09:52:04 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201008230952.o7N9q4uq034123@svn.freebsd.org> From: Brian Somers Date: Mon, 23 Aug 2010 09:52:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211699 - stable/8/usr.sbin/newsyslog X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 09:52:05 -0000 Author: brian Date: Mon Aug 23 09:52:04 2010 New Revision: 211699 URL: http://svn.freebsd.org/changeset/base/211699 Log: MFC r210407: Add a -S switch to override syslogd's pidfile. Modified: stable/8/usr.sbin/newsyslog/newsyslog.8 stable/8/usr.sbin/newsyslog/newsyslog.c stable/8/usr.sbin/newsyslog/newsyslog.conf.5 Directory Properties: stable/8/usr.sbin/newsyslog/ (props changed) Modified: stable/8/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/8/usr.sbin/newsyslog/newsyslog.8 Mon Aug 23 06:40:21 2010 (r211698) +++ stable/8/usr.sbin/newsyslog/newsyslog.8 Mon Aug 23 09:52:04 2010 (r211699) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd January 19, 2010 +.Dd July 23, 2010 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -27,6 +27,7 @@ .Nm .Op Fl CFNPnrsv .Op Fl R Ar tagname +.Op Fl S Ar pidfile .Op Fl a Ar directory .Op Fl d Ar directory .Op Fl f Ar config_file @@ -215,6 +216,12 @@ Skipping the signal step will also mean will return faster, since .Nm normally waits a few seconds after any signal that is sent. +.It Fl S Ar pidfile +Use +.Ar pidfile +as +.Xr syslogd 8 Ns 's +pidfile. .El .Pp If additional command line arguments are given, Modified: stable/8/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/8/usr.sbin/newsyslog/newsyslog.c Mon Aug 23 06:40:21 2010 (r211698) +++ stable/8/usr.sbin/newsyslog/newsyslog.c Mon Aug 23 09:52:04 2010 (r211699) @@ -186,6 +186,8 @@ char daytime[DAYTIME_LEN]; /* The curren * used for rotation-tracking messages. */ char hostname[MAXHOSTNAMELEN]; /* hostname */ +const char *path_syslogpid = _PATH_SYSLOGPID; + static struct conf_entry *get_worklist(char **files); static void parse_file(FILE *cf, const char *cfname, struct conf_entry **work_p, struct conf_entry **glob_p, struct conf_entry **defconf_p); @@ -632,6 +634,9 @@ parse_args(int argc, char **argv) rotatereq++; requestor = strdup(optarg); break; + case 'S': + path_syslogpid = optarg; + break; case 'm': /* Used by OpenBSD for "monitor mode" */ default: usage(); @@ -724,7 +729,7 @@ usage(void) fprintf(stderr, "usage: newsyslog [-CFNnrsv] [-a directory] [-d directory] [-f config-file]\n" - " [ [-R requestor] filename ... ]\n"); + " [-S pidfile] [ [-R requestor] filename ... ]\n"); exit(1); } @@ -1318,7 +1323,7 @@ no_trimat: working->flags &= ~CE_SIGNALGROUP; } if (needroot) - working->pid_file = strdup(_PATH_SYSLOGPID); + working->pid_file = strdup(path_syslogpid); } /* Modified: stable/8/usr.sbin/newsyslog/newsyslog.conf.5 ============================================================================== --- stable/8/usr.sbin/newsyslog/newsyslog.conf.5 Mon Aug 23 06:40:21 2010 (r211698) +++ stable/8/usr.sbin/newsyslog/newsyslog.conf.5 Mon Aug 23 09:52:04 2010 (r211699) @@ -21,7 +21,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd November 27, 2006 +.Dd July 23, 2010 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -315,14 +315,17 @@ process ID or to find a group process ID flag was specified. If this field is present, a .Ar signal_number -is sent the process ID contained in this file. -If this field is not present, then a +is sent to the process ID contained in this file. +If this field is not present and the +.Cm N +flag has not been specified, then a .Dv SIGHUP signal will be sent to -.Xr syslogd 8 , -unless the -.Cm N -flag has been specified. +.Xr syslogd 8 +or to the process id found in the file specified by +.Xr newsyslog 8 Ns 's +.Fl S +switch. This field must start with .Ql / in order to be recognized properly. From owner-svn-src-stable@FreeBSD.ORG Mon Aug 23 09:54:32 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60095106564A; Mon, 23 Aug 2010 09:54:32 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EB658FC0C; Mon, 23 Aug 2010 09:54:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7N9sWG6034227; Mon, 23 Aug 2010 09:54:32 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7N9sW3j034223; Mon, 23 Aug 2010 09:54:32 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201008230954.o7N9sW3j034223@svn.freebsd.org> From: Brian Somers Date: Mon, 23 Aug 2010 09:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211700 - stable/7/usr.sbin/newsyslog X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 09:54:32 -0000 Author: brian Date: Mon Aug 23 09:54:32 2010 New Revision: 211700 URL: http://svn.freebsd.org/changeset/base/211700 Log: MFC r210407: Add a -S switch to override syslogd's pidfile. Modified: stable/7/usr.sbin/newsyslog/newsyslog.8 stable/7/usr.sbin/newsyslog/newsyslog.c stable/7/usr.sbin/newsyslog/newsyslog.conf.5 Directory Properties: stable/7/usr.sbin/newsyslog/ (props changed) Modified: stable/7/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/7/usr.sbin/newsyslog/newsyslog.8 Mon Aug 23 09:52:04 2010 (r211699) +++ stable/7/usr.sbin/newsyslog/newsyslog.8 Mon Aug 23 09:54:32 2010 (r211700) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd January 19, 2010 +.Dd July 23, 2010 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -27,6 +27,7 @@ .Nm .Op Fl CFNPnrsv .Op Fl R Ar tagname +.Op Fl S Ar pidfile .Op Fl a Ar directory .Op Fl d Ar directory .Op Fl f Ar config_file @@ -215,6 +216,12 @@ Skipping the signal step will also mean will return faster, since .Nm normally waits a few seconds after any signal that is sent. +.It Fl S Ar pidfile +Use +.Ar pidfile +as +.Xr syslogd 8 Ns 's +pidfile. .El .Pp If additional command line arguments are given, Modified: stable/7/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/7/usr.sbin/newsyslog/newsyslog.c Mon Aug 23 09:52:04 2010 (r211699) +++ stable/7/usr.sbin/newsyslog/newsyslog.c Mon Aug 23 09:54:32 2010 (r211700) @@ -186,6 +186,8 @@ char daytime[DAYTIME_LEN]; /* The curren * used for rotation-tracking messages. */ char hostname[MAXHOSTNAMELEN]; /* hostname */ +const char *path_syslogpid = _PATH_SYSLOGPID; + static struct conf_entry *get_worklist(char **files); static void parse_file(FILE *cf, const char *cfname, struct conf_entry **work_p, struct conf_entry **glob_p, struct conf_entry **defconf_p); @@ -632,6 +634,9 @@ parse_args(int argc, char **argv) rotatereq++; requestor = strdup(optarg); break; + case 'S': + path_syslogpid = optarg; + break; case 'm': /* Used by OpenBSD for "monitor mode" */ default: usage(); @@ -724,7 +729,7 @@ usage(void) fprintf(stderr, "usage: newsyslog [-CFNnrsv] [-a directory] [-d directory] [-f config-file]\n" - " [ [-R requestor] filename ... ]\n"); + " [-S pidfile] [ [-R requestor] filename ... ]\n"); exit(1); } @@ -1318,7 +1323,7 @@ no_trimat: working->flags &= ~CE_SIGNALGROUP; } if (needroot) - working->pid_file = strdup(_PATH_SYSLOGPID); + working->pid_file = strdup(path_syslogpid); } /* Modified: stable/7/usr.sbin/newsyslog/newsyslog.conf.5 ============================================================================== --- stable/7/usr.sbin/newsyslog/newsyslog.conf.5 Mon Aug 23 09:52:04 2010 (r211699) +++ stable/7/usr.sbin/newsyslog/newsyslog.conf.5 Mon Aug 23 09:54:32 2010 (r211700) @@ -21,7 +21,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd November 27, 2006 +.Dd July 23, 2010 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -315,14 +315,17 @@ process ID or to find a group process ID flag was specified. If this field is present, a .Ar signal_number -is sent the process ID contained in this file. -If this field is not present, then a +is sent to the process ID contained in this file. +If this field is not present and the +.Cm N +flag has not been specified, then a .Dv SIGHUP signal will be sent to -.Xr syslogd 8 , -unless the -.Cm N -flag has been specified. +.Xr syslogd 8 +or to the process id found in the file specified by +.Xr newsyslog 8 Ns 's +.Fl S +switch. This field must start with .Ql / in order to be recognized properly. From owner-svn-src-stable@FreeBSD.ORG Mon Aug 23 11:58:45 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 943361065670; Mon, 23 Aug 2010 11:58:45 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F0518FC13; Mon, 23 Aug 2010 11:58:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7NBwjHN039902; Mon, 23 Aug 2010 11:58:45 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7NBwjJp039892; Mon, 23 Aug 2010 11:58:45 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201008231158.o7NBwjJp039892@svn.freebsd.org> From: Ulrich Spoerlein Date: Mon, 23 Aug 2010 11:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211702 - in stable: 7/contrib/bsnmp/gensnmpdef 7/contrib/bsnmp/gensnmptree 7/contrib/bsnmp/lib 7/contrib/bsnmp/snmp_mibII 7/contrib/bsnmp/snmpd 8/contrib/bsnmp/gensnmpdef 8/contrib/bsn... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 11:58:45 -0000 Author: uqs Date: Mon Aug 23 11:58:45 2010 New Revision: 211702 URL: http://svn.freebsd.org/changeset/base/211702 Log: MFC r205078,208483,211401-211402,211404: mdoc cleanup - Fix typo in macro name and macro usage. - Consistently spell our email addresses - Wordsmithing of bsnmpd.1; bump .Dd - Fix two minor typos. Modified: stable/8/contrib/bsnmp/gensnmpdef/gensnmpdef.1 stable/8/contrib/bsnmp/gensnmptree/gensnmptree.1 stable/8/contrib/bsnmp/lib/asn1.3 stable/8/contrib/bsnmp/lib/bsnmpagent.3 stable/8/contrib/bsnmp/lib/bsnmpclient.3 stable/8/contrib/bsnmp/lib/bsnmplib.3 stable/8/contrib/bsnmp/snmp_mibII/snmp_mibII.3 stable/8/contrib/bsnmp/snmpd/bsnmpd.1 stable/8/contrib/bsnmp/snmpd/snmpmod.3 Directory Properties: stable/8/contrib/bsnmp/ (props changed) Changes in other areas also in this revision: Modified: stable/7/contrib/bsnmp/gensnmpdef/gensnmpdef.1 stable/7/contrib/bsnmp/gensnmptree/gensnmptree.1 stable/7/contrib/bsnmp/lib/asn1.3 stable/7/contrib/bsnmp/lib/bsnmpagent.3 stable/7/contrib/bsnmp/lib/bsnmpclient.3 stable/7/contrib/bsnmp/lib/bsnmplib.3 stable/7/contrib/bsnmp/snmp_mibII/snmp_mibII.3 stable/7/contrib/bsnmp/snmpd/bsnmpd.1 stable/7/contrib/bsnmp/snmpd/snmpmod.3 Directory Properties: stable/7/contrib/bsnmp/ (props changed) Modified: stable/8/contrib/bsnmp/gensnmpdef/gensnmpdef.1 ============================================================================== --- stable/8/contrib/bsnmp/gensnmpdef/gensnmpdef.1 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/8/contrib/bsnmp/gensnmpdef/gensnmpdef.1 Mon Aug 23 11:58:45 2010 (r211702) @@ -3,7 +3,7 @@ .\" Hartmut Brandt. .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -78,7 +78,7 @@ file by hand. .Sh SEE ALSO .Xr snmpd 1 .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org .Sh BUGS The utility is by no means bullet-proof and may fail for complex or non-standard MIBs. Modified: stable/8/contrib/bsnmp/gensnmptree/gensnmptree.1 ============================================================================== --- stable/8/contrib/bsnmp/gensnmptree/gensnmptree.1 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/8/contrib/bsnmp/gensnmptree/gensnmptree.1 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Hartmut Brandt .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -58,7 +58,7 @@ If none of the options .Fl e , .Fl E or -.FL t +.Fl t are used .Nm reads a MIB description from its standard input and creates two files: a @@ -243,4 +243,4 @@ typedef AdminStatus ENUM ( .Sh SEE ALSO .Xr bsnmpd 1 .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org Modified: stable/8/contrib/bsnmp/lib/asn1.3 ============================================================================== --- stable/8/contrib/bsnmp/lib/asn1.3 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/8/contrib/bsnmp/lib/asn1.3 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -489,4 +489,4 @@ followed by the error message and an opt This implementation conforms to the applicable IETF RFCs and ITU-T recommendations. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org Modified: stable/8/contrib/bsnmp/lib/bsnmpagent.3 ============================================================================== --- stable/8/contrib/bsnmp/lib/bsnmpagent.3 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/8/contrib/bsnmp/lib/bsnmpagent.3 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -441,4 +441,4 @@ Additionally the functions may call snmp This implementation conforms to the applicable IETF RFCs and ITU-T recommendations. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org Modified: stable/8/contrib/bsnmp/lib/bsnmpclient.3 ============================================================================== --- stable/8/contrib/bsnmp/lib/bsnmpclient.3 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/8/contrib/bsnmp/lib/bsnmpclient.3 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -654,5 +654,5 @@ filed of This implementation conforms to the applicable IETF RFCs and ITU-T recommendations. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org .An Kendy Kutzner Aq kutzner@fokus.gmd.de Modified: stable/8/contrib/bsnmp/lib/bsnmplib.3 ============================================================================== --- stable/8/contrib/bsnmp/lib/bsnmplib.3 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/8/contrib/bsnmp/lib/bsnmplib.3 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -302,4 +302,4 @@ Encoding failed. This implementation conforms to the applicable IETF RFCs and ITU-T recommendations. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org Modified: stable/8/contrib/bsnmp/snmp_mibII/snmp_mibII.3 ============================================================================== --- stable/8/contrib/bsnmp/snmp_mibII/snmp_mibII.3 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/8/contrib/bsnmp/snmp_mibII/snmp_mibII.3 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -363,4 +363,4 @@ The various internet MIBs. .Sh STANDARDS This implementation conforms to the applicable IETF RFCs. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org Modified: stable/8/contrib/bsnmp/snmpd/bsnmpd.1 ============================================================================== --- stable/8/contrib/bsnmp/snmpd/bsnmpd.1 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/8/contrib/bsnmp/snmpd/bsnmpd.1 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -31,7 +31,7 @@ .\" .\" $Begemot: bsnmp/snmpd/bsnmpd.1,v 1.12 2006/02/27 09:50:03 brandt_h Exp $ .\" -.Dd February 27, 2006 +.Dd August 16, 2010 .Dt BSNMPD 1 .Os .Sh NAME @@ -49,7 +49,7 @@ .Sh DESCRIPTION The .Nm -daemon server the internet SNMP (Simple Network Management Protocol). +daemon serves the internet SNMP (Simple Network Management Protocol). It is intended to serve only the absolute basic MIBs and implement all other MIBs through loadable modules. In this way the @@ -59,11 +59,10 @@ can be used in unexpected ways. The options are as follows: .Bl -tag -width ".It Fl D Ar options" .It Fl d -This option is used for debugging -.Nm -and causes it not to daemonize itself. +Do not daemonize. +Used for debugging. .It Fl h -This option prints a short usage message. +Print a short usage message. .It Fl c Ar file Use .Ar file @@ -75,33 +74,32 @@ flag followed by a comma separated strin The following options are available. .Bl -tag -width ".It Cm trace Ns Cm = Ns Cm level" .It Cm dump -This option causes all sent and received PDUs to be dumped to the terminal. +Dump all sent and received PDUs to the terminal. .It Cm events -This causes the debugging level of the event library (see +Set the debugging level of the event library (see .Xr eventlib 3 ) -to be set to 10. +to 10. .It Cm trace Ns Cm = Ns Cm level -This option causes the snmp library trace flag to be set to the specified +Set the snmp library trace flag to the specified value. The value can be specified in the usual C-syntax for numbers. .El .It Fl I Ar paths -This option specifies a colon separated list of directories to search for -configuration include files. +Specify a colon separated list of directories to search for configuration +include files. The default is .Pa /etc:/usr/etc/:/usr/local/etc . These paths are only searched for include specified within <> parentheses. .It Fl l Ar prefix -The +Use .Ar prefix -is used as the default basename for the pid and the configuration files. +as the default basename for the pid and the configuration files. .It Fl m Ar variable Ns Op = Ns Ar value Define a configuration variable. .It Fl p Ar file Specify an alternate pid file instead of the default one. .El .Sh CONFIGURATION -The .Nm reads its configuration from either the default or the user specified configuration file. @@ -218,7 +216,7 @@ If the element is a hostname, the IP address of the host is looked up and the four elements of the IP address are appended to the oid. .Pp -For example a oid of +For example, an oid of .Bd -unfilled -offset indent myvariable.27.foooll.[localhost]."&^!" .Ed @@ -253,13 +251,13 @@ is .It Pa /var/run/ Ns Ao Ar prefix Ac Ns \&.pid Default pid file. .It Pa /etc:/usr/etc/:/usr/local/etc -This is the default search path for system include files. +Default search path for system include files. .It Pa @MIBSPATH@FOKUS-MIB.txt .It Pa @MIBSPATH@BEGEMOT-MIB.txt .It Pa @MIBSPATH@BEGEMOT-SNMPD.txt -The definitions for the MIBs implemented in the daemon. +Definitions for the MIBs implemented in the daemon. .It Pa /etc/hosts.allow, /etc/hosts.deny -Access controls that should be enforced by TCP wrappers should be defined here. +Access controls that should be enforced by TCP wrappers are defined here. Further details are described in .Xr hosts_access 5 . .El @@ -271,6 +269,6 @@ The .Nm conforms to the applicable IETF RFCs. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org .Sh BUGS Sure. Modified: stable/8/contrib/bsnmp/snmpd/snmpmod.3 ============================================================================== --- stable/8/contrib/bsnmp/snmpd/snmpmod.3 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/8/contrib/bsnmp/snmpd/snmpmod.3 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -558,7 +558,7 @@ For modules that implement SNMP client f it may be necessary to identify SNMP requests by their identifier to allow easier routing of responses to the correct sub-system. Request id ranges -provide a way to aquire globally non-overlapping sub-ranges of the entire +provide a way to acquire globally non-overlapping sub-ranges of the entire 31-bit id range. .Pp A request id range is allocated with @@ -586,7 +586,7 @@ The function .Fn reqid_istype checks whether the request id .Fa reqid -is withing the range identified by +is within the range identified by .Fa type . The function .Fn reqid_type @@ -777,7 +777,8 @@ is used for GET or GETNEXT. The function .It Fn string_get_max can be used instead of -.Nf stringto ensure that the returned string has a certain maximum length. +.Fn string_get +to ensure that the returned string has a certain maximum length. If .Fa len is -1, the length is computed via @@ -925,4 +926,4 @@ beginning at position This implementation conforms to the applicable IETF RFCs and ITU-T recommendations. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org From owner-svn-src-stable@FreeBSD.ORG Mon Aug 23 11:58:45 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B00C01065672; Mon, 23 Aug 2010 11:58:45 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99CF28FC15; Mon, 23 Aug 2010 11:58:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7NBwjZ5039916; Mon, 23 Aug 2010 11:58:45 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7NBwjEF039906; Mon, 23 Aug 2010 11:58:45 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201008231158.o7NBwjEF039906@svn.freebsd.org> From: Ulrich Spoerlein Date: Mon, 23 Aug 2010 11:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211702 - in stable: 7/contrib/bsnmp/gensnmpdef 7/contrib/bsnmp/gensnmptree 7/contrib/bsnmp/lib 7/contrib/bsnmp/snmp_mibII 7/contrib/bsnmp/snmpd 8/contrib/bsnmp/gensnmpdef 8/contrib/bsn... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 11:58:45 -0000 Author: uqs Date: Mon Aug 23 11:58:45 2010 New Revision: 211702 URL: http://svn.freebsd.org/changeset/base/211702 Log: MFC r205078,208483,211401-211402,211404: mdoc cleanup - Fix typo in macro name and macro usage. - Consistently spell our email addresses - Wordsmithing of bsnmpd.1; bump .Dd - Fix two minor typos. Modified: stable/7/contrib/bsnmp/gensnmpdef/gensnmpdef.1 stable/7/contrib/bsnmp/gensnmptree/gensnmptree.1 stable/7/contrib/bsnmp/lib/asn1.3 stable/7/contrib/bsnmp/lib/bsnmpagent.3 stable/7/contrib/bsnmp/lib/bsnmpclient.3 stable/7/contrib/bsnmp/lib/bsnmplib.3 stable/7/contrib/bsnmp/snmp_mibII/snmp_mibII.3 stable/7/contrib/bsnmp/snmpd/bsnmpd.1 stable/7/contrib/bsnmp/snmpd/snmpmod.3 Directory Properties: stable/7/contrib/bsnmp/ (props changed) Changes in other areas also in this revision: Modified: stable/8/contrib/bsnmp/gensnmpdef/gensnmpdef.1 stable/8/contrib/bsnmp/gensnmptree/gensnmptree.1 stable/8/contrib/bsnmp/lib/asn1.3 stable/8/contrib/bsnmp/lib/bsnmpagent.3 stable/8/contrib/bsnmp/lib/bsnmpclient.3 stable/8/contrib/bsnmp/lib/bsnmplib.3 stable/8/contrib/bsnmp/snmp_mibII/snmp_mibII.3 stable/8/contrib/bsnmp/snmpd/bsnmpd.1 stable/8/contrib/bsnmp/snmpd/snmpmod.3 Directory Properties: stable/8/contrib/bsnmp/ (props changed) Modified: stable/7/contrib/bsnmp/gensnmpdef/gensnmpdef.1 ============================================================================== --- stable/7/contrib/bsnmp/gensnmpdef/gensnmpdef.1 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/7/contrib/bsnmp/gensnmpdef/gensnmpdef.1 Mon Aug 23 11:58:45 2010 (r211702) @@ -3,7 +3,7 @@ .\" Hartmut Brandt. .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -78,7 +78,7 @@ file by hand. .Sh SEE ALSO .Xr snmpd 1 .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org .Sh BUGS The utility is by no means bullet-proof and may fail for complex or non-standard MIBs. Modified: stable/7/contrib/bsnmp/gensnmptree/gensnmptree.1 ============================================================================== --- stable/7/contrib/bsnmp/gensnmptree/gensnmptree.1 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/7/contrib/bsnmp/gensnmptree/gensnmptree.1 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Hartmut Brandt .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -58,7 +58,7 @@ If none of the options .Fl e , .Fl E or -.FL t +.Fl t are used .Nm reads a MIB description from its standard input and creates two files: a @@ -243,4 +243,4 @@ typedef AdminStatus ENUM ( .Sh SEE ALSO .Xr bsnmpd 1 .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org Modified: stable/7/contrib/bsnmp/lib/asn1.3 ============================================================================== --- stable/7/contrib/bsnmp/lib/asn1.3 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/7/contrib/bsnmp/lib/asn1.3 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -489,4 +489,4 @@ followed by the error message and an opt This implementation conforms to the applicable IETF RFCs and ITU-T recommendations. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org Modified: stable/7/contrib/bsnmp/lib/bsnmpagent.3 ============================================================================== --- stable/7/contrib/bsnmp/lib/bsnmpagent.3 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/7/contrib/bsnmp/lib/bsnmpagent.3 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -441,4 +441,4 @@ Additionally the functions may call snmp This implementation conforms to the applicable IETF RFCs and ITU-T recommendations. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org Modified: stable/7/contrib/bsnmp/lib/bsnmpclient.3 ============================================================================== --- stable/7/contrib/bsnmp/lib/bsnmpclient.3 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/7/contrib/bsnmp/lib/bsnmpclient.3 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -654,5 +654,5 @@ filed of This implementation conforms to the applicable IETF RFCs and ITU-T recommendations. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org .An Kendy Kutzner Aq kutzner@fokus.gmd.de Modified: stable/7/contrib/bsnmp/lib/bsnmplib.3 ============================================================================== --- stable/7/contrib/bsnmp/lib/bsnmplib.3 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/7/contrib/bsnmp/lib/bsnmplib.3 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -302,4 +302,4 @@ Encoding failed. This implementation conforms to the applicable IETF RFCs and ITU-T recommendations. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org Modified: stable/7/contrib/bsnmp/snmp_mibII/snmp_mibII.3 ============================================================================== --- stable/7/contrib/bsnmp/snmp_mibII/snmp_mibII.3 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/7/contrib/bsnmp/snmp_mibII/snmp_mibII.3 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -363,4 +363,4 @@ The various internet MIBs. .Sh STANDARDS This implementation conforms to the applicable IETF RFCs. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org Modified: stable/7/contrib/bsnmp/snmpd/bsnmpd.1 ============================================================================== --- stable/7/contrib/bsnmp/snmpd/bsnmpd.1 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/7/contrib/bsnmp/snmpd/bsnmpd.1 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -31,7 +31,7 @@ .\" .\" $Begemot: bsnmp/snmpd/bsnmpd.1,v 1.12 2006/02/27 09:50:03 brandt_h Exp $ .\" -.Dd February 27, 2006 +.Dd August 16, 2010 .Dt BSNMPD 1 .Os .Sh NAME @@ -49,7 +49,7 @@ .Sh DESCRIPTION The .Nm -daemon server the internet SNMP (Simple Network Management Protocol). +daemon serves the internet SNMP (Simple Network Management Protocol). It is intended to serve only the absolute basic MIBs and implement all other MIBs through loadable modules. In this way the @@ -59,11 +59,10 @@ can be used in unexpected ways. The options are as follows: .Bl -tag -width ".It Fl D Ar options" .It Fl d -This option is used for debugging -.Nm -and causes it not to daemonize itself. +Do not daemonize. +Used for debugging. .It Fl h -This option prints a short usage message. +Print a short usage message. .It Fl c Ar file Use .Ar file @@ -75,33 +74,32 @@ flag followed by a comma separated strin The following options are available. .Bl -tag -width ".It Cm trace Ns Cm = Ns Cm level" .It Cm dump -This option causes all sent and received PDUs to be dumped to the terminal. +Dump all sent and received PDUs to the terminal. .It Cm events -This causes the debugging level of the event library (see +Set the debugging level of the event library (see .Xr eventlib 3 ) -to be set to 10. +to 10. .It Cm trace Ns Cm = Ns Cm level -This option causes the snmp library trace flag to be set to the specified +Set the snmp library trace flag to the specified value. The value can be specified in the usual C-syntax for numbers. .El .It Fl I Ar paths -This option specifies a colon separated list of directories to search for -configuration include files. +Specify a colon separated list of directories to search for configuration +include files. The default is .Pa /etc:/usr/etc/:/usr/local/etc . These paths are only searched for include specified within <> parentheses. .It Fl l Ar prefix -The +Use .Ar prefix -is used as the default basename for the pid and the configuration files. +as the default basename for the pid and the configuration files. .It Fl m Ar variable Ns Op = Ns Ar value Define a configuration variable. .It Fl p Ar file Specify an alternate pid file instead of the default one. .El .Sh CONFIGURATION -The .Nm reads its configuration from either the default or the user specified configuration file. @@ -218,7 +216,7 @@ If the element is a hostname, the IP address of the host is looked up and the four elements of the IP address are appended to the oid. .Pp -For example a oid of +For example, an oid of .Bd -unfilled -offset indent myvariable.27.foooll.[localhost]."&^!" .Ed @@ -253,13 +251,13 @@ is .It Pa /var/run/ Ns Ao Ar prefix Ac Ns \&.pid Default pid file. .It Pa /etc:/usr/etc/:/usr/local/etc -This is the default search path for system include files. +Default search path for system include files. .It Pa @MIBSPATH@FOKUS-MIB.txt .It Pa @MIBSPATH@BEGEMOT-MIB.txt .It Pa @MIBSPATH@BEGEMOT-SNMPD.txt -The definitions for the MIBs implemented in the daemon. +Definitions for the MIBs implemented in the daemon. .It Pa /etc/hosts.allow, /etc/hosts.deny -Access controls that should be enforced by TCP wrappers should be defined here. +Access controls that should be enforced by TCP wrappers are defined here. Further details are described in .Xr hosts_access 5 . .El @@ -271,6 +269,6 @@ The .Nm conforms to the applicable IETF RFCs. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org .Sh BUGS Sure. Modified: stable/7/contrib/bsnmp/snmpd/snmpmod.3 ============================================================================== --- stable/7/contrib/bsnmp/snmpd/snmpmod.3 Mon Aug 23 10:04:26 2010 (r211701) +++ stable/7/contrib/bsnmp/snmpd/snmpmod.3 Mon Aug 23 11:58:45 2010 (r211702) @@ -6,7 +6,7 @@ .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\" All rights reserved. .\" -.\" Author: Harti Brandt +.\" Author: Harti Brandt .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -558,7 +558,7 @@ For modules that implement SNMP client f it may be necessary to identify SNMP requests by their identifier to allow easier routing of responses to the correct sub-system. Request id ranges -provide a way to aquire globally non-overlapping sub-ranges of the entire +provide a way to acquire globally non-overlapping sub-ranges of the entire 31-bit id range. .Pp A request id range is allocated with @@ -586,7 +586,7 @@ The function .Fn reqid_istype checks whether the request id .Fa reqid -is withing the range identified by +is within the range identified by .Fa type . The function .Fn reqid_type @@ -777,7 +777,8 @@ is used for GET or GETNEXT. The function .It Fn string_get_max can be used instead of -.Nf stringto ensure that the returned string has a certain maximum length. +.Fn string_get +to ensure that the returned string has a certain maximum length. If .Fa len is -1, the length is computed via @@ -925,4 +926,4 @@ beginning at position This implementation conforms to the applicable IETF RFCs and ITU-T recommendations. .Sh AUTHORS -.An Hartmut Brandt Aq harti@freebsd.org +.An Hartmut Brandt Aq harti@FreeBSD.org From owner-svn-src-stable@FreeBSD.ORG Mon Aug 23 12:40:40 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0769E1065820; Mon, 23 Aug 2010 12:40:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C92458FC23; Mon, 23 Aug 2010 12:40:39 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 710E446B23; Mon, 23 Aug 2010 08:40:39 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7773A8A04F; Mon, 23 Aug 2010 08:40:38 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Mon, 23 Aug 2010 08:40:19 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201008202058.o7KKwvdp047830@svn.freebsd.org> In-Reply-To: <201008202058.o7KKwvdp047830@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201008230840.20016.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 23 Aug 2010 08:40:38 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r211533 - in stable/7/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/cd9660 fs/udf kern sys ufs/ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 12:40:40 -0000 On Friday, August 20, 2010 4:58:57 pm John Baldwin wrote: > Author: jhb > Date: Fri Aug 20 20:58:57 2010 > New Revision: 211533 > URL: http://svn.freebsd.org/changeset/base/211533 > > Log: > Revert 210173 as it did not properly fix the bug. It assumed that the > VI_LOCK() for a given vnode was used as the internal interlock for that > vnode's v_lock lockmgr lock. This is not the case. Instead, add dedicated > routines to toggle the LK_NOSHARE and LK_CANRECURSE flags. These routines > lock the lockmgr lock's internal interlock to synchronize the updates to > the flags member with other threads attempting to acquire the lock. The > VN_LOCK_A*() macros now invoke these routines, and the softupdates code > uses these routines to temporarly enable recursion on buffer locks. This is a direct commit rather than an MFC as the lockmgr implementation is completely different in relation to this bug than in 8.x and later. -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Mon Aug 23 13:47:20 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F4E610656B2; Mon, 23 Aug 2010 13:47:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 534638FC2A; Mon, 23 Aug 2010 13:47:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7NDlKvJ042376; Mon, 23 Aug 2010 13:47:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7NDlKVp042375; Mon, 23 Aug 2010 13:47:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201008231347.o7NDlKVp042375@svn.freebsd.org> From: John Baldwin Date: Mon, 23 Aug 2010 13:47:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211703 - in stable/8/sys: . amd64/include/xen cam cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 13:47:20 -0000 Author: jhb Date: Mon Aug 23 13:47:20 2010 New Revision: 211703 URL: http://svn.freebsd.org/changeset/base/211703 Log: Move mergeinfo for sys/cam up to sys. Modified: Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cam/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Mon Aug 23 17:48:50 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C2C21065672; Mon, 23 Aug 2010 17:48:50 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AD598FC13; Mon, 23 Aug 2010 17:48:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7NHmoJY047992; Mon, 23 Aug 2010 17:48:50 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7NHmo9L047990; Mon, 23 Aug 2010 17:48:50 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201008231748.o7NHmo9L047990@svn.freebsd.org> From: Maksim Yevmenkin Date: Mon, 23 Aug 2010 17:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211713 - stable/7/sys/netgraph/bluetooth/l2cap X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 17:48:50 -0000 Author: emax Date: Mon Aug 23 17:48:50 2010 New Revision: 211713 URL: http://svn.freebsd.org/changeset/base/211713 Log: MFC r210783 as requested by Helge Oldach on freebsd-bluetooth@ Fix typo PR: kern/140590 Modified: stable/7/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h ============================================================================== --- stable/7/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h Mon Aug 23 17:27:29 2010 (r211712) +++ stable/7/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h Mon Aug 23 17:48:50 2010 (r211713) @@ -379,7 +379,7 @@ do { \ break; \ \ c = mtod((_m), struct _info_rsp *); \ - c->hdr.code = NG_L2CAP_INFO_REQ; \ + c->hdr.code = NG_L2CAP_INFO_RSP; \ c->hdr.ident = (_ident); \ c->hdr.length = sizeof(c->param); \ \ From owner-svn-src-stable@FreeBSD.ORG Mon Aug 23 20:53:02 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 470A410656AC; Mon, 23 Aug 2010 20:53:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A5F08FC27; Mon, 23 Aug 2010 20:53:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7NKr10G052612; Mon, 23 Aug 2010 20:53:01 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7NKr1AF052607; Mon, 23 Aug 2010 20:53:01 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201008232053.o7NKr1AF052607@svn.freebsd.org> From: John Baldwin Date: Mon, 23 Aug 2010 20:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211719 - in stable/8: contrib/bsnmp/snmp_mibII sbin/ifconfig usr.sbin/ndp usr.sbin/ppp X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 20:53:02 -0000 Author: jhb Date: Mon Aug 23 20:53:01 2010 New Revision: 211719 URL: http://svn.freebsd.org/changeset/base/211719 Log: MFC 210936,210946: Ethernet vlan(4) interfaces have valid Ethernet link layer addresses but use a different interface type (IFT_L2VLAN vs IFT_ETHER). Treat IFT_L2VLAN interfaces like IFT_ETHER interfaces when handling link layer addresses. Modified: stable/8/contrib/bsnmp/snmp_mibII/mibII.c stable/8/sbin/ifconfig/af_link.c stable/8/usr.sbin/ndp/ndp.c stable/8/usr.sbin/ppp/ipv6cp.c Directory Properties: stable/8/contrib/bsnmp/ (props changed) stable/8/sbin/ifconfig/ (props changed) stable/8/usr.sbin/ndp/ (props changed) stable/8/usr.sbin/ppp/ (props changed) Modified: stable/8/contrib/bsnmp/snmp_mibII/mibII.c ============================================================================== --- stable/8/contrib/bsnmp/snmp_mibII/mibII.c Mon Aug 23 20:19:17 2010 (r211718) +++ stable/8/contrib/bsnmp/snmp_mibII/mibII.c Mon Aug 23 20:53:01 2010 (r211719) @@ -843,6 +843,7 @@ check_llbcast(struct mibif *ifp) case IFT_ETHER: case IFT_FDDI: case IFT_ISO88025: + case IFT_L2VLAN: if (mib_find_rcvaddr(ifp->index, ether_bcast, 6) == NULL && (rcv = mib_rcvaddr_create(ifp, ether_bcast, 6)) != NULL) rcv->flags |= MIBRCVADDR_BCAST; Modified: stable/8/sbin/ifconfig/af_link.c ============================================================================== --- stable/8/sbin/ifconfig/af_link.c Mon Aug 23 20:19:17 2010 (r211718) +++ stable/8/sbin/ifconfig/af_link.c Mon Aug 23 20:53:01 2010 (r211719) @@ -58,7 +58,9 @@ link_status(int s __unused, const struct struct sockaddr_dl *sdl = (struct sockaddr_dl *) ifa->ifa_addr; if (sdl != NULL && sdl->sdl_alen > 0) { - if (sdl->sdl_type == IFT_ETHER && + if ((sdl->sdl_type == IFT_ETHER || + sdl->sdl_type == IFT_L2VLAN || + sdl->sdl_type == IFT_BRIDGE) && sdl->sdl_alen == ETHER_ADDR_LEN) printf("\tether %s\n", ether_ntoa((struct ether_addr *)LLADDR(sdl))); Modified: stable/8/usr.sbin/ndp/ndp.c ============================================================================== --- stable/8/usr.sbin/ndp/ndp.c Mon Aug 23 20:19:17 2010 (r211718) +++ stable/8/usr.sbin/ndp/ndp.c Mon Aug 23 20:53:01 2010 (r211719) @@ -437,6 +437,7 @@ set(argc, argv) switch (sdl->sdl_type) { case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023: case IFT_ISO88024: case IFT_ISO88025: + case IFT_L2VLAN: case IFT_BRIDGE: goto overwrite; } } Modified: stable/8/usr.sbin/ppp/ipv6cp.c ============================================================================== --- stable/8/usr.sbin/ppp/ipv6cp.c Mon Aug 23 20:19:17 2010 (r211718) +++ stable/8/usr.sbin/ppp/ipv6cp.c Mon Aug 23 20:53:01 2010 (r211719) @@ -148,6 +148,7 @@ SetInterfaceID(u_char *ifid, int userand switch(sdl->sdl_type) { case IFT_ETHER: case IFT_FDDI: + case IFT_L2VLAN: /* XXX need more cases? */ break; default: From owner-svn-src-stable@FreeBSD.ORG Mon Aug 23 20:53:24 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF7F11065696; Mon, 23 Aug 2010 20:53:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82ADD8FC19; Mon, 23 Aug 2010 20:53:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7NKrODa052659; Mon, 23 Aug 2010 20:53:24 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7NKrO2G052654; Mon, 23 Aug 2010 20:53:24 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201008232053.o7NKrO2G052654@svn.freebsd.org> From: John Baldwin Date: Mon, 23 Aug 2010 20:53:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211720 - in stable/7: contrib/bsnmp/snmp_mibII sbin/ifconfig usr.sbin/ndp usr.sbin/ppp X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 20:53:24 -0000 Author: jhb Date: Mon Aug 23 20:53:24 2010 New Revision: 211720 URL: http://svn.freebsd.org/changeset/base/211720 Log: MFC 210936,210946: Ethernet vlan(4) interfaces have valid Ethernet link layer addresses but use a different interface type (IFT_L2VLAN vs IFT_ETHER). Treat IFT_L2VLAN interfaces like IFT_ETHER interfaces when handling link layer addresses. Modified: stable/7/contrib/bsnmp/snmp_mibII/mibII.c stable/7/sbin/ifconfig/af_link.c stable/7/usr.sbin/ndp/ndp.c stable/7/usr.sbin/ppp/ipv6cp.c Directory Properties: stable/7/contrib/bsnmp/ (props changed) stable/7/sbin/ifconfig/ (props changed) stable/7/usr.sbin/ndp/ (props changed) stable/7/usr.sbin/ppp/ (props changed) Modified: stable/7/contrib/bsnmp/snmp_mibII/mibII.c ============================================================================== --- stable/7/contrib/bsnmp/snmp_mibII/mibII.c Mon Aug 23 20:53:01 2010 (r211719) +++ stable/7/contrib/bsnmp/snmp_mibII/mibII.c Mon Aug 23 20:53:24 2010 (r211720) @@ -821,6 +821,7 @@ check_llbcast(struct mibif *ifp) case IFT_ETHER: case IFT_FDDI: case IFT_ISO88025: + case IFT_L2VLAN: if (mib_find_rcvaddr(ifp->index, ether_bcast, 6) == NULL && (rcv = mib_rcvaddr_create(ifp, ether_bcast, 6)) != NULL) rcv->flags |= MIBRCVADDR_BCAST; Modified: stable/7/sbin/ifconfig/af_link.c ============================================================================== --- stable/7/sbin/ifconfig/af_link.c Mon Aug 23 20:53:01 2010 (r211719) +++ stable/7/sbin/ifconfig/af_link.c Mon Aug 23 20:53:24 2010 (r211720) @@ -58,7 +58,9 @@ link_status(int s __unused, const struct struct sockaddr_dl *sdl = (struct sockaddr_dl *) ifa->ifa_addr; if (sdl != NULL && sdl->sdl_alen > 0) { - if (sdl->sdl_type == IFT_ETHER && + if ((sdl->sdl_type == IFT_ETHER || + sdl->sdl_type == IFT_L2VLAN || + sdl->sdl_type == IFT_BRIDGE) && sdl->sdl_alen == ETHER_ADDR_LEN) printf("\tether %s\n", ether_ntoa((struct ether_addr *)LLADDR(sdl))); Modified: stable/7/usr.sbin/ndp/ndp.c ============================================================================== --- stable/7/usr.sbin/ndp/ndp.c Mon Aug 23 20:53:01 2010 (r211719) +++ stable/7/usr.sbin/ndp/ndp.c Mon Aug 23 20:53:24 2010 (r211720) @@ -433,6 +433,7 @@ set(argc, argv) switch (sdl->sdl_type) { case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023: case IFT_ISO88024: case IFT_ISO88025: + case IFT_L2VLAN: case IFT_BRIDGE: goto overwrite; } } Modified: stable/7/usr.sbin/ppp/ipv6cp.c ============================================================================== --- stable/7/usr.sbin/ppp/ipv6cp.c Mon Aug 23 20:53:01 2010 (r211719) +++ stable/7/usr.sbin/ppp/ipv6cp.c Mon Aug 23 20:53:24 2010 (r211720) @@ -148,6 +148,7 @@ SetInterfaceID(u_char *ifid, int userand switch(sdl->sdl_type) { case IFT_ETHER: case IFT_FDDI: + case IFT_L2VLAN: /* XXX need more cases? */ break; default: From owner-svn-src-stable@FreeBSD.ORG Mon Aug 23 22:09:26 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DE4A10656AA; Mon, 23 Aug 2010 22:09:26 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39F7C8FC13; Mon, 23 Aug 2010 22:09:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7NM9QSg055014; Mon, 23 Aug 2010 22:09:26 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7NM9Q5l055003; Mon, 23 Aug 2010 22:09:26 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201008232209.o7NM9Q5l055003@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 23 Aug 2010 22:09:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211723 - in stable/8/usr.bin/calendar: . calendars calendars/ru_RU.KOI8-R X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2010 22:09:26 -0000 Author: edwin Date: Mon Aug 23 22:09:25 2010 New Revision: 211723 URL: http://svn.freebsd.org/changeset/base/211723 Log: MFC of r205821 r205827 r205828 r205862 r205872 r205937 r206568 MFC of r208825 r208826 r208827 r208828 r208829 r208943 r205821: Long awaited update to the calendar system: - Repeating events which span multiple years (because of -A, -B or just the three days before the end of the year). - Support for lunar events (full moon, new moon) and solar events (equinox and solstice, chinese new year). Because of this, the options -U (UTC offset) and -l (longitude) are available to compensate if reality doesn't match the calculated values. r205828: Use local names for calendar.dutch r205862: Fix DST thingies in calendar.australia r205872: Make licenses 3 clause instead of 4 clause r205937: Make the dates in the Tasmanian part of calendar.australia properly variable. r206568: Typo in Allerheiligen in calendar.dutch r208825, r208826, r208827, r208828, r208829, r208943: Coverity Prevent related fixes. Modified: stable/8/usr.bin/calendar/Makefile stable/8/usr.bin/calendar/calendar.1 stable/8/usr.bin/calendar/calendar.c stable/8/usr.bin/calendar/calendar.h stable/8/usr.bin/calendar/calendars/calendar.australia stable/8/usr.bin/calendar/calendars/calendar.dutch stable/8/usr.bin/calendar/calendars/calendar.freebsd stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.common (contents, props changed) stable/8/usr.bin/calendar/day.c stable/8/usr.bin/calendar/io.c stable/8/usr.bin/calendar/ostern.c stable/8/usr.bin/calendar/paskha.c stable/8/usr.bin/calendar/pathnames.h Directory Properties: stable/8/usr.bin/calendar/ (props changed) Modified: stable/8/usr.bin/calendar/Makefile ============================================================================== --- stable/8/usr.bin/calendar/Makefile Mon Aug 23 22:04:30 2010 (r211722) +++ stable/8/usr.bin/calendar/Makefile Mon Aug 23 22:09:25 2010 (r211723) @@ -2,13 +2,17 @@ # $FreeBSD$ PROG= calendar -SRCS= calendar.c io.c day.c ostern.c paskha.c +SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ + ostern.c paskha.c pom.c sunpos.c +LDADD= -lm INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ hr_HR.ISO8859-2 hu_HU.ISO8859-2 ru_RU.KOI8-R uk_UA.KOI8-U DE_LINKS= de_DE.ISO8859-15 FR_LINKS= fr_FR.ISO8859-15 TEXTMODE?= 444 +WARNS?= 7 + beforeinstall: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ ${.CURDIR}/calendars/calendar.* ${DESTDIR}${SHAREDIR}/calendar Modified: stable/8/usr.bin/calendar/calendar.1 ============================================================================== --- stable/8/usr.bin/calendar/calendar.1 Mon Aug 23 22:04:30 2010 (r211722) +++ stable/8/usr.bin/calendar/calendar.1 Mon Aug 23 22:09:25 2010 (r211723) @@ -9,10 +9,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. @@ -54,6 +50,8 @@ .Ek .Oc .Op Fl W Ar num +.Op Fl U Ar UTC-offset +.Op Fl l Ar longitude .Sh DESCRIPTION The .Nm @@ -93,6 +91,12 @@ as the default calendar file. .Sm on .Xc For test purposes only: set date directly to argument values. +.It Fl l Ar longitude , Fl U Ar UTC-offset +Only one is needed: +Perform lunar and solar calculations from this longitude or from +this UTC offset. +If neither is specified, the calculations will be based on the +difference between UTC time and localtime. .It Fl W Ar num Print lines from today and the next .Ar num @@ -103,12 +107,36 @@ Ignore weekends when calculating the num To handle calendars in your national code table you can specify .Dq LANG= in the calendar file as early as possible. -To handle national Easter -names in the calendars -.Dq Easter= -(for Catholic Easter) or -.Dq Paskha= -(for Orthodox Easter) can be used. +.Pp +To handle the local name of sequences, you can specify them as: +.Dq SEQUENCE= +in the calendar file as early as possible. +.Pp +The names of the following special days are recognized: +.Bl -tag -width 123456789012345 -compact +.It Easter +Catholic Easter. +.It Paskha +Orthodox Easter. +.It NewMoon +The lunar New Moon. +.It FullMoon +The lunar Full Moon. +.It MarEquinox +The solar equinox in March. +.It JunSolstice +The solar solstice in June. +.It SepEquinox +The solar equinox in March. +.It DecSolstice +The solar solstice in December. +.It ChineseNewYear +The first day of the Chinese year. +.El +These names may be reassigned to their local names via an assignment +like +.Dq Easter=Pasen +in the calendar file. .Pp Other lines should begin with a month and day. They may be entered in almost any format, either numeric or as character @@ -122,11 +150,11 @@ Two numbers default to the month followe Lines with leading tabs default to the last entered date, allowing multiple line specifications for a single date. .Pp -``Easter'', is Easter for this year, and may be followed by a positive -or negative integer. -.Pp -``Paskha'', is Orthodox Easter for this year, and may be followed by a -positive or negative integer. +The names of the recognized special days may be followed by a +positive or negative integer, like: +.Dq Easter+3 +or +.Dq Pashka-4 . .Pp Weekdays may be followed by ``-4'' ...\& ``+5'' (aliases for last, first, second, third, fourth) for moving events like @@ -191,7 +219,8 @@ calendar file to use if no calendar file do not send mail if this file exists. .El .Pp -The following default calendar files are provided: +The following default calendar files are provided in +.Pa /usr/share/calendars: .Pp .Bl -tag -width calendar.southafrica -compact .It Pa calendar.all @@ -208,6 +237,8 @@ so that roving holidays are set correctl Days of special significance to computer people. .It Pa calendar.croatian Calendar of events in Croatia. +.It Pa calendar.dutch +Calendar of events in the Netherlands. .It Pa calendar.freebsd Birthdays of .Fx @@ -259,7 +290,28 @@ A .Nm command appeared in .At v7 . +.Sh NOTES +Chinese New Year is calculated at 120 degrees east of Greenwich, +which roughly corresponds with the east coast of China. +For people west of China, this might result that the start of Chinese +New Year and the day of the related new moon might differ. +.Pp +The phases of the moon and the longitude of the sun are calculated +against the local position which corresponds with 30 degrees times +the time-difference towards Greenwich. +.Pp +The new and full moons are happening on the day indicated: They +might happen in the time period in the early night or in the late +evening. +It doesn't indicate that they are starting in the night on that date. +.Pp +Because of minor differences between the output of the formulas +used and other sources on the Internet, Druids and Werewolves should +double-check the start and end time of solar and lunar events. .Sh BUGS The .Nm -utility does not handle Jewish holidays and moon phases. +utility does not handle Jewish holidays. +.Pp +There is no possibility to properly specify the local position +needed for solar and lunar calculations. Modified: stable/8/usr.bin/calendar/calendar.c ============================================================================== --- stable/8/usr.bin/calendar/calendar.c Mon Aug 23 22:04:30 2010 (r211722) +++ stable/8/usr.bin/calendar/calendar.c Mon Aug 23 22:09:25 2010 (r211723) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -52,30 +48,38 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include -#include "pathnames.h" #include "calendar.h" +#define UTCOFFSET_NOTSET 100 /* Expected between -24 and +24 */ +#define LONGITUDE_NOTSET 1000 /* Expected between -360 and +360 */ + struct passwd *pw; int doall = 0; +int debug = 0; +char *DEBUG = NULL; time_t f_time = 0; - -int f_dayAfter = 0; /* days after current date */ -int f_dayBefore = 0; /* days before current date */ -int Friday = 5; /* day before weekend */ +double UTCOffset = UTCOFFSET_NOTSET; +int EastLongitude = LONGITUDE_NOTSET; static void usage(void) __dead2; int main(int argc, char *argv[]) { + int f_dayAfter = 0; /* days after current date */ + int f_dayBefore = 0; /* days before current date */ + int Friday = 5; /* day before weekend */ + int ch; + struct tm tp1, tp2; (void)setlocale(LC_ALL, ""); - while ((ch = getopt(argc, argv, "-A:aB:F:f:t:W:")) != -1) + while ((ch = getopt(argc, argv, "-A:aB:dD:F:f:l:t:U:W:")) != -1) switch (ch) { case '-': /* backward contemptible */ case 'a': @@ -90,14 +94,10 @@ main(int argc, char *argv[]) calendarFile = optarg; break; - case 't': /* other date, undocumented, for tests */ - f_time = Mktime(optarg); - break; - case 'W': /* we don't need no steenking Fridays */ Friday = -1; - /* FALLTHROUGH */ + case 'A': /* days after current date */ f_dayAfter = atoi(optarg); break; @@ -106,9 +106,25 @@ main(int argc, char *argv[]) f_dayBefore = atoi(optarg); break; - case 'F': + case 'F': /* Change the time: When does weekend start? */ Friday = atoi(optarg); break; + case 'l': /* Change longitudal position */ + EastLongitude = strtol(optarg, NULL, 10); + break; + case 'U': /* Change UTC offset */ + UTCOffset = strtod(optarg, NULL); + break; + + case 'd': + debug = 1; + break; + case 'D': + DEBUG = optarg; + break; + case 't': /* other date, undocumented, for tests */ + f_time = Mktime(optarg); + break; case '?': default: @@ -125,7 +141,60 @@ main(int argc, char *argv[]) if (f_time <= 0) (void)time(&f_time); - settime(f_time); + /* if not set, determine where I could be */ + { + if (UTCOffset == UTCOFFSET_NOTSET && + EastLongitude == LONGITUDE_NOTSET) { + /* Calculate on difference between here and UTC */ + time_t t; + struct tm tm; + long utcoffset, hh, mm, ss; + double uo; + + time(&t); + localtime_r(&t, &tm); + utcoffset = tm.tm_gmtoff; + /* seconds -> hh:mm:ss */ + hh = utcoffset / SECSPERHOUR; + utcoffset %= SECSPERHOUR; + mm = utcoffset / SECSPERMINUTE; + utcoffset %= SECSPERMINUTE; + ss = utcoffset; + + /* hh:mm:ss -> hh.mmss */ + uo = mm + (100.0 * (ss / 60.0)); + uo /= 60.0 / 100.0; + uo = hh + uo / 100; + + UTCOffset = uo; + EastLongitude = UTCOffset * 15; + } else if (UTCOffset == UTCOFFSET_NOTSET) { + /* Base on information given */ + UTCOffset = EastLongitude / 15; + } else if (EastLongitude == LONGITUDE_NOTSET) { + /* Base on information given */ + EastLongitude = UTCOffset * 15; + } + } + + settimes(f_time, f_dayBefore, f_dayAfter, Friday, &tp1, &tp2); + generatedates(&tp1, &tp2); + + /* + * FROM now on, we are working in UTC. + * This will only affect moon and sun related events anyway. + */ + if (setenv("TZ", "UTC", 1) != 0) + errx(1, "setenv: %s", strerror(errno)); + tzset(); + + if (debug) + dumpdates(); + + if (DEBUG != NULL) { + dodebug(DEBUG); + exit(0); + } if (doall) while ((pw = getpwent()) != NULL) { @@ -146,9 +215,11 @@ static void __dead2 usage(void) { - fprintf(stderr, "%s\n%s\n", + fprintf(stderr, "%s\n%s\n%s\n", "usage: calendar [-a] [-A days] [-B days] [-F friday] " "[-f calendarfile]", - " [-t dd[.mm[.year]]] [-W days]"); + " [-d] [-t dd[.mm[.year]]] [-W days]", + " [-U utcoffset] [-l longitude]" + ); exit(1); } Modified: stable/8/usr.bin/calendar/calendar.h ============================================================================== --- stable/8/usr.bin/calendar/calendar.h Mon Aug 23 22:04:30 2010 (r211722) +++ stable/8/usr.bin/calendar/calendar.h Mon Aug 23 22:09:25 2010 (r211723) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -36,43 +32,163 @@ #include #include +#define SECSPERDAY (24 * 60 * 60) +#define SECSPERHOUR (60 * 60) +#define SECSPERMINUTE (60) +#define MINSPERHOUR (60) +#define HOURSPERDAY (24) +#define FSECSPERDAY (24.0 * 60.0 * 60.0) +#define FSECSPERHOUR (60.0 * 60.0) +#define FSECSPERMINUTE (60.0) +#define FMINSPERHOUR (60.0) +#define FHOURSPERDAY (24.0) + +#define DAYSPERYEAR 365 +#define DAYSPERLEAPYEAR 366 + +/* Not yet categorized */ + extern struct passwd *pw; extern int doall; -extern struct iovec header[]; -extern struct tm *tp; +extern time_t t1, t2; extern const char *calendarFile; -extern int *cumdays; extern int yrdays; -extern struct fixs neaster, npaskha; - -void cal(void); -void closecal(FILE *); -int getday(char *); -int getdayvar(char *); -int getfield(char *, char **, int *); -int getmonth(char *); -int geteaster(char *, int); -int getpaskha(char *, int); -int easter(int); -int isnow(char *, int *, int *, int *); -FILE *opencal(void); -void settime(time_t); -time_t Mktime(char *); -void setnnames(void); +extern struct fixs neaster, npaskha, ncny, nfullmoon, nnewmoon; +extern struct fixs nmarequinox, nsepequinox, njunsolstice, ndecsolstice; +extern double UTCOffset; +extern int EastLongitude; #define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) -/* some flags */ -#define F_ISMONTH 0x01 /* month (January ...) */ -#define F_ISDAY 0x02 /* day of week (Sun, Mon, ...) */ -#define F_ISDAYVAR 0x04 /* variables day of week, like SundayLast */ -#define F_EASTER 0x08 /* Easter or easter depending days */ - -extern int f_dayAfter; /* days after current date */ -extern int f_dayBefore; /* days before current date */ -extern int Friday; /* day before weekend */ +/* Flags to determine the returned values by determinestyle() in parsedata.c */ +#define F_NONE 0x00000 +#define F_MONTH 0x00001 +#define F_DAYOFWEEK 0x00002 +#define F_DAYOFMONTH 0x00004 +#define F_MODIFIERINDEX 0x00008 +#define F_MODIFIEROFFSET 0x00010 +#define F_SPECIALDAY 0x00020 +#define F_ALLMONTH 0x00040 +#define F_ALLDAY 0x00080 +#define F_VARIABLE 0x00100 +#define F_EASTER 0x00200 +#define F_CNY 0x00400 +#define F_PASKHA 0x00800 +#define F_NEWMOON 0x01000 +#define F_FULLMOON 0x02000 +#define F_MAREQUINOX 0x04000 +#define F_SEPEQUINOX 0x08000 +#define F_JUNSOLSTICE 0x10000 +#define F_DECSOLSTICE 0x20000 + +#define STRING_EASTER "Easter" +#define STRING_PASKHA "Paskha" +#define STRING_CNY "ChineseNewYear" +#define STRING_NEWMOON "NewMoon" +#define STRING_FULLMOON "FullMoon" +#define STRING_MAREQUINOX "MarEquinox" +#define STRING_SEPEQUINOX "SepEquinox" +#define STRING_JUNSOLSTICE "JunSolstice" +#define STRING_DECSOLSTICE "DecSolstice" + +#define MAXCOUNT 125 /* Random number of maximum number of + * repeats of an event. Should be 52 + * (number of weeks per year), if you + * want to show two years then it + * should be 104. If you are seeing + * more than this you are using this + * program wrong. + */ + +/* + * All the astronomical calculations are carried out for the meridian 120 + * degrees east of Greenwich. + */ +#define UTCOFFSET_CNY 8.0 + +extern int debug; /* show parsing of the input */ +extern int year1, year2; + +/* events.c */ +/* + * Event sorting related functions: + * - Use event_add() to create a new event + * - Use event_continue() to add more text to the last added event + * - Use event_print_all() to display them in time chronological order + */ +struct event *event_add(int, int, int, char *, int, char *, char *); +void event_continue(struct event *events, char *txt); +void event_print_all(FILE *fp); +struct event { + int year; + int month; + int day; + int var; + char *date; + char *text; + char *extra; + struct event *next; +}; + +/* locale.c */ struct fixs { char *name; - int len; + size_t len; }; + +extern const char *days[]; +extern const char *fdays[]; +extern const char *fmonths[]; +extern const char *months[]; +extern const char *sequences[]; +extern struct fixs fndays[8]; /* full national days names */ +extern struct fixs fnmonths[13]; /* full national months names */ +extern struct fixs ndays[8]; /* short national days names */ +extern struct fixs nmonths[13]; /* short national month names */ +extern struct fixs nsequences[10]; + +void setnnames(void); +void setnsequences(char *); + +/* day.c */ +extern const struct tm tm0; +extern char dayname[]; +void settimes(time_t,int before, int after, int friday, struct tm *tp1, struct tm *tp2); +time_t Mktime(char *); + +/* parsedata.c */ +int parsedaymonth(char *, int *, int *, int *, int *, char **); +void dodebug(char *type); + +/* io.c */ +void cal(void); +void closecal(FILE *); +FILE *opencal(void); + +/* ostern.c / pashka.c */ +int paskha(int); +int easter(int); + +/* dates.c */ +extern int cumdaytab[][14]; +extern int mondaytab[][14]; +extern int debug_remember; +void generatedates(struct tm *tp1, struct tm *tp2); +void dumpdates(void); +int remember_ymd(int y, int m, int d); +int remember_yd(int y, int d, int *rm, int *rd); +int first_dayofweek_of_year(int y); +int first_dayofweek_of_month(int y, int m); +int walkthrough_dates(struct event **e); +void addtodate(struct event *e, int year, int month, int day); + +/* pom.c */ +#define MAXMOONS 18 +void pom(int year, double UTCoffset, int *fms, int *nms); +void fpom(int year, double utcoffset, double *ffms, double *fnms); + +/* sunpos.c */ +void equinoxsolstice(int year, double UTCoffset, int *equinoxdays, int *solsticedays); +void fequinoxsolstice(int year, double UTCoffset, double *equinoxdays, double *solsticedays); +int calculatesunlongitude30(int year, int degreeGMToffset, int *ichinesemonths); Modified: stable/8/usr.bin/calendar/calendars/calendar.australia ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.australia Mon Aug 23 22:04:30 2010 (r211722) +++ stable/8/usr.bin/calendar/calendars/calendar.australia Mon Aug 23 22:09:25 2010 (r211723) @@ -10,49 +10,63 @@ LANG=en_AU.ISO8859-1 /* Australia */ -Jan 26 Australia Day -Mar/SunLast Daylight Savings Time ends in ACT, NSW, SA, TAS and VIC. -Apr 25 Anzac Day +Jan 26 Australia Day +Apr/SunFirst Daylight Savings Time ends in ACT, NSW, SA, TAS and VIC. +Apr 25 Anzac Day Jun/MonSecond Queen's Birthday Holiday (Australia, except WA) -Oct/SunLast Daylight Savings Time starts in ACT, NSW, SA and VIC. +Oct/SunFirst Daylight Savings Time starts in ACT, NSW, SA and VIC. /* ACT, NSW, common */ -Mar 18 Canberra Day (ACT) -8/MonFirst Bank Holiday (ACT, NSW) -10/MonFirst Labour Day (ACT, NSW, SA) +Mar 18 Canberra Day (ACT) +Sep/MonLast Family & Community Day (ACT) +Aug/MonFirst Bank Holiday (ACT, NSW) +Oct/MonFirst Labour Day (ACT, NSW, SA) /* Victoria */ -3/MonSecond Labour Day (Vic) -Nov/TueFirst Melbourne Cup (Vic) +Mar/MonSecond Labour Day (VIC) +Nov/TueFirst Melbourne Cup (VIC) -/* Tasmania */ -Feb 11 Regatta Day (Tas) -Feb 27 Launceston Cup (Tas) -Mar 11 Eight Hours Day (Tas) -Oct/SunFirst Daylight Savings Time starts in TAS. -Oct 10 Launceston Show Day (Tas) -Oct 24 Hobart Show Day (Tas) -Nov 04 Recreation Day (N Tas) +/* Tasmania + * http://www.wst.tas.gov.au/employment_info/public_holidays/html/2010 + */ +Feb/MonSecond Regatta Day (TAS) +Feb/WedLast Launceston Cup (TAS) +Mar/TueFirst King Island show (TAS) +Mar/MonSecond Eight Hours Day (TAS) +Oct 10 Launceston Show Day (TAS) /* Thursday preceding second Saturday in October */ +Oct 24 Hobart Show Day (TAS) /* Thursday preceding fourth Saturday in October */ +Nov/MonFirst Recreation Day (N TAS) + +/* +Oct/SatSecond-2 Launceston Show Day (TAS) // Thursday preceding second Sat in October +Oct/SatFourth-2 Hobart Show Day (TAS) // Thursday preceding fourth Sat in October +May/ThuFirst+1 Agfest (Circular Head only) // Friday following the first Thursday in May +Oct/SatFirst-1 Burnie Show // Friday preceding first Saturday in October +Oct/SatThird-1 Flinders Island Show // Friday preceding third Saturday in October + +DEVONPORT CUP Wednesday not earlier than fifth and not later than eleventh day of January +DEVONPORT SHOW Friday nearest last day in November, but not later than first day of December +*/ /* South Australia */ May/MonThird Adelaide Cup (SA) -Dec 26 Proclamation Day holiday (SA) +Dec 26 Proclamation Day holiday (SA) /* Western Australia */ -3/MonFirst Labour Day (WA) -6/MonFirst Foundation Day (WA) -Sep 30 Queen's Birthday (WA) +Mar/MonFirst Labour Day (WA) +Jun/MonFirst Foundation Day (WA) +Sep 30 Queen's Birthday (WA) /* Northern Territory */ -5/MonFirst May Day (NT) -7/FriFirst Alice Springs Show Day (NT) -7/FriSecond Tennant Creek Show Day (NT) -7/FriThird Katherine Show Day (NT) -7/FriLast Darwin Show Day (NT) -8/MonFirst Picnic Day (NT) +May/MonFirst May Day (NT) +Jul/FriFirst Alice Springs Show Day (NT) +Jul/FriSecond Tennant Creek Show Day (NT) +Jul/FriThird Katherine Show Day (NT) +Jul/FriLast Darwin Show Day (NT) +Aug/MonFirst Picnic Day (NT) /* Queensland */ -5/MonFirst Labour Day (Qld) -Aug 14 RNA Show Day (Brisbane metro) +May/MonFirst Labour Day (QLD) +Aug/WedSecond RNA Show Day (Brisbane metro) /* Second Last Wednesday */ #endif Modified: stable/8/usr.bin/calendar/calendars/calendar.dutch ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.dutch Mon Aug 23 22:04:30 2010 (r211722) +++ stable/8/usr.bin/calendar/calendars/calendar.dutch Mon Aug 23 22:09:25 2010 (r211723) @@ -10,25 +10,25 @@ Easter=Pasen /* * Feestdagen */ -01/01 Nieuwjaar -01/06 Driekoningen -04/01 Een April -04/30 Koninginendag -05/01 Dag van de Arbeid -05/04 Dodenherdenking -05/05 Bevrijdingsdag -10/04 Dierendag -11/01 Allerheilingen -11/02 Allerzielen -11/11 Sint Maarten -11/11 Elfde-van-de-elfde -12/05 Sinterklaas avond -12/15 Koninkrijksdag -12/24 Kerstavond -12/25 Eerste kerstdag -12/26 Tweede kerstdag -12/28 Feest der Onnozele Kinderen -12/31 Oudjaar +jan/01 Nieuwjaar +jan/06 Driekoningen +apr/01 1 april +apr/30 Koninginnedag +mei/01 Dag van de Arbeid +mei/04 Dodenherdenking +mei/05 Bevrijdingsdag +okt/04 Dierendag +nov/01 Allerheiligen +nov/02 Allerzielen +nov/11 Sint Maarten +nov/11 Elfde-van-de-elfde +dec/05 Sinterklaas avond +dec/15 Koninkrijksdag +dec/24 Kerstavond +dec/25 Eerste kerstdag +dec/26 Tweede kerstdag +dec/28 Feest der Onnozele Kinderen +dec/31 Oudjaar /* * Pasen gerelateerd @@ -38,12 +38,12 @@ Pasen-49 Carnaval Pasen-48 Carnaval Pasen-47 Carnaval (Vastenavond) Pasen-46 Aswoensdag -Pasen-7 Palmzondag -Pasen-3 Witte Donderdag -Pasen-2 Goede vrijdag -Pasen-1 Stille zaterdag +Pasen-7 Palmzondag +Pasen-3 Witte Donderdag +Pasen-2 Goede vrijdag +Pasen-1 Stille zaterdag Pasen Eerste paasdag -Pasen+1 Tweede paasdag +Pasen+1 Tweede paasdag Pasen+39 Hemelvaartsdag Pasen+49 Eerste Pinksterdag Pasen+50 Tweede Pinksterdag @@ -52,28 +52,28 @@ Pasen+56 Trinitatis /* * Misc */ -05/SunSecond Moederdag -06/SunThird Vaderdag -09/TueThird Prinsjesdag +mei/SunSecond Moederdag +jun/SunThird Vaderdag +sep/TueThird Prinsjesdag /* * Het koningshuis */ -01/19 Prinses Margriet (1943) -01/31 Koningin Beatrix (1938) -02/17 Prins Willem III (1817 - 1890) -02/18 Prinses Christina (1947) -04/10 Prinses Ariane (2007) -04/19 Prins Hendrik (1876 - 1934) -04/27 Kroonprins Willem Alexander (1967) -04/30 Koningin Juliana (1909 - 2004) -04/30 Mr. Pieter van Vollenhoven (1939) -05/17 Prinses Maxima (1971) -06/26 Prinses Alexia (2005) -06/29 Prins Bernhard (1911 - 2004) -08/05 Prinses Irene (1939) -08/31 Prinses Wilhelmina (1880 - 1962) -09/06 Prins Claus (1925 - 2002) -09/25 Prins Johan Friso (1968) -10/11 Prins Constantijn (1969) -12/07 Prinses Catharina-Amalia (2003) +jan/19 Prinses Margriet (1943) +jan/31 Koningin Beatrix (1938) +feb/17 Prins Willem III (1817 - 1890) +feb/18 Prinses Christina (1947) +apr/10 Prinses Ariane (2007) +apr/19 Prins Hendrik (1876 - 1934) +apr/27 Kroonprins Willem Alexander (1967) +apr/30 Koningin Juliana (1909 - 2004) +apr/30 Mr. Pieter van Vollenhoven (1939) +mei/17 Prinses Maxima (1971) +jun/26 Prinses Alexia (2005) +jun/29 Prins Bernhard (1911 - 2004) +aug/05 Prinses Irene (1939) +aug/31 Prinses Wilhelmina (1880 - 1962) +sep/06 Prins Claus (1925 - 2002) +sep/25 Prins Johan Friso (1968) +okt/11 Prins Constantijn (1969) +dec/07 Prinses Catharina-Amalia (2003) Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.freebsd Mon Aug 23 22:04:30 2010 (r211722) +++ stable/8/usr.bin/calendar/calendars/calendar.freebsd Mon Aug 23 22:09:25 2010 (r211723) @@ -72,6 +72,7 @@ 03/03 Doug White born in Eugene, Oregon, United States, 1977 03/03 Gordon Tetlow born in Reno, Nevada, United States, 1978 03/04 Oleksandr Tymoshenko born in Chernihiv, Ukraine, 1980 +03/05 Baptiste Daroussin born in Beauvais, France, 1980 03/05 Philip Paeps born in Leuven, Belgium, 1983 03/05 Ulf Lilleengen born in Hamar, Norway, 1985 03/06 Christopher Piazza born in Kamloops, British Columbia, Canada, 1981 @@ -82,6 +83,7 @@ 03/12 Greg Lewis born in Adelaide, South Australia, Australia, 1969 03/13 Alexander Leidinger born in Neunkirchen, Saarland, Germany, 1976 03/13 Will Andrews born in Pontiac, Michigan, United States, 1982 +03/14 Bernhard Froehlich born in Graz, Styria, Austria, 1985 03/15 Paolo Pisati born in Lodi, Italy, 1977 03/15 Brian Fundakowski Feldman born in Alexandria, Virginia, United States, 1983 03/17 Michael Smith born in Bankstown, New South Wales, Australia, 1971 @@ -91,6 +93,7 @@ 03/20 MANTANI Nobutaka born in Hiroshima, Japan, 1978 03/20 Cameron Grant died in Hemel Hempstead, United Kingdom, 2005 03/20 Henrik Brix Andersen born in Aarhus, Denmark, 1978 +03/20 Joseph S. Atkinson born in Batesville, Arkansas, United States, 1977 03/22 Brad Davis born in Farmington, New Mexico, United States, 1983 03/23 Daniel C. Sobral born in Brasilia, Distrito Federal, Brazil, 1971 03/23 Benno Rice born in Adelaide, South Australia, Australia, 1977 @@ -135,6 +138,7 @@ 05/11 Jesus Rodriguez born in Barcelona, Spain, 1972 05/11 Roman Kurakin born in Moscow, USSR, 1979 05/13 Pete Fritchman born in Lansdale, Pennsylvania, United States, 1983 +05/14 Bruce Cran born in Cambridge, United Kingdom, 1981 05/14 Tatsumi Hosokawa born in Tokyo, Japan, 1968 05/14 Shigeyuku Fukushima born in Osaka, Japan, 1974 05/16 Johann Kois born in Wolfsberg, Austria, 1975 @@ -200,6 +204,7 @@ 07/19 Masafumi NAKANE born in Okazaki, Aichi, Japan, 1972 07/19 Simon L. Nielsen born in Copenhagen, Denmark, 1980 07/19 Gleb Smirnoff born in Kharkov, USSR, 1981 +07/20 Andrey V. Elsukov born in Kotelnich, Russian Federation, 1981 07/22 James Housley born in Chicago, Illinois, United States, 1965 07/22 Jens Schweikhardt born in Waiblingen, Baden-Wuerttemberg, Germany, 1967 07/22 Lukas Ertl born in Weissenbach/Enns, Steiermark, Austria, 1976 @@ -251,6 +256,7 @@ 09/12 Benedict Christopher Reuschling born in Darmstadt, Germany, 1981 09/15 Dima Panov born in Khabarovsk, Russian Federation, 1978 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 +09/18 Matthew Fleming born in Cleveland, Ohio, United States, 1975 09/20 Kevin Lo born in Taipei, Taiwan, Republic of China, 1972 09/27 Neil Blakey-Milner born in Port Elizabeth, South Africa, 1978 09/27 Renato Botelho born in Araras, Sao Paulo, Brazil, 1979 @@ -284,6 +290,7 @@ 11/10 Gregory Neil Shapiro born in Providence, Rhode Island, United States, 1970 11/13 John Baldwin born in Stuart, Virginia, United States, 1977 11/15 Lars Engels born in Hilden, Nordrhein-Westfalen, Germany, 1980 +11/15 Tijl Coosemans born in Duffel, Belgium, 1983 11/16 Jose Maria Alcaide Salinas born in Madrid, Spain, 1962 11/17 Ralf S. Engelschall born in Dachau, Bavaria, Germany, 1972 11/18 Thomas Quinot born in Paris, France, 1977 Modified: stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.common ============================================================================== --- stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.common Mon Aug 23 22:04:30 2010 (r211722) +++ stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.common Mon Aug 23 22:09:25 2010 (r211723) @@ -18,6 +18,7 @@ LANG=ru_RU.KOI8-R 10 ÆÅ× äÅÎØ ÄÉÐÌÏÍÁÔÉÞÅÓËÏÇÏ ÒÁÂÏÔÎÉËÁ 1 ÍÁÒ ÷ÓÅÍÉÒÎÙÊ ÄÅÎØ ÇÒÁÖÄÁÎÓËÏÊ ÏÂÏÒÏÎÙ 03/SunSecond äÅÎØ ÒÁÂÏÔÎÉËÏ× ÇÅÏÄÅÚÉÉ É ËÁÒÔÏÇÒÁÆÉÉ +11 ÍÁÒ äÅÎØ ÒÁÂÏÔÎÉËÁ ÏÒÇÁÎÏ× ÎÁÒËÏËÏÎÔÒÏÌÑ 18 ÍÁÒ äÅÎØ ÎÁÌÏÇÏ×ÏÊ ÐÏÌÉÃÉÉ 03/SunThird äÅÎØ ÒÁÂÏÔÎÉËÏ× ÔÏÒÇÏ×ÌÉ, ÂÙÔÏ×ÏÇÏ ÏÂÓÌÕÖÉ×ÁÎÉÑ ÎÁÓÅÌÅÎÉÑ É ÖÉÌÉÝÎÏ-ËÏÍÍÕÎÁÌØÎÏÇÏ ÈÏÚÑÊÓÔ×Á 27 ÍÁÒ íÅÖÄÕÎÁÒÏÄÎÙÊ ÄÅÎØ ÔÅÁÔÒÁ @@ -33,22 +34,28 @@ LANG=ru_RU.KOI8-R 17 ÍÁÊ íÅÖÄÕÎÁÒÏÄÎÙÊ ÄÅÎØ ÔÅÌÅËÏÍÍÕÎÉËÁÃÉÊ 18 ÍÁÊ íÅÖÄÕÎÁÒÏÄÎÙÊ ÄÅÎØ ÍÕÚÅÅ× 24 ÍÁÊ äÅÎØ ÓÌÁ×ÑÎÓËÏÊ ÐÉÓØÍÅÎÎÏÓÔÉ É ËÕÌØÔÕÒÙ +26 ÍÁÊ äÅÎØ ÒÏÓÓÉÊÓËÏÇÏ ÐÒÅÄÐÒÉÎÉÍÁÔÅÌØÓÔ×Á 27 ÍÁÊ ïÂÝÅÒÏÓÓÉÊÓËÉÊ ÄÅÎØ ÂÉÂÌÉÏÔÅË 28 ÍÁÊ äÅÎØ ÐÏÇÒÁÎÉÞÎÉËÁ +30 ÍÁÊ äÅÎØ ÐÏÖÁÒÎÏÊ ÏÈÒÁÎÙ +31 ÍÁÊ äÅÎØ òÏÓÓÉÊÓËÏÊ áÄ×ÏËÁÔÕÒÙ 05/SunLast äÅÎØ ÈÉÍÉËÁ 1 ÉÀÎ äÅÎØ ÚÁÝÉÔÙ ÄÅÔÅÊ + 5 ÉÀÎ äÅÎØ ÜËÏÌÏÇÁ 6 ÉÀÎ ðÕÛËÉÎÓËÉÊ ÄÅÎØ 8 ÉÀÎ äÅÎØ ÓÏÃÉÁÌØÎÏÇÏ ÒÁÂÏÔÎÉËÁ 06/SunSecond äÅÎØ ÒÁÂÏÔÎÉËÏ× ÌÅÇËÏÊ ÐÒÏÍÙÛÌÅÎÎÏÓÔÉ 06/SunThird äÅÎØ ÍÅÄÉÃÉÎÓËÏÇÏ ÒÁÂÏÔÎÉËÁ 22 ÉÀÎ äÅÎØ ÐÁÍÑÔÉ É ÓËÏÒÂÉ (îÁÞÁÌÏ ÷ÅÌÉËÏÊ ïÔÅÞÅÓÔ×ÅÎÎÏÊ ÷ÏÊÎÙ, 1941 ÇÏÄ) 27 ÉÀÎ äÅÎØ ÍÏÌÏÄÅÖÉ +29 ÉÀÎ äÅÎØ ÐÁÒÔÉÚÁÎ É ÐÏÄÐÏÌØÝÉËÏ× 06/SatLast äÅÎØ ÉÚÏÂÒÅÔÁÔÅÌÑ É ÒÁÃÉÏÎÁÌÉÚÁÔÏÒÁ 07/SunFirst äÅÎØ ÒÁÂÏÔÎÉËÏ× ÍÏÒÓËÏÇÏ É ÒÅÞÎÏÇÏ ÆÌÏÔÁ 07/SunSecond äÅÎØ ÒÙÂÁËÁ 07/SunSecond äÅÎØ ÒÏÓÓÉÊÓËÏÊ ÐÏÞÔÙ 07/SunThird äÅÎØ ÍÅÔÁÌÌÕÒÇÁ 07/SunLast äÅÎØ ÷ÏÅÎÎÏ-íÏÒÓËÏÇÏ æÌÏÔÁ +28 ÉÀÌ äÅÎØ ËÒÅÝÅÎÉÑ òÕÓÉ 6 Á×Ç äÅÎØ ÖÅÌÅÚÎÏÄÏÒÏÖÎÙÈ ×ÏÊÓË 08/SunFirst äÅÎØ ÖÅÌÅÚÎÏÄÏÒÏÖÎÉËÁ 12 Á×Ç äÅÎØ ×ÏÅÎÎÏ-×ÏÚÄÕÛÎÙÈ ÓÉÌ @@ -59,12 +66,16 @@ LANG=ru_RU.KOI8-R 08/SunLast äÅÎØ ÛÁÈÔÅÒÁ 1 ÓÅÎ äÅÎØ ÚÎÁÎÉÊ 2 ÓÅÎ äÅÎØ ÒÏÓÓÉÊÓËÏÊ Ç×ÁÒÄÉÉ + 3 ÓÅÎ äÅÎØ ÓÏÌÉÄÁÒÎÏÓÔÉ × ÂÏÒØÂÅ Ó ÔÅÒÒÏÒÉÚÍÏÍ + 4 ÓÅÎ äÅÎØ ÓÐÅÃÉÁÌÉÓÔÁ ÐÏ ÑÄÅÒÎÏÍÕ ÏÂÅÓÐÅÞÅÎÉÀ 09/SunFirst äÅÎØ ÒÁÂÏÔÎÉËÏ× ÎÅÆÔÑÎÏÊ É ÇÁÚÏ×ÏÊ ÐÒÏÍÙÛÌÅÎÎÏÓÔÉ 09/SunSecond äÅÎØ ÔÁÎËÉÓÔÁ 09/SunThird äÅÎØ ÒÁÂÏÔÎÉËÏ× ÌÅÓÁ +28 ÓÅÎ äÅÎØ ÒÁÂÏÔÎÉËÁ ÁÔÏÍÎÏÊ ÐÒÏÍÙÛÌÅÎÎÏÓÔÉ 09/SunLast äÅÎØ ÍÁÛÉÎÏÓÔÒÏÉÔÅÌÑ 1 ÏËÔ äÅÎØ ÐÏÖÉÌÙÈ ÌÀÄÅÊ - 4 ÏËÔ äÅÎØ ×ÏÅÎÎÏ-ËÏÓÍÉÞÅÓËÉÈ ÓÉÌ + 1 ÏËÔ äÅÎØ ÓÕÈÏÐÕÔÎÙÈ ×ÏÊÓË + 4 ÏËÔ äÅÎØ ËÏÓÍÉÞÅÓËÉÈ ×ÏÊÓË 5 ÏËÔ äÅÎØ ÕÞÉÔÅÌÑ 14 ÏËÔ íÅÖÄÕÎÁÒÏÄÎÙÊ ÄÅÎØ ÓÔÁÎÄÁÒÔÉÚÁÃÉÉ 10/SunSecond äÅÎØ ÒÁÂÏÔÎÉËÏ× ÓÅÌØÓËÏÇÏ ÈÏÚÑÊÓÔ×Á É ÐÅÒÅÒÁÂÁÔÙ×ÁÀÝÅÊ ÐÒÏÍÙÛÌÅÎÎÏÓÔÉ @@ -73,15 +84,19 @@ LANG=ru_RU.KOI8-R 25 ÏËÔ äÅÎØ ÔÁÍÏÖÅÎÎÉËÁ 30 ÏËÔ äÅÎØ ÐÁÍÑÔÉ ÖÅÒÔ× ÐÏÌÉÔÉÞÅÓËÉÈ ÒÅÐÒÅÓÓÉÊ 10/SunLast äÅÎØ ÒÁÂÏÔÎÉËÏ× Á×ÔÏÍÏÂÉÌØÎÏÇÏ ÔÒÁÎÓÐÏÒÔÁ + 7 ÎÏÑ äÅÎØ ÏËÔÑÂÒØÓËÏÊ ÒÅ×ÏÌÀÃÉÉ 1917 ÇÏÄÁ 9 ÎÏÑ ÷ÓÅÍÉÒÎÙÊ ÄÅÎØ ËÁÞÅÓÔ×Á 10 ÎÏÑ äÅÎØ ÍÉÌÉÃÉÉ 16 ÎÏÑ äÅÎØ ÍÏÒÓËÏÊ ÐÅÈÏÔÙ 17 ÎÏÑ íÅÖÄÕÎÁÒÏÄÎÙÊ ÄÅÎØ ÓÔÕÄÅÎÔÏ× -11/SunThird äÅÎØ ÒÁËÅÔÎÙÈ ×ÏÊÓË É ÁÒÔÉÌÌÅÒÉÉ +19 ÎÏÑ äÅÎØ ÒÁËÅÔÎÙÈ ×ÏÊÓË É ÁÒÔÉÌÌÅÒÉÉ 21 ÎÏÑ äÅÎØ ÒÁÂÏÔÎÉËÏ× ÎÁÌÏÇÏ×ÙÈ ÏÒÇÁÎÏ× 26 ÎÏÑ ÷ÓÅÍÉÒÎÙÊ ÄÅÎØ ÉÎÆÏÒÍÁÃÉÉ 11/SunLast äÅÎØ ÍÁÔÅÒÉ 1 ÄÅË ÷ÓÅÍÉÒÎÙÊ ÄÅÎØ ÂÏÒØÂÙ ÓÏ óðéäÏÍ + 3 ÄÅË äÅÎØ ÀÒÉÓÔÁ + 9 ÄÅË äÅÎØ çÅÒÏÅ× ïÔÅÞÅÓÔ×Á +12 ÄÅË äÅÎØ ëÏÎÓÔÉÔÕÃÉÉ 17 ÄÅË äÅÎØ ÒÁËÅÔÎÙÈ ×ÏÊÓË ÓÔÒÁÔÅÇÉÞÅÓËÏÇÏ ÎÁÚÎÁÞÅÎÉÑ 20 ÄÅË äÅÎØ ÒÁÂÏÔÎÉËÁ ÏÒÇÁÎÏ× ÂÅÚÏÐÁÓÎÏÓÔÉ 22 ÄÅË äÅÎØ ÜÎÅÒÇÅÔÉËÁ Modified: stable/8/usr.bin/calendar/day.c ============================================================================== --- stable/8/usr.bin/calendar/day.c Mon Aug 23 22:04:30 2010 (r211722) +++ stable/8/usr.bin/calendar/day.c Mon Aug 23 22:09:25 2010 (r211723) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * @@ -10,10 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -34,9 +30,6 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include #include #include #include @@ -44,123 +37,40 @@ __FBSDID("$FreeBSD$"); #include #include -#include "pathnames.h" #include "calendar.h" -struct tm *tp; -static const struct tm tm0; -int *cumdays, yrdays; -char dayname[10]; - - -/* 1-based month, 0-based days, cumulative */ -int daytab[][14] = { - {0, -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364}, - {0, -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, -}; - -static char const *days[] = { - "sun", "mon", "tue", "wed", "thu", "fri", "sat", NULL, -}; - -static const char *months[] = { - "jan", "feb", "mar", "apr", "may", "jun", - "jul", "aug", "sep", "oct", "nov", "dec", NULL, -}; - -static struct fixs fndays[8]; /* full national days names */ -static struct fixs ndays[8]; /* short national days names */ - -static struct fixs fnmonths[13]; /* full national months names */ -static struct fixs nmonths[13]; /* short national month names */ +time_t time1, time2; +const struct tm tm0; +char dayname[100]; +int year1, year2; void -setnnames(void) -{ - char buf[80]; - int i, l; - struct tm tm; - - for (i = 0; i < 7; i++) { - tm.tm_wday = i; - strftime(buf, sizeof(buf), "%a", &tm); - for (l = strlen(buf); - l > 0 && isspace((unsigned char)buf[l - 1]); - l--) - ; - buf[l] = '\0'; - if (ndays[i].name != NULL) - free(ndays[i].name); - if ((ndays[i].name = strdup(buf)) == NULL) - errx(1, "cannot allocate memory"); - ndays[i].len = strlen(buf); - - strftime(buf, sizeof(buf), "%A", &tm); - for (l = strlen(buf); - l > 0 && isspace((unsigned char)buf[l - 1]); - l--) - ; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Aug 24 06:57:13 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8143B106564A; Tue, 24 Aug 2010 06:57:13 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 425178FC15; Tue, 24 Aug 2010 06:57:13 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:786b:92c8:74d6:de20] (unknown [IPv6:2001:7b8:3a7:0:786b:92c8:74d6:de20]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 3FCE75C59; Tue, 24 Aug 2010 08:57:12 +0200 (CEST) Message-ID: <4C736D4F.6080003@andric.com> Date: Tue, 24 Aug 2010 08:57:19 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.9pre) Gecko/20100814 Lanikai/3.1.3pre MIME-Version: 1.0 To: Edwin Groothuis References: <201008232209.o7NM9Q5l055003@svn.freebsd.org> In-Reply-To: <201008232209.o7NM9Q5l055003@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r211723 - in stable/8/usr.bin/calendar: . calendars calendars/ru_RU.KOI8-R X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2010 06:57:13 -0000 On 2010-08-24 00:09, Edwin Groothuis wrote: > Author: edwin > Date: Mon Aug 23 22:09:25 2010 > New Revision: 211723 > URL: http://svn.freebsd.org/changeset/base/211723 > > Log: > MFC of r205821 r205827 r205828 r205862 r205872 r205937 r206568 > MFC of r208825 r208826 r208827 r208828 r208829 r208943 > > r205821: > Long awaited update to the calendar system: ... > Modified: > stable/8/usr.bin/calendar/Makefile > stable/8/usr.bin/calendar/calendar.1 > stable/8/usr.bin/calendar/calendar.c > stable/8/usr.bin/calendar/calendar.h > stable/8/usr.bin/calendar/calendars/calendar.australia > stable/8/usr.bin/calendar/calendars/calendar.dutch > stable/8/usr.bin/calendar/calendars/calendar.freebsd > stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.common (contents, props changed) > stable/8/usr.bin/calendar/day.c > stable/8/usr.bin/calendar/io.c > stable/8/usr.bin/calendar/ostern.c > stable/8/usr.bin/calendar/paskha.c > stable/8/usr.bin/calendar/pathnames.h > Directory Properties: > stable/8/usr.bin/calendar/ (props changed) Hi Edwin, I think you forgot to add usr.bin/calendar/locale.c here? The tinderboxes complain: ===> usr.bin/calendar (depend) make: don't know how to make locale.c. Stop *** Error code 2 From owner-svn-src-stable@FreeBSD.ORG Tue Aug 24 07:51:20 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F3691065673; Tue, 24 Aug 2010 07:51:20 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from k7.mavetju.org (unknown [IPv6:2001:44b8:7bf1:a51:20f:eaff:fe2c:d518]) by mx1.freebsd.org (Postfix) with ESMTP id D46BC8FC1D; Tue, 24 Aug 2010 07:51:19 +0000 (UTC) Received: by k7.mavetju.org (Postfix, from userid 1001) id C48434526C; Tue, 24 Aug 2010 17:51:17 +1000 (EST) Date: Tue, 24 Aug 2010 17:51:17 +1000 From: Edwin Groothuis To: Dimitry Andric Message-ID: <20100824075117.GE2361@mavetju.org> References: <201008232209.o7NM9Q5l055003@svn.freebsd.org> <4C736D4F.6080003@andric.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C736D4F.6080003@andric.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r211723 - in stable/8/usr.bin/calendar: . calendars calendars/ru_RU.KOI8-R X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2010 07:51:20 -0000 On Tue, Aug 24, 2010 at 08:57:19AM +0200, Dimitry Andric wrote: > I think you forgot to add usr.bin/calendar/locale.c here? The > tinderboxes complain: > > ===> usr.bin/calendar (depend) > make: don't know how to make locale.c. Stop > *** Error code 2 I'm confused, shouldn't they be added automatically because of the "svn merge"? Committing them now, my apologies. Edwin -- Edwin Groothuis Website: http://www.mavetju.org/ edwin@mavetju.org Weblog: http://www.mavetju.org/weblog/ From owner-svn-src-stable@FreeBSD.ORG Tue Aug 24 07:59:40 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 187CC10656AC; Tue, 24 Aug 2010 07:59:40 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05D058FC18; Tue, 24 Aug 2010 07:59:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7O7xdOC067441; Tue, 24 Aug 2010 07:59:39 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7O7xd4A067435; Tue, 24 Aug 2010 07:59:39 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201008240759.o7O7xd4A067435@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 24 Aug 2010 07:59:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211734 - stable/8/usr.bin/calendar X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2010 07:59:40 -0000 Author: edwin Date: Tue Aug 24 07:59:39 2010 New Revision: 211734 URL: http://svn.freebsd.org/changeset/base/211734 Log: For some reason, the new files which got merged from the head branch didn't get automatically added to the repository. MFC of r205821 r205827 r205828 r205862 r205872 r205937 r206568 MFC of r208825 r208826 r208827 r208828 r208829 r208943 r205821: Long awaited update to the calendar system: - Repeating events which span multiple years (because of -A, -B or just the three days before the end of the year). - Support for lunar events (full moon, new moon) and solar events (equinox and solstice, chinese new year). Because of this, the options -U (UTC offset) and -l (longitude) are available to compensate if reality doesn't match the calculated values. r205828: Use local names for calendar.dutch r205862: Fix DST thingies in calendar.australia r205872: Make licenses 3 clause instead of 4 clause r205937: Make the dates in the Tasmanian part of calendar.australia properly variable. r206568: Typo in Allerheiligen in calendar.dutch r208825, r208826, r208827, r208828, r208829, r208943: Coverity Prevent related fixes. Added: stable/8/usr.bin/calendar/dates.c (contents, props changed) stable/8/usr.bin/calendar/events.c (contents, props changed) stable/8/usr.bin/calendar/locale.c (contents, props changed) stable/8/usr.bin/calendar/parsedata.c (contents, props changed) stable/8/usr.bin/calendar/pom.c (contents, props changed) stable/8/usr.bin/calendar/sunpos.c (contents, props changed) Added: stable/8/usr.bin/calendar/dates.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/usr.bin/calendar/dates.c Tue Aug 24 07:59:39 2010 (r211734) @@ -0,0 +1,452 @@ +/*- + * Copyright (c) 1992-2009 Edwin Groothuis . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include "calendar.h" + +struct cal_year { + int year; /* 19xx, 20xx, 21xx */ + int easter; /* Julian day */ + int paskha; /* Julian day */ + int cny; /* Julian day */ + int firstdayofweek; /* 0 .. 6 */ + struct cal_month *months; + struct cal_year *nextyear; +} cal_year; + +struct cal_month { + int month; /* 01 .. 12 */ + int firstdayjulian; /* 000 .. 366 */ + int firstdayofweek; /* 0 .. 6 */ + struct cal_year *year; /* points back */ + struct cal_day *days; + struct cal_month *nextmonth; +} cal_month; + +struct cal_day { + int dayofmonth; /* 01 .. 31 */ + int julianday; /* 000 .. 366 */ + int dayofweek; /* 0 .. 6 */ + struct cal_day *nextday; + struct cal_month *month; /* points back */ + struct cal_year *year; /* points back */ + struct event *events; +} cal_day; + +int debug_remember = 0; +struct cal_year *hyear = NULL; + +/* 1-based month, 0-based days, cumulative */ +int *cumdays; +int cumdaytab[][14] = { + {0, -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364}, + {0, -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, +}; +/* 1-based month, individual */ +int *mondays; +int mondaytab[][14] = { + {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 30}, + {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 30}, +}; + +static struct cal_day * find_day(int yy, int mm, int dd); + +static void +createdate(int y, int m, int d) +{ + struct cal_year *py, *pyp; + struct cal_month *pm, *pmp; + struct cal_day *pd, *pdp; + int *cumday; + + pyp = NULL; + py = hyear; + while (py != NULL) { + if (py->year == y + 1900) + break; + pyp = py; + py = py->nextyear; + } + + if (py == NULL) { + struct tm td; + time_t t; + py = (struct cal_year *)calloc(1, sizeof(struct cal_year)); + py->year = y + 1900; + py->easter = easter(y); + py->paskha = paskha(y); + + td = tm0; + td.tm_year = y; + td.tm_mday = 1; + t = mktime(&td); + localtime_r(&t, &td); + py->firstdayofweek = td.tm_wday; + + if (pyp != NULL) + pyp->nextyear = py; + } + if (pyp == NULL) { + /* The very very very first one */ + hyear = py; + } + + pmp = NULL; + pm = py->months; + while (pm != NULL) { + if (pm->month == m) + break; + pmp = pm; + pm = pm->nextmonth; + } + + if (pm == NULL) { + pm = (struct cal_month *)calloc(1, sizeof(struct cal_month)); + pm->year = py; + pm->month = m; + cumday = cumdaytab[isleap(y)]; + pm->firstdayjulian = cumday[m] + 2; + pm->firstdayofweek = + (py->firstdayofweek + pm->firstdayjulian -1) % 7; + if (pmp != NULL) + pmp->nextmonth = pm; + } + if (pmp == NULL) + py->months = pm; + + pdp = NULL; + pd = pm->days; + while (pd != NULL) { + pdp = pd; + pd = pd->nextday; + } + + if (pd == NULL) { /* Always true */ + pd = (struct cal_day *)calloc(1, sizeof(struct cal_day)); + pd->month = pm; + pd->year = py; + pd->dayofmonth = d; + pd->julianday = pm->firstdayjulian + d - 1; + pd->dayofweek = (pm->firstdayofweek + d - 1) % 7; + if (pdp != NULL) + pdp->nextday = pd; + } + if (pdp == NULL) + pm->days = pd; +} + +void +generatedates(struct tm *tp1, struct tm *tp2) +{ + int y1, m1, d1; + int y2, m2, d2; + int y, m, d; + + y1 = tp1->tm_year; + m1 = tp1->tm_mon + 1; + d1 = tp1->tm_mday; + y2 = tp2->tm_year; + m2 = tp2->tm_mon + 1; + d2 = tp2->tm_mday; + + if (y1 == y2) { + if (m1 == m2) { + /* Same year, same month. Easy! */ + for (d = d1; d <= d2; d++) + createdate(y1, m1, d); + return; + } + /* + * Same year, different month. + * - Take the leftover days from m1 + * - Take all days from + * - Take the first days from m2 + */ + mondays = mondaytab[isleap(y1)]; + for (d = d1; d <= mondays[m1]; d++) + createdate(y1, m1, d); + for (m = m1 + 1; m < m2; m++) + for (d = 1; d <= mondays[m]; d++) + createdate(y1, m, d); + for (d = 1; d <= d2; d++) + createdate(y1, m2, d); + return; + } + /* + * Different year, different month. + * - Take the leftover days from y1-m1 + * - Take all days from y1- + * - Take all days from y2-[1 .. m2> + * - Take the first days of y2-m2 + */ + mondays = mondaytab[isleap(y1)]; + for (d = d1; d <= mondays[m1]; d++) + createdate(y1, m1, d); + for (m = m1 + 1; m <= 12; m++) + for (d = 1; d <= mondays[m]; d++) + createdate(y1, m, d); + for (y = y1 + 1; y < y2; y++) { + mondays = mondaytab[isleap(y)]; + for (m = 1; m <= 12; m++) + for (d = 1; d <= mondays[m]; d++) + createdate(y, m, d); + } + mondays = mondaytab[isleap(y2)]; + for (m = 1; m < m2; m++) + for (d = 1; d <= mondays[m]; d++) + createdate(y2, m, d); + for (d = 1; d <= d2; d++) + createdate(y2, m2, d); +} + +void +dumpdates(void) +{ + struct cal_year *y; + struct cal_month *m; + struct cal_day *d; + + y = hyear; + while (y != NULL) { + printf("%-5d (wday:%d)\n", y->year, y->firstdayofweek); + m = y->months; + while (m != NULL) { + printf("-- %-5d (julian:%d, dow:%d)\n", m->month, + m->firstdayjulian, m->firstdayofweek); + d = m->days; + while (d != NULL) { + printf(" -- %-5d (julian:%d, dow:%d)\n", + d->dayofmonth, d->julianday, d->dayofweek); + d = d->nextday; + } + m = m->nextmonth; + } + y = y->nextyear; + } +} + +int +remember_ymd(int yy, int mm, int dd) +{ + struct cal_year *y; + struct cal_month *m; + struct cal_day *d; + + if (debug_remember) + printf("remember_ymd: %d - %d - %d\n", yy, mm, dd); + + y = hyear; + while (y != NULL) { + if (y->year != yy) { + y = y->nextyear; + continue; + } + m = y->months; + while (m != NULL) { + if (m->month != mm) { + m = m->nextmonth; + continue; + } + d = m->days; + while (d != NULL) { + if (d->dayofmonth == dd) + return (1); + d = d->nextday; + continue; + } + return (0); + } + return (0); + } + return (0); +} + +int +remember_yd(int yy, int dd, int *rm, int *rd) +{ + struct cal_year *y; + struct cal_month *m; + struct cal_day *d; + + if (debug_remember) + printf("remember_yd: %d - %d\n", yy, dd); + + y = hyear; + while (y != NULL) { + if (y->year != yy) { + y = y->nextyear; + continue; + } + m = y->months; + while (m != NULL) { + d = m->days; + while (d != NULL) { + if (d->julianday == dd) { + *rm = m->month; + *rd = d->dayofmonth; + return (1); + } + d = d->nextday; + } + m = m->nextmonth; + } + return (0); + } + return (0); +} + +int +first_dayofweek_of_year(int yy) +{ + struct cal_year *y; + + y = hyear; + while (y != NULL) { + if (y->year == yy) + return (y->firstdayofweek); + y = y->nextyear; + } + + /* Should not happen */ + return (-1); +} + +int +first_dayofweek_of_month(int yy, int mm) +{ + struct cal_year *y; + struct cal_month *m; + + y = hyear; + while (y != NULL) { + if (y->year != yy) { + y = y->nextyear; + continue; + } + m = y->months; + while (m != NULL) { + if (m->month == mm) + return (m->firstdayofweek); + m = m->nextmonth; + } + /* Should not happen */ + return (-1); + } + + /* Should not happen */ + return (-1); +} + +int +walkthrough_dates(struct event **e) +{ + static struct cal_year *y = NULL; + static struct cal_month *m = NULL; + static struct cal_day *d = NULL; + + if (y == NULL) { + y = hyear; + m = y->months; + d = m->days; + *e = d->events; + return (1); + }; + if (d->nextday != NULL) { + d = d->nextday; + *e = d->events; + return (1); + } + if (m->nextmonth != NULL) { + m = m->nextmonth; + d = m->days; + *e = d->events; + return (1); + } + if (y->nextyear != NULL) { + y = y->nextyear; + m = y->months; + d = m->days; + *e = d->events; + return (1); + } + + return (0); +} + +static struct cal_day * +find_day(int yy, int mm, int dd) +{ + struct cal_year *y; + struct cal_month *m; + struct cal_day *d; + + if (debug_remember) + printf("remember_ymd: %d - %d - %d\n", yy, mm, dd); + + y = hyear; + while (y != NULL) { + if (y->year != yy) { + y = y->nextyear; + continue; + } + m = y->months; + while (m != NULL) { + if (m->month != mm) { + m = m->nextmonth; + continue; + } + d = m->days; + while (d != NULL) { + if (d->dayofmonth == dd) + return (d); + d = d->nextday; + continue; + } + return (NULL); + } + return (NULL); + } + return (NULL); +} + +void +addtodate(struct event *e, int year, int month, int day) +{ + struct cal_day *d; + + d = find_day(year, month, day); + e->next = d->events; + d->events = e; +} Added: stable/8/usr.bin/calendar/events.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/usr.bin/calendar/events.c Tue Aug 24 07:59:39 2010 (r211734) @@ -0,0 +1,126 @@ +/*- + * Copyright (c) 1992-2009 Edwin Groothuis . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include "pathnames.h" +#include "calendar.h" + +struct event * +event_add(int year, int month, int day, char *date, int var, char *txt, + char *extra) +{ + struct event *e; + + /* + * Creating a new event: + * - Create a new event + * - Copy the machine readable day and month + * - Copy the human readable and language specific date + * - Copy the text of the event + */ + e = (struct event *)calloc(1, sizeof(struct event)); + if (e == NULL) + errx(1, "event_add: cannot allocate memory"); + e->month = month; + e->day = day; + e->var = var; + e->date = strdup(date); + if (e->date == NULL) + errx(1, "event_add: cannot allocate memory"); + e->text = strdup(txt); + if (e->text == NULL) + errx(1, "event_add: cannot allocate memory"); + e->extra = NULL; + if (extra != NULL && extra[0] != '\0') + e->extra = strdup(extra); + addtodate(e, year, month, day); + return (e); +} + +void +event_continue(struct event *e, char *txt) +{ + char *text; + + /* + * Adding text to the event: + * - Save a copy of the old text (unknown length, so strdup()) + * - Allocate enough space for old text + \n + new text + 0 + * - Store the old text + \n + new text + * - Destroy the saved copy. + */ + text = strdup(e->text); + if (text == NULL) + errx(1, "event_continue: cannot allocate memory"); + + free(e->text); + e->text = (char *)malloc(strlen(text) + strlen(txt) + 3); + if (e->text == NULL) + errx(1, "event_continue: cannot allocate memory"); + strcpy(e->text, text); + strcat(e->text, "\n"); + strcat(e->text, txt); + free(text); + + return; +} + +void +event_print_all(FILE *fp) +{ + struct event *e; + + while (walkthrough_dates(&e) != 0) { +#ifdef DEBUG + fprintf(stderr, "event_print_allmonth: %d, day: %d\n", + month, day); +#endif + + /* + * Go through all events and print the text of the matching + * dates + */ + while (e != NULL) { + (void)fprintf(fp, "%s%c%s%s%s%s\n", e->date, + e->var ? '*' : ' ', e->text, + e->extra != NULL ? " (" : "", + e->extra != NULL ? e->extra : "", + e->extra != NULL ? ")" : "" + ); + + e = e->next; + } + } +} Added: stable/8/usr.bin/calendar/locale.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/usr.bin/calendar/locale.c Tue Aug 24 07:59:39 2010 (r211734) @@ -0,0 +1,166 @@ +/*- + * Copyright (c) 1989, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include "calendar.h" + +const char *fdays[] = { + "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", + "Saturday", NULL, +}; + +const char *days[] = { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", NULL, +}; + +const char *fmonths[] = { + "January", "February", "March", "April", "May", "June", "Juli", + "August", "September", "October", "November", "December", NULL, +}; + +const char *months[] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", NULL, +}; + +const char *sequences[] = { + "First", "Second", "Third", "Fourth", "Fifth", "Last" +}; + +struct fixs fndays[8]; /* full national days names */ +struct fixs ndays[8]; /* short national days names */ +struct fixs fnmonths[13]; /* full national months names */ +struct fixs nmonths[13]; /* short national month names */ +struct fixs nsequences[10]; /* national sequence names */ + + +void +setnnames(void) +{ + char buf[80]; + int i, l; + struct tm tm; + + memset(&tm, 0, sizeof(struct tm)); + for (i = 0; i < 7; i++) { + tm.tm_wday = i; + strftime(buf, sizeof(buf), "%a", &tm); + for (l = strlen(buf); + l > 0 && isspace((unsigned char)buf[l - 1]); + l--) + ; + buf[l] = '\0'; + if (ndays[i].name != NULL) + free(ndays[i].name); + if ((ndays[i].name = strdup(buf)) == NULL) + errx(1, "cannot allocate memory"); + ndays[i].len = strlen(buf); + + strftime(buf, sizeof(buf), "%A", &tm); + for (l = strlen(buf); + l > 0 && isspace((unsigned char)buf[l - 1]); + l--) + ; + buf[l] = '\0'; + if (fndays[i].name != NULL) + free(fndays[i].name); + if ((fndays[i].name = strdup(buf)) == NULL) + errx(1, "cannot allocate memory"); + fndays[i].len = strlen(buf); + } + + memset(&tm, 0, sizeof(struct tm)); + for (i = 0; i < 12; i++) { + tm.tm_mon = i; + strftime(buf, sizeof(buf), "%b", &tm); + for (l = strlen(buf); + l > 0 && isspace((unsigned char)buf[l - 1]); + l--) + ; + buf[l] = '\0'; + if (nmonths[i].name != NULL) + free(nmonths[i].name); + if ((nmonths[i].name = strdup(buf)) == NULL) + errx(1, "cannot allocate memory"); + nmonths[i].len = strlen(buf); + + strftime(buf, sizeof(buf), "%B", &tm); + for (l = strlen(buf); + l > 0 && isspace((unsigned char)buf[l - 1]); + l--) + ; + buf[l] = '\0'; + if (fnmonths[i].name != NULL) + free(fnmonths[i].name); + if ((fnmonths[i].name = strdup(buf)) == NULL) + errx(1, "cannot allocate memory"); + fnmonths[i].len = strlen(buf); + } +} + +void +setnsequences(char *seq) +{ + int i; + char *p; + + p = seq; + for (i = 0; i < 5; i++) { + nsequences[i].name = p; + if ((p = strchr(p, ' ')) == NULL) { + /* Oh oh there is something wrong. Erase! Erase! */ + for (i = 0; i < 5; i++) { + nsequences[i].name = NULL; + nsequences[i].len = 0; + } + return; + } + *p = '\0'; + p++; + } + nsequences[i].name = p; + + for (i = 0; i < 5; i++) { + nsequences[i].name = strdup(nsequences[i].name); + nsequences[i].len = nsequences[i + 1].name - nsequences[i].name; + } + nsequences[i].name = strdup(nsequences[i].name); + nsequences[i].len = strlen(nsequences[i].name); + + return; +} Added: stable/8/usr.bin/calendar/parsedata.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/usr.bin/calendar/parsedata.c Tue Aug 24 07:59:39 2010 (r211734) @@ -0,0 +1,1009 @@ +/*- + * Copyright (c) 1992-2009 Edwin Groothuis . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include "calendar.h" + +static char *showflags(int flags); +static int isonlydigits(char *s, int nostar); +static const char *getmonthname(int i); +static int checkmonth(char *s, size_t *len, size_t *offset, const char **month); +static const char *getdayofweekname(int i); +static int checkdayofweek(char *s, size_t *len, size_t *offset, const char **dow); +static int indextooffset(char *s); +static int parseoffset(char *s); +static char *floattoday(int year, double f); +static char *floattotime(double f); + +/* + * Expected styles: + * + * Date ::= Month . ' ' . DayOfMonth | + * Month . ' ' . DayOfWeek . ModifierIndex | + * Month . '/' . DayOfMonth | + * Month . '/' . DayOfWeek . ModifierIndex | + * DayOfMonth . ' ' . Month | + * DayOfMonth . '/' . Month | + * DayOfWeek . ModifierIndex . ' ' .Month | + * DayOfWeek . ModifierIndex . '/' .Month | + * DayOfWeek . ModifierIndex | + * SpecialDay . ModifierOffset + * + * Month ::= MonthName | MonthNumber | '*' + * MonthNumber ::= '0' ... '9' | '00' ... '09' | '10' ... '12' + * MonthName ::= MonthNameShort | MonthNameLong + * MonthNameLong ::= 'January' ... 'December' + * MonthNameShort ::= 'Jan' ... 'Dec' | 'Jan.' ... 'Dec.' + * + * DayOfWeek ::= DayOfWeekShort | DayOfWeekLong + * DayOfWeekShort ::= 'Mon' .. 'Sun' + * DayOfWeekLong ::= 'Monday' .. 'Sunday' + * DayOfMonth ::= '0' ... '9' | '00' ... '09' | '10' ... '29' | + * '30' ... '31' | '*' + * + * ModifierOffset ::= '' | '+' . ModifierNumber | '-' . ModifierNumber + * ModifierNumber ::= '0' ... '9' | '00' ... '99' | '000' ... '299' | + * '300' ... '359' | '360' ... '365' + * ModifierIndex ::= 'Second' | 'Third' | 'Fourth' | 'Fifth' | + * 'First' | 'Last' + * + * SpecialDay ::= 'Easter' | 'Pashka' | 'ChineseNewYear' + * + */ +static int +determinestyle(char *date, int *flags, + char *month, int *imonth, char *dayofmonth, int *idayofmonth, + char *dayofweek, int *idayofweek, char *modifieroffset, + char *modifierindex, char *specialday) +{ + char *p, *p1, *p2; + const char *dow, *pmonth; + char pold; + size_t len, offset; + + *flags = F_NONE; + *month = '\0'; + *imonth = 0; + *dayofmonth = '\0'; + *idayofmonth = 0; + *dayofweek = '\0'; + *idayofweek = 0; + *modifieroffset = '\0'; + *modifierindex = '\0'; + *specialday = '\0'; + +#define CHECKSPECIAL(s1, s2, lens2, type) \ + if (s2 != NULL && strncmp(s1, s2, lens2) == 0) { \ + *flags |= F_SPECIALDAY; \ + *flags |= type; \ + *flags |= F_VARIABLE; \ + if (strlen(s1) == lens2) { \ + strcpy(specialday, s1); \ + return (1); \ + } \ + strncpy(specialday, s1, lens2); \ + specialday[lens2] = '\0'; \ + strcpy(modifieroffset, s1 + lens2); \ + *flags |= F_MODIFIEROFFSET; \ + return (1); \ + } + + if ((p = strchr(date, ' ')) == NULL) { + if ((p = strchr(date, '/')) == NULL) { + CHECKSPECIAL(date, STRING_CNY, strlen(STRING_CNY), + F_CNY); + CHECKSPECIAL(date, ncny.name, ncny.len, F_CNY); + CHECKSPECIAL(date, STRING_NEWMOON, + strlen(STRING_NEWMOON), F_NEWMOON); + CHECKSPECIAL(date, nnewmoon.name, nnewmoon.len, + F_NEWMOON); + CHECKSPECIAL(date, STRING_FULLMOON, + strlen(STRING_FULLMOON), F_FULLMOON); + CHECKSPECIAL(date, nfullmoon.name, nfullmoon.len, + F_FULLMOON); + CHECKSPECIAL(date, STRING_PASKHA, + strlen(STRING_PASKHA), F_PASKHA); + CHECKSPECIAL(date, npaskha.name, npaskha.len, F_PASKHA); + CHECKSPECIAL(date, STRING_EASTER, + strlen(STRING_EASTER), F_EASTER); + CHECKSPECIAL(date, neaster.name, neaster.len, F_EASTER); + CHECKSPECIAL(date, STRING_MAREQUINOX, + strlen(STRING_MAREQUINOX), F_MAREQUINOX); + CHECKSPECIAL(date, nmarequinox.name, nmarequinox.len, + F_SEPEQUINOX); + CHECKSPECIAL(date, STRING_SEPEQUINOX, + strlen(STRING_SEPEQUINOX), F_SEPEQUINOX); + CHECKSPECIAL(date, nsepequinox.name, nsepequinox.len, + F_SEPEQUINOX); + CHECKSPECIAL(date, STRING_JUNSOLSTICE, + strlen(STRING_JUNSOLSTICE), F_JUNSOLSTICE); + CHECKSPECIAL(date, njunsolstice.name, njunsolstice.len, + F_JUNSOLSTICE); + CHECKSPECIAL(date, STRING_DECSOLSTICE, + strlen(STRING_DECSOLSTICE), F_DECSOLSTICE); + CHECKSPECIAL(date, ndecsolstice.name, ndecsolstice.len, + F_DECSOLSTICE); + if (checkdayofweek(date, &len, &offset, &dow) != 0) { + *flags |= F_DAYOFWEEK; + *flags |= F_VARIABLE; + *idayofweek = offset; + if (strlen(date) == len) { + strcpy(dayofweek, date); + return (1); + } + strncpy(dayofweek, date, len); + dayofweek[len] = '\0'; + strcpy(modifierindex, date + len); + *flags |= F_MODIFIERINDEX; + return (1); + } + if (isonlydigits(date, 1)) { + /* Assume month number only */ + *flags |= F_MONTH; + *imonth = (int)strtol(date, (char **)NULL, 10); + strcpy(month, getmonthname(*imonth)); + return(1); + } + return (0); + } + } + + /* + * AFTER this, leave by goto-ing to "allfine" or "fail" to restore the + * original data in `date'. + */ + pold = *p; + *p = 0; + p1 = date; + p2 = p + 1; + /* Now p2 points to the next field and p1 to the first field */ + + /* Check if there is a month-string in the date */ + if ((checkmonth(p1, &len, &offset, &pmonth) != 0) + || (checkmonth(p2, &len, &offset, &pmonth) != 0 && (p2 = p1))) { + /* p2 is the non-month part */ + *flags |= F_MONTH; + *imonth = offset; + + strcpy(month, getmonthname(offset)); + if (isonlydigits(p2, 1)) { + strcpy(dayofmonth, p2); + *idayofmonth = (int)strtol(p2, (char **)NULL, 10); + *flags |= F_DAYOFMONTH; + goto allfine; + } + if (strcmp(p2, "*") == 0) { + *flags |= F_ALLDAY; + goto allfine; + } + + if (checkdayofweek(p2, &len, &offset, &dow) != 0) { + *flags |= F_DAYOFWEEK; + *flags |= F_VARIABLE; + *idayofweek = offset; + strcpy(dayofweek, getdayofweekname(offset)); + if (strlen(p2) == len) + goto allfine; + strcpy(modifierindex, p2 + len); + *flags |= F_MODIFIERINDEX; + goto allfine; + } + + goto fail; + } + + /* Check if there is an every-day or every-month in the string */ + if ((strcmp(p1, "*") == 0 && isonlydigits(p2, 1)) + || (strcmp(p2, "*") == 0 && isonlydigits(p1, 1) && (p2 = p1))) { + int d; + + *flags |= F_ALLMONTH; + *flags |= F_DAYOFMONTH; + d = (int)strtol(p2, (char **)NULL, 10); + *idayofmonth = d; + sprintf(dayofmonth, "%d", d); + goto allfine; + } + + /* Month as a number, then a weekday */ + if (isonlydigits(p1, 1) + && checkdayofweek(p2, &len, &offset, &dow) != 0) { + int d; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Aug 24 09:47:50 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64FDF1065696; Tue, 24 Aug 2010 09:47:50 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 2307F8FC21; Tue, 24 Aug 2010 09:47:49 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id D9C751FFC33; Tue, 24 Aug 2010 09:30:01 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id AA2AC845D1; Tue, 24 Aug 2010 11:30:01 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Edwin Groothuis References: <201008232209.o7NM9Q5l055003@svn.freebsd.org> <4C736D4F.6080003@andric.com> <20100824075117.GE2361@mavetju.org> Date: Tue, 24 Aug 2010 11:30:01 +0200 In-Reply-To: <20100824075117.GE2361@mavetju.org> (Edwin Groothuis's message of "Tue, 24 Aug 2010 17:51:17 +1000") Message-ID: <86iq30pdd2.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, Dimitry Andric , src-committers@freebsd.org, svn-src-stable-8@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r211723 - in stable/8/usr.bin/calendar: . calendars calendars/ru_RU.KOI8-R X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2010 09:47:50 -0000 Edwin Groothuis writes: > Dimitry Andric writes: >> I think you forgot to add usr.bin/calendar/locale.c here? > I'm confused, shouldn't they be added automatically because of the > "svn merge"? It should, but this is a common mistake. What usually happens is that you do an svn merge, then figure out you did it wrong, revert it, and re-run it; but the new files are still there from the first attempt, so the second attempt will not overwrite them or record them as added. Everything looks and builds fine in your working copy, but the new files won't be committed. ISTR I actually wrote about this in the Subversion primer on the wiki. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-stable@FreeBSD.ORG Tue Aug 24 17:46:43 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 678501065695; Tue, 24 Aug 2010 17:46:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 561498FC16; Tue, 24 Aug 2010 17:46:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7OHkh2N083228; Tue, 24 Aug 2010 17:46:43 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7OHkhki083226; Tue, 24 Aug 2010 17:46:43 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201008241746.o7OHkhki083226@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 24 Aug 2010 17:46:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211760 - stable/8/bin/ps X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2010 17:46:43 -0000 Author: trasz Date: Tue Aug 24 17:46:43 2010 New Revision: 211760 URL: http://svn.freebsd.org/changeset/base/211760 Log: MFC r210448: Fix alignment for the 'flags' label, and make more room for 'tdev'. Modified: stable/8/bin/ps/keyword.c Directory Properties: stable/8/bin/ps/ (props changed) Modified: stable/8/bin/ps/keyword.c ============================================================================== --- stable/8/bin/ps/keyword.c Tue Aug 24 16:35:26 2010 (r211759) +++ stable/8/bin/ps/keyword.c Tue Aug 24 17:46:43 2010 (r211760) @@ -89,7 +89,7 @@ static VAR var[] = { {"emul", "EMUL", NULL, LJUST, emulname, NULL, EMULLEN, 0, CHAR, NULL, 0}, {"etime", "ELAPSED", NULL, USER, elapsed, NULL, 12, 0, CHAR, NULL, 0}, - {"f", "F", NULL, 0, kvar, NULL, 7, KOFF(ki_flag), INT, "x", 0}, + {"f", "F", NULL, 0, kvar, NULL, 8, KOFF(ki_flag), INT, "x", 0}, {"flags", "", "f", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"ignored", "", "sigignore", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"inblk", "INBLK", NULL, USER, rvar, NULL, 4, ROFF(ru_inblock), LONG, @@ -186,7 +186,7 @@ static VAR var[] = { UINT, UIDFMT, 0}, {"svuid", "SVUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_svuid), UINT, UIDFMT, 0}, - {"tdev", "TDEV", NULL, 0, tdev, NULL, 4, 0, CHAR, NULL, 0}, + {"tdev", "TDEV", NULL, 0, tdev, NULL, 5, 0, CHAR, NULL, 0}, {"tdnam", "TDNAM", NULL, LJUST, tdnam, NULL, COMMLEN, 0, CHAR, NULL, 0}, {"time", "TIME", NULL, USER, cputime, NULL, 9, 0, CHAR, NULL, 0}, {"tpgid", "TPGID", NULL, 0, kvar, NULL, 4, KOFF(ki_tpgid), UINT, From owner-svn-src-stable@FreeBSD.ORG Tue Aug 24 17:47:53 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2947E1065694; Tue, 24 Aug 2010 17:47:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 172D58FC0C; Tue, 24 Aug 2010 17:47:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7OHlq2d083309; Tue, 24 Aug 2010 17:47:52 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7OHlqjV083307; Tue, 24 Aug 2010 17:47:52 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201008241747.o7OHlqjV083307@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 24 Aug 2010 17:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211761 - stable/8/bin/ps X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2010 17:47:53 -0000 Author: trasz Date: Tue Aug 24 17:47:52 2010 New Revision: 211761 URL: http://svn.freebsd.org/changeset/base/211761 Log: MFC r210447: Add P_HASTHREADS flag description. Modified: stable/8/bin/ps/ps.1 Directory Properties: stable/8/bin/ps/ (props changed) Modified: stable/8/bin/ps/ps.1 ============================================================================== --- stable/8/bin/ps/ps.1 Tue Aug 24 17:46:43 2010 (r211760) +++ stable/8/bin/ps/ps.1 Tue Aug 24 17:47:52 2010 (r211761) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd April 13, 2010 +.Dd July 24, 2010 .Dt PS 1 .Os .Sh NAME @@ -291,6 +291,7 @@ the include file .It Dv "P_PPWAIT" Ta No "0x00010 Parent is waiting for child to exec/exit" .It Dv "P_PROFIL" Ta No "0x00020 Has started profiling" .It Dv "P_STOPPROF" Ta No "0x00040 Has thread in requesting to stop prof" +.It Dv "P_HASTHREADS" Ta No "0x00080 Has had threads (no cleanup shortcuts)" .It Dv "P_SUGID" Ta No "0x00100 Had set id privileges since last exec" .It Dv "P_SYSTEM" Ta No "0x00200 System proc: no sigs, stats or swapping" .It Dv "P_SINGLE_EXIT" Ta No "0x00400 Threads suspending should exit, not wait" From owner-svn-src-stable@FreeBSD.ORG Wed Aug 25 08:49:21 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E985010656B7; Wed, 25 Aug 2010 08:49:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8CCB8FC22; Wed, 25 Aug 2010 08:49:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7P8nLGK004885; Wed, 25 Aug 2010 08:49:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7P8nLQr004883; Wed, 25 Aug 2010 08:49:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201008250849.o7P8nLQr004883@svn.freebsd.org> From: Alexander Motin Date: Wed, 25 Aug 2010 08:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211803 - stable/8/sys/geom/mirror X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Aug 2010 08:49:22 -0000 Author: mav Date: Wed Aug 25 08:49:21 2010 New Revision: 211803 URL: http://svn.freebsd.org/changeset/base/211803 Log: MFC r211455: Remove bintime_cmp() function, unused since r200086. Modified: stable/8/sys/geom/mirror/g_mirror.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/8/sys/geom/mirror/g_mirror.c Wed Aug 25 08:48:54 2010 (r211802) +++ stable/8/sys/geom/mirror/g_mirror.c Wed Aug 25 08:49:21 2010 (r211803) @@ -844,21 +844,6 @@ g_mirror_unidle(struct g_mirror_softc *s } } -static __inline int -bintime_cmp(struct bintime *bt1, struct bintime *bt2) -{ - - if (bt1->sec < bt2->sec) - return (-1); - else if (bt1->sec > bt2->sec) - return (1); - if (bt1->frac < bt2->frac) - return (-1); - else if (bt1->frac > bt2->frac) - return (1); - return (0); -} - static void g_mirror_done(struct bio *bp) { From owner-svn-src-stable@FreeBSD.ORG Wed Aug 25 11:11:15 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 572A910656A8; Wed, 25 Aug 2010 11:11:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 467658FC27; Wed, 25 Aug 2010 11:11:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7PBBFMi009692; Wed, 25 Aug 2010 11:11:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7PBBFkt009690; Wed, 25 Aug 2010 11:11:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201008251111.o7PBBFkt009690@svn.freebsd.org> From: Alexander Motin Date: Wed, 25 Aug 2010 11:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211810 - stable/7/sys/geom/mirror X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Aug 2010 11:11:15 -0000 Author: mav Date: Wed Aug 25 11:11:14 2010 New Revision: 211810 URL: http://svn.freebsd.org/changeset/base/211810 Log: MFC r211455: Remove bintime_cmp() function, unused since r200086. Modified: stable/7/sys/geom/mirror/g_mirror.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/7/sys/geom/mirror/g_mirror.c Wed Aug 25 09:53:00 2010 (r211809) +++ stable/7/sys/geom/mirror/g_mirror.c Wed Aug 25 11:11:14 2010 (r211810) @@ -844,21 +844,6 @@ g_mirror_unidle(struct g_mirror_softc *s } } -static __inline int -bintime_cmp(struct bintime *bt1, struct bintime *bt2) -{ - - if (bt1->sec < bt2->sec) - return (-1); - else if (bt1->sec > bt2->sec) - return (1); - if (bt1->frac < bt2->frac) - return (-1); - else if (bt1->frac > bt2->frac) - return (1); - return (0); -} - static void g_mirror_done(struct bio *bp) { From owner-svn-src-stable@FreeBSD.ORG Wed Aug 25 22:19:52 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82E1710656AB; Wed, 25 Aug 2010 22:19:52 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 713CE8FC1C; Wed, 25 Aug 2010 22:19:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7PMJqwE024248; Wed, 25 Aug 2010 22:19:52 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7PMJqLU024245; Wed, 25 Aug 2010 22:19:52 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201008252219.o7PMJqLU024245@svn.freebsd.org> From: Rick Macklem Date: Wed, 25 Aug 2010 22:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211828 - stable/8/sys/nfsclient X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Aug 2010 22:19:52 -0000 Author: rmacklem Date: Wed Aug 25 22:19:52 2010 New Revision: 211828 URL: http://svn.freebsd.org/changeset/base/211828 Log: MFC: r210834 Add some mutex locking on the nfsnode to the regular NFS client. Modified: stable/8/sys/nfsclient/nfs_node.c stable/8/sys/nfsclient/nfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/nfsclient/nfs_node.c ============================================================================== --- stable/8/sys/nfsclient/nfs_node.c Wed Aug 25 22:09:02 2010 (r211827) +++ stable/8/sys/nfsclient/nfs_node.c Wed Aug 25 22:19:52 2010 (r211828) @@ -193,12 +193,14 @@ nfs_inactive(struct vop_inactive_args *a np = VTONFS(ap->a_vp); if (prtactive && vrefcnt(ap->a_vp) != 0) vprint("nfs_inactive: pushing active", ap->a_vp); + mtx_lock(&np->n_mtx); if (ap->a_vp->v_type != VDIR) { sp = np->n_sillyrename; np->n_sillyrename = NULL; } else sp = NULL; if (sp) { + mtx_unlock(&np->n_mtx); (void)nfs_vinvalbuf(ap->a_vp, 0, td, 1); /* * Remove the silly file that was rename'd earlier @@ -207,8 +209,10 @@ nfs_inactive(struct vop_inactive_args *a crfree(sp->s_cred); vrele(sp->s_dvp); free((caddr_t)sp, M_NFSREQ); + mtx_lock(&np->n_mtx); } np->n_flag &= NMODIFIED; + mtx_unlock(&np->n_mtx); return (0); } Modified: stable/8/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/8/sys/nfsclient/nfs_vnops.c Wed Aug 25 22:09:02 2010 (r211827) +++ stable/8/sys/nfsclient/nfs_vnops.c Wed Aug 25 22:19:52 2010 (r211828) @@ -521,7 +521,7 @@ nfs_open(struct vop_open_args *ap) */ mtx_lock(&np->n_mtx); if (np->n_flag & NMODIFIED) { - mtx_unlock(&np->n_mtx); + mtx_unlock(&np->n_mtx); error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error == EINTR || error == EIO) return (error); @@ -536,9 +536,8 @@ nfs_open(struct vop_open_args *ap) return (error); mtx_lock(&np->n_mtx); np->n_mtime = vattr.va_mtime; - mtx_unlock(&np->n_mtx); } else { - mtx_unlock(&np->n_mtx); + mtx_unlock(&np->n_mtx); error = VOP_GETATTR(vp, &vattr, ap->a_cred); if (error) return (error); @@ -554,22 +553,22 @@ nfs_open(struct vop_open_args *ap) mtx_lock(&np->n_mtx); np->n_mtime = vattr.va_mtime; } - mtx_unlock(&np->n_mtx); } /* * If the object has >= 1 O_DIRECT active opens, we disable caching. */ if (nfs_directio_enable && (fmode & O_DIRECT) && (vp->v_type == VREG)) { if (np->n_directio_opens == 0) { + mtx_unlock(&np->n_mtx); error = nfs_vinvalbuf(vp, V_SAVE, ap->a_td, 1); if (error) return (error); mtx_lock(&np->n_mtx); np->n_flag |= NNONCACHE; - mtx_unlock(&np->n_mtx); } np->n_directio_opens++; } + mtx_unlock(&np->n_mtx); vnode_create_vobject(vp, vattr.va_size, ap->a_td); return (0); } @@ -1745,7 +1744,9 @@ nfs_remove(struct vop_remove_args *ap) error = 0; } else if (!np->n_sillyrename) error = nfs_sillyrename(dvp, vp, cnp); + mtx_lock(&np->n_mtx); np->n_attrstamp = 0; + mtx_unlock(&np->n_mtx); KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); return (error); } From owner-svn-src-stable@FreeBSD.ORG Thu Aug 26 11:25:09 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E379106564A; Thu, 26 Aug 2010 11:25:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D6B88FC22; Thu, 26 Aug 2010 11:25:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7QBP9Ca041445; Thu, 26 Aug 2010 11:25:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7QBP9vx041442; Thu, 26 Aug 2010 11:25:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201008261125.o7QBP9vx041442@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 26 Aug 2010 11:25:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211840 - in stable/8/lib/libc: . stdlib X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2010 11:25:09 -0000 Author: kib Date: Thu Aug 26 11:25:09 2010 New Revision: 211840 URL: http://svn.freebsd.org/changeset/base/211840 Log: MFC r211704: Style. Modified: stable/8/lib/libc/Makefile stable/8/lib/libc/stdlib/atexit.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/Makefile ============================================================================== --- stable/8/lib/libc/Makefile Thu Aug 26 11:22:12 2010 (r211839) +++ stable/8/lib/libc/Makefile Thu Aug 26 11:25:09 2010 (r211840) @@ -118,7 +118,7 @@ libkern.${MACHINE_ARCH}:: ${KMSRCS} .if defined(KMSRCS) && !empty(KMSRCS) cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH} .endif - + .include # Disable warnings in contributed sources. Modified: stable/8/lib/libc/stdlib/atexit.c ============================================================================== --- stable/8/lib/libc/stdlib/atexit.c Thu Aug 26 11:22:12 2010 (r211839) +++ stable/8/lib/libc/stdlib/atexit.c Thu Aug 26 11:25:09 2010 (r211840) @@ -119,7 +119,7 @@ atexit(void (*func)(void)) int error; fn.fn_type = ATEXIT_FN_STD; - fn.fn_ptr.std_func = func;; + fn.fn_ptr.std_func = func; fn.fn_arg = NULL; fn.fn_dso = NULL; @@ -138,7 +138,7 @@ __cxa_atexit(void (*func)(void *), void int error; fn.fn_type = ATEXIT_FN_CXA; - fn.fn_ptr.cxa_func = func;; + fn.fn_ptr.cxa_func = func; fn.fn_arg = arg; fn.fn_dso = dso; From owner-svn-src-stable@FreeBSD.ORG Thu Aug 26 19:55:03 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5A7D1065672; Thu, 26 Aug 2010 19:55:03 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DA7E8FC24; Thu, 26 Aug 2010 19:55:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7QJt3Ui052182; Thu, 26 Aug 2010 19:55:03 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7QJt3hG052175; Thu, 26 Aug 2010 19:55:03 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201008261955.o7QJt3hG052175@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 26 Aug 2010 19:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211848 - in stable/8/sys/dev/cxgb: . common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2010 19:55:03 -0000 Author: np Date: Thu Aug 26 19:55:03 2010 New Revision: 211848 URL: http://svn.freebsd.org/changeset/base/211848 Log: MFC r208887, r209115-209116, r209839-209841, r211345-211347 r208887 tunable to control mc5 partition r209115 make format string a string literal. r209116 Add knob to get packet timestamps from the hardware. r209839 Fix bufsize calculation so that cxgbtool can display information for the last I/O queue too. r209840 Eliminate ext_intr_task. The "slow" interrupt handler is already running on the adapter's task queue. Just do what the task does instead of enqueueing it. r209841 Improved link detection. r211345 wakeup is required if the adapter lock is released anywhere during init and not just for the may_sleep case. r211346 Always reset the XGMAC's XAUI PCS on a link up. r211347 Fix tx pause quanta and timer calculations. Modified: stable/8/sys/dev/cxgb/common/cxgb_ael1002.c stable/8/sys/dev/cxgb/common/cxgb_common.h stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c stable/8/sys/dev/cxgb/common/cxgb_xgmac.c stable/8/sys/dev/cxgb/cxgb_adapter.h stable/8/sys/dev/cxgb/cxgb_main.c stable/8/sys/dev/cxgb/cxgb_sge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_ael1002.c Thu Aug 26 16:01:29 2010 (r211847) +++ stable/8/sys/dev/cxgb/common/cxgb_ael1002.c Thu Aug 26 19:55:03 2010 (r211848) @@ -297,6 +297,9 @@ static int get_link_status_r(struct cphy if (err) return err; *link_ok = (stat0 & stat1 & (stat2 >> 12)) & 1; + + if (*link_ok == 0) + return (0); } if (speed) *speed = SPEED_10000; @@ -1947,8 +1950,6 @@ static int ael2020_intr_enable(struct cp if (err) return err; - phy->caps |= POLL_LINK_1ST_TIME; - /* enable standard Link Alarm Status Interrupts */ err = t3_phy_lasi_intr_enable(phy); if (err) Modified: stable/8/sys/dev/cxgb/common/cxgb_common.h ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_common.h Thu Aug 26 16:01:29 2010 (r211847) +++ stable/8/sys/dev/cxgb/common/cxgb_common.h Thu Aug 26 19:55:03 2010 (r211848) @@ -60,7 +60,6 @@ enum { /* skip 25 */ SUPPORTED_MISC_IRQ = 1 << 26, SUPPORTED_IRQ = (SUPPORTED_LINK_IRQ | SUPPORTED_MISC_IRQ), - POLL_LINK_1ST_TIME = 1 << 27 }; enum { /* adapter interrupt-maintained statistics */ @@ -701,7 +700,6 @@ void t3_port_intr_enable(adapter_t *adap void t3_port_intr_disable(adapter_t *adapter, int idx); void t3_port_intr_clear(adapter_t *adapter, int idx); int t3_slow_intr_handler(adapter_t *adapter); -int t3_phy_intr_handler(adapter_t *adapter); void t3_link_changed(adapter_t *adapter, int port_id); int t3_link_start(struct cphy *phy, struct cmac *mac, struct link_config *lc); @@ -747,6 +745,7 @@ int t3_mc7_bd_read(struct mc7 *mc7, unsi int t3_mac_init(struct cmac *mac); void t3b_pcs_reset(struct cmac *mac); +void t3c_pcs_force_los(struct cmac *mac); void t3_mac_disable_exact_filters(struct cmac *mac); void t3_mac_enable_exact_filters(struct cmac *mac); int t3_mac_enable(struct cmac *mac, int which); Modified: stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c Thu Aug 26 16:01:29 2010 (r211847) +++ stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c Thu Aug 26 19:55:03 2010 (r211848) @@ -1530,6 +1530,9 @@ void t3_link_changed(adapter_t *adapter, phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); + if (link_ok == 0) + pi->link_fault = LF_NO; + if (lc->requested_fc & PAUSE_AUTONEG) fc &= lc->requested_fc; else @@ -1555,6 +1558,13 @@ void t3_link_changed(adapter_t *adapter, pi->link_fault = LF_YES; } + if (uses_xaui(adapter)) { + if (adapter->params.rev >= T3_REV_C) + t3c_pcs_force_los(mac); + else + t3b_pcs_reset(mac); + } + /* Don't report link up */ link_ok = 0; } else { @@ -1581,12 +1591,20 @@ void t3_link_changed(adapter_t *adapter, /* down -> up, or up -> up with changed settings */ if (adapter->params.rev > 0 && uses_xaui(adapter)) { + + if (adapter->params.rev >= T3_REV_C) + t3c_pcs_force_los(mac); + else + t3b_pcs_reset(mac); + t3_write_reg(adapter, A_XGM_XAUI_ACT_CTRL + mac->offset, F_TXACTENABLE | F_RXEN); } + /* disable TX FIFO drain */ t3_set_reg_field(adapter, A_XGM_TXFIFO_CFG + mac->offset, F_ENDROPPKT, 0); + t3_mac_enable(mac, MAC_DIRECTION_TX | MAC_DIRECTION_RX); t3_set_reg_field(adapter, A_XGM_STAT_CTRL + mac->offset, F_CLRSTATS, 1); @@ -1606,24 +1624,21 @@ void t3_link_changed(adapter_t *adapter, t3_set_reg_field(adapter, A_XGM_INT_ENABLE + mac->offset, F_XGM_INT, 0); - } - if (!link_fault) { - if (is_10G(adapter)) - pi->phy.ops->power_down(&pi->phy, 1); t3_mac_disable(mac, MAC_DIRECTION_RX); - t3_link_start(phy, mac, lc); - } - /* - * Make sure Tx FIFO continues to drain, even as rxen is left - * high to help detect and indicate remote faults. - */ - t3_set_reg_field(adapter, A_XGM_TXFIFO_CFG + mac->offset, 0, - F_ENDROPPKT); - t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, 0); - t3_write_reg(adapter, A_XGM_TX_CTRL + mac->offset, F_TXEN); - t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, F_RXEN); + /* + * Make sure Tx FIFO continues to drain, even as rxen is + * left high to help detect and indicate remote faults. + */ + t3_set_reg_field(adapter, + A_XGM_TXFIFO_CFG + mac->offset, 0, F_ENDROPPKT); + t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, 0); + t3_write_reg(adapter, + A_XGM_TX_CTRL + mac->offset, F_TXEN); + t3_write_reg(adapter, + A_XGM_RX_CTRL + mac->offset, F_RXEN); + } } t3_os_link_changed(adapter, port_id, link_ok, speed, duplex, fc, @@ -2160,13 +2175,14 @@ static int mac_intr_handler(adapter_t *a mac->stats.xaui_pcs_ctc_err++; if (cause & F_XAUIPCSALIGNCHANGE) mac->stats.xaui_pcs_align_change++; - if (cause & F_XGM_INT) { - t3_set_reg_field(adap, - A_XGM_INT_ENABLE + mac->offset, - F_XGM_INT, 0); + if (cause & F_XGM_INT & + t3_read_reg(adap, A_XGM_INT_ENABLE + mac->offset)) { + t3_set_reg_field(adap, A_XGM_INT_ENABLE + mac->offset, + F_XGM_INT, 0); /* link fault suspected */ pi->link_fault = LF_MAYBE; + t3_os_link_intr(pi); } t3_write_reg(adap, A_XGM_INT_CAUSE + mac->offset, cause); @@ -2180,7 +2196,7 @@ static int mac_intr_handler(adapter_t *a /* * Interrupt handler for PHY events. */ -int t3_phy_intr_handler(adapter_t *adapter) +static int phy_intr_handler(adapter_t *adapter) { u32 i, cause = t3_read_reg(adapter, A_T3DBG_INT_CAUSE); @@ -2194,7 +2210,7 @@ int t3_phy_intr_handler(adapter_t *adapt int phy_cause = p->phy.ops->intr_handler(&p->phy); if (phy_cause & cphy_cause_link_change) - t3_link_changed(adapter, i); + t3_os_link_intr(p); if (phy_cause & cphy_cause_fifo_error) p->phy.fifo_errors++; if (phy_cause & cphy_cause_module_change) @@ -2262,7 +2278,7 @@ int t3_slow_intr_handler(adapter_t *adap if (cause & F_XGMAC0_1) mac_intr_handler(adapter, 1); if (cause & F_T3DBG) - t3_os_ext_intr_handler(adapter); + phy_intr_handler(adapter); /* Clear the interrupts just processed. */ t3_write_reg(adapter, A_PL_INT_CAUSE0, cause); Modified: stable/8/sys/dev/cxgb/common/cxgb_xgmac.c ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_xgmac.c Thu Aug 26 16:01:29 2010 (r211847) +++ stable/8/sys/dev/cxgb/common/cxgb_xgmac.c Thu Aug 26 19:55:03 2010 (r211848) @@ -97,11 +97,40 @@ void t3b_pcs_reset(struct cmac *mac) { t3_set_reg_field(mac->adapter, A_XGM_RESET_CTRL + mac->offset, F_PCS_RESET_, 0); - udelay(20); + + /* No delay required */ + t3_set_reg_field(mac->adapter, A_XGM_RESET_CTRL + mac->offset, 0, F_PCS_RESET_); } +void t3c_pcs_force_los(struct cmac *mac) +{ + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT0 + mac->offset, + F_LOWSIGFORCEEN0 | F_LOWSIGFORCEVALUE0, + F_LOWSIGFORCEEN0 | F_LOWSIGFORCEVALUE0); + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT1 + mac->offset, + F_LOWSIGFORCEEN1 | F_LOWSIGFORCEVALUE1, + F_LOWSIGFORCEEN1 | F_LOWSIGFORCEVALUE1); + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT2 + mac->offset, + F_LOWSIGFORCEEN2 | F_LOWSIGFORCEVALUE2, + F_LOWSIGFORCEEN2 | F_LOWSIGFORCEVALUE2); + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT3 + mac->offset, + F_LOWSIGFORCEEN3 | F_LOWSIGFORCEVALUE3, + F_LOWSIGFORCEEN3 | F_LOWSIGFORCEVALUE3); + + /* No delay required */ + + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT0 + mac->offset, + F_LOWSIGFORCEEN0, 0); + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT1 + mac->offset, + F_LOWSIGFORCEEN1, 0); + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT2 + mac->offset, + F_LOWSIGFORCEEN2, 0); + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT3 + mac->offset, + F_LOWSIGFORCEEN3, 0); +} + /** * t3_mac_init - initialize a MAC * @mac: the MAC to initialize @@ -433,7 +462,7 @@ static int rx_fifo_hwm(int mtu) */ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu) { - int hwm, lwm, divisor; + int hwm, lwm; int ipg; unsigned int thres, v, reg; adapter_t *adap = mac->adapter; @@ -512,16 +541,6 @@ int t3_mac_set_mtu(struct cmac *mac, uns t3_set_reg_field(adap, A_XGM_TXFIFO_CFG + mac->offset, V_TXFIFOTHRESH(M_TXFIFOTHRESH) | V_TXIPG(M_TXIPG), V_TXFIFOTHRESH(thres) | V_TXIPG(ipg)); - - /* Assuming a minimum drain rate of 2.5Gbps... - */ - if (adap->params.rev > 0) { - divisor = (adap->params.rev == T3_REV_C) ? 64 : 8; - t3_write_reg(adap, A_XGM_PAUSE_TIMER + mac->offset, - (hwm - lwm) * 4 / divisor); - } - t3_write_reg(adap, A_XGM_TX_PAUSE_QUANTA + mac->offset, - MAC_RXFIFO_SIZE * 4 * 8 / 512); return 0; } @@ -541,9 +560,17 @@ int t3_mac_set_speed_duplex_fc(struct cm u32 val; adapter_t *adap = mac->adapter; unsigned int oft = mac->offset; + unsigned int pause_bits; if (duplex >= 0 && duplex != DUPLEX_FULL) return -EINVAL; + + pause_bits = MAC_RXFIFO_SIZE * 4 * 8; + t3_write_reg(adap, A_XGM_TX_PAUSE_QUANTA + mac->offset, + pause_bits / 512); + t3_write_reg(adap, A_XGM_PAUSE_TIMER + mac->offset, + (pause_bits >> (adap->params.rev == T3_REV_C ? 10 : 7))); + if (mac->multiport) { u32 rx_max_pkt_size = G_RXMAXPKTSIZE(t3_read_reg(adap, @@ -552,9 +579,9 @@ int t3_mac_set_speed_duplex_fc(struct cm val &= ~V_RXFIFOPAUSEHWM(M_RXFIFOPAUSEHWM); val |= V_RXFIFOPAUSEHWM(rx_fifo_hwm(rx_max_pkt_size) / 8); t3_write_reg(adap, A_XGM_RXFIFO_CFG + oft, val); - t3_set_reg_field(adap, A_XGM_TX_CFG + oft, F_TXPAUSEEN, F_TXPAUSEEN); + return t3_vsc7323_set_speed_fc(adap, speed, fc, mac->ext_port); } if (speed >= 0) { Modified: stable/8/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_adapter.h Thu Aug 26 16:01:29 2010 (r211847) +++ stable/8/sys/dev/cxgb/cxgb_adapter.h Thu Aug 26 19:55:03 2010 (r211848) @@ -106,6 +106,8 @@ struct port_info { int link_fault; uint8_t hw_addr[ETHER_ADDR_LEN]; + struct callout link_check_ch; + struct task link_check_task; struct task timer_reclaim_task; struct cdev *port_cdev; @@ -350,7 +352,6 @@ struct adapter { struct filter_info *filters; /* Tasks */ - struct task ext_intr_task; struct task slow_intr_task; struct task tick_task; struct taskqueue *tq; @@ -388,6 +389,8 @@ struct adapter { char reglockbuf[ADAPTER_LOCK_NAME_LEN]; char mdiolockbuf[ADAPTER_LOCK_NAME_LEN]; char elmerlockbuf[ADAPTER_LOCK_NAME_LEN]; + + int timestamp; }; struct t3_rx_mode { @@ -493,12 +496,12 @@ adap2pinfo(struct adapter *adap, int idx int t3_os_find_pci_capability(adapter_t *adapter, int cap); int t3_os_pci_save_state(struct adapter *adapter); int t3_os_pci_restore_state(struct adapter *adapter); +void t3_os_link_intr(struct port_info *); void t3_os_link_changed(adapter_t *adapter, int port_id, int link_status, int speed, int duplex, int fc, int mac_was_reset); void t3_os_phymod_changed(struct adapter *adap, int port_id); void t3_sge_err_intr_handler(adapter_t *adapter); int t3_offload_tx(struct t3cdev *, struct mbuf *); -void t3_os_ext_intr_handler(adapter_t *adapter); void t3_os_set_hw_addr(adapter_t *adapter, int port_idx, u8 hw_addr[]); int t3_mgmt_tx(adapter_t *adap, struct mbuf *m); @@ -527,10 +530,6 @@ int t3_get_desc(const struct sge_qset *q unsigned char *data); void t3_update_qset_coalesce(struct sge_qset *qs, const struct qset_params *p); -#define CXGB_TICKS(a) ((a)->params.linkpoll_period ? \ - (hz * (a)->params.linkpoll_period) / 10 : \ - (a)->params.stats_update_period * hz) - /* * XXX figure out how we can return this to being private to sge */ Modified: stable/8/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_main.c Thu Aug 26 16:01:29 2010 (r211847) +++ stable/8/sys/dev/cxgb/cxgb_main.c Thu Aug 26 19:55:03 2010 (r211848) @@ -95,9 +95,10 @@ static void cxgb_build_medialist(struct static void cxgb_media_status(struct ifnet *, struct ifmediareq *); static int setup_sge_qsets(adapter_t *); static void cxgb_async_intr(void *); -static void cxgb_ext_intr_handler(void *, int); static void cxgb_tick_handler(void *, int); static void cxgb_tick(void *); +static void link_check_callout(void *); +static void check_link_status(void *, int); static void setup_rss(adapter_t *sc); static int alloc_filters(struct adapter *); static int setup_hw_filters(struct adapter *); @@ -238,6 +239,10 @@ TUNABLE_INT("hw.cxgb.snd_queue_len", &cx SYSCTL_UINT(_hw_cxgb, OID_AUTO, snd_queue_len, CTLFLAG_RDTUN, &cxgb_snd_queue_len, 0, "send queue size "); +static int nfilters = -1; +TUNABLE_INT("hw.cxgb.nfilters", &nfilters); +SYSCTL_INT(_hw_cxgb, OID_AUTO, nfilters, CTLFLAG_RDTUN, + &nfilters, 0, "max number of entries in the filter table"); enum { MAX_TXQ_ENTRIES = 16384, @@ -582,7 +587,6 @@ cxgb_controller_attach(device_t dev) taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s taskq", device_get_nameunit(dev)); - TASK_INIT(&sc->ext_intr_task, 0, cxgb_ext_intr_handler, sc); TASK_INIT(&sc->tick_task, 0, cxgb_tick_handler, sc); @@ -666,7 +670,7 @@ cxgb_controller_attach(device_t dev) sc->params.vpd.port_type[2], sc->params.vpd.port_type[3]); device_printf(sc->dev, "Firmware Version %s\n", &sc->fw_version[0]); - callout_reset(&sc->cxgb_tick_ch, CXGB_TICKS(sc), cxgb_tick, sc); + callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); t3_add_attach_sysctls(sc); out: if (error) @@ -974,7 +978,7 @@ cxgb_makedev(struct port_info *pi) { pi->port_cdev = make_dev(&cxgb_cdevsw, pi->ifp->if_dunit, - UID_ROOT, GID_WHEEL, 0600, if_name(pi->ifp)); + UID_ROOT, GID_WHEEL, 0600, "%s", if_name(pi->ifp)); if (pi->port_cdev == NULL) return (ENOMEM); @@ -1003,6 +1007,9 @@ cxgb_port_attach(device_t dev) device_get_unit(device_get_parent(dev)), p->port_id); PORT_LOCK_INIT(p, p->lockbuf); + callout_init(&p->link_check_ch, CALLOUT_MPSAFE); + TASK_INIT(&p->link_check_task, 0, check_link_status, p); + /* Allocate an ifnet object and set it up */ ifp = p->ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { @@ -1259,29 +1266,6 @@ void t3_os_phymod_changed(struct adapter } } -/* - * Interrupt-context handler for external (PHY) interrupts. - */ -void -t3_os_ext_intr_handler(adapter_t *sc) -{ - if (cxgb_debug) - printf("t3_os_ext_intr_handler\n"); - /* - * Schedule a task to handle external interrupts as they may be slow - * and we use a mutex to protect MDIO registers. We disable PHY - * interrupts in the meantime and let the task reenable them when - * it's done. - */ - if (sc->slow_intr_mask) { - ADAPTER_LOCK(sc); - sc->slow_intr_mask &= ~F_T3DBG; - t3_write_reg(sc, A_PL_INT_ENABLE0, sc->slow_intr_mask); - taskqueue_enqueue(sc->tq, &sc->ext_intr_task); - ADAPTER_UNLOCK(sc); - } -} - void t3_os_set_hw_addr(adapter_t *adapter, int port_idx, u8 hw_addr[]) { @@ -1650,6 +1634,7 @@ static int cxgb_up(struct adapter *sc) { int err = 0; + unsigned int mxf = t3_mc5_size(&sc->mc5) - MC5_MIN_TIDS; KASSERT(sc->open_device_map == 0, ("%s: device(s) already open (%x)", __func__, sc->open_device_map)); @@ -1666,11 +1651,13 @@ cxgb_up(struct adapter *sc) if ((err = update_tpsram(sc))) goto out; - if (is_offload(sc)) { + if (is_offload(sc) && nfilters != 0) { sc->params.mc5.nservers = 0; - sc->params.mc5.nroutes = 0; - sc->params.mc5.nfilters = t3_mc5_size(&sc->mc5) - - MC5_MIN_TIDS; + + if (nfilters < 0) + sc->params.mc5.nfilters = mxf; + else + sc->params.mc5.nfilters = min(nfilters, mxf); } err = t3_init_hw(sc, 0); @@ -1791,11 +1778,12 @@ cxgb_init_locked(struct port_info *p) struct adapter *sc = p->adapter; struct ifnet *ifp = p->ifp; struct cmac *mac = &p->mac; - int i, rc = 0, may_sleep = 0; + int i, rc = 0, may_sleep = 0, gave_up_lock = 0; ADAPTER_LOCK_ASSERT_OWNED(sc); while (!IS_DOOMED(p) && IS_BUSY(sc)) { + gave_up_lock = 1; if (mtx_sleep(&sc->flags, &sc->lock, PCATCH, "cxgbinit", 0)) { rc = EINTR; goto done; @@ -1815,6 +1803,7 @@ cxgb_init_locked(struct port_info *p) if (may_sleep) { SET_BUSY(sc); + gave_up_lock = 1; ADAPTER_UNLOCK(sc); } @@ -1843,8 +1832,6 @@ cxgb_init_locked(struct port_info *p) ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; PORT_UNLOCK(p); - t3_link_changed(sc, p->port_id); - for (i = p->first_qset; i < p->first_qset + p->nqsets; i++) { struct sge_qset *qs = &sc->sge.qs[i]; struct sge_txq *txq = &qs->txq[TXQ_ETH]; @@ -1855,14 +1842,18 @@ cxgb_init_locked(struct port_info *p) /* all ok */ setbit(&sc->open_device_map, p->port_id); + callout_reset(&p->link_check_ch, + p->phy.caps & SUPPORTED_LINK_IRQ ? hz * 3 : hz / 4, + link_check_callout, p); done: if (may_sleep) { ADAPTER_LOCK(sc); KASSERT(IS_BUSY(sc), ("%s: controller not busy.", __func__)); CLR_BUSY(sc); - wakeup_one(&sc->flags); } + if (gave_up_lock) + wakeup_one(&sc->flags); ADAPTER_UNLOCK(sc); return (rc); } @@ -1928,9 +1919,11 @@ cxgb_uninit_synchronized(struct port_inf clrbit(&sc->open_device_map, pi->port_id); t3_port_intr_disable(sc, pi->port_id); taskqueue_drain(sc->tq, &sc->slow_intr_task); - taskqueue_drain(sc->tq, &sc->ext_intr_task); taskqueue_drain(sc->tq, &sc->tick_task); + callout_drain(&pi->link_check_ch); + taskqueue_drain(sc->tq, &pi->link_check_task); + PORT_LOCK(pi); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); @@ -2286,61 +2279,47 @@ cxgb_async_intr(void *data) { adapter_t *sc = data; - if (cxgb_debug) - device_printf(sc->dev, "cxgb_async_intr\n"); - /* - * May need to sleep - defer to taskqueue - */ + t3_write_reg(sc, A_PL_INT_ENABLE0, 0); + (void) t3_read_reg(sc, A_PL_INT_ENABLE0); taskqueue_enqueue(sc->tq, &sc->slow_intr_task); } static void -cxgb_ext_intr_handler(void *arg, int count) +link_check_callout(void *arg) { - adapter_t *sc = (adapter_t *)arg; - - if (cxgb_debug) - printf("cxgb_ext_intr_handler\n"); + struct port_info *pi = arg; + struct adapter *sc = pi->adapter; - t3_phy_intr_handler(sc); + if (!isset(&sc->open_device_map, pi->port_id)) + return; - /* Now reenable external interrupts */ - ADAPTER_LOCK(sc); - if (sc->slow_intr_mask) { - sc->slow_intr_mask |= F_T3DBG; - t3_write_reg(sc, A_PL_INT_CAUSE0, F_T3DBG); - t3_write_reg(sc, A_PL_INT_ENABLE0, sc->slow_intr_mask); - } - ADAPTER_UNLOCK(sc); + taskqueue_enqueue(sc->tq, &pi->link_check_task); } -static inline int -link_poll_needed(struct port_info *p) +static void +check_link_status(void *arg, int pending) { - struct cphy *phy = &p->phy; + struct port_info *pi = arg; + struct adapter *sc = pi->adapter; - if (phy->caps & POLL_LINK_1ST_TIME) { - p->phy.caps &= ~POLL_LINK_1ST_TIME; - return (1); - } + if (!isset(&sc->open_device_map, pi->port_id)) + return; + + t3_link_changed(sc, pi->port_id); - return (p->link_fault || !(phy->caps & SUPPORTED_LINK_IRQ)); + if (pi->link_fault || !(pi->phy.caps & SUPPORTED_LINK_IRQ)) + callout_reset(&pi->link_check_ch, hz, link_check_callout, pi); } -static void -check_link_status(adapter_t *sc) +void +t3_os_link_intr(struct port_info *pi) { - int i; - - for (i = 0; i < (sc)->params.nports; ++i) { - struct port_info *p = &sc->port[i]; - - if (!isset(&sc->open_device_map, p->port_id)) - continue; - - if (link_poll_needed(p)) - t3_link_changed(sc, i); - } + /* + * Schedule a link check in the near future. If the link is flapping + * rapidly we'll keep resetting the callout and delaying the check until + * things stabilize a bit. + */ + callout_reset(&pi->link_check_ch, hz / 4, link_check_callout, pi); } static void @@ -2392,7 +2371,7 @@ cxgb_tick(void *arg) return; taskqueue_enqueue(sc->tq, &sc->tick_task); - callout_reset(&sc->cxgb_tick_ch, CXGB_TICKS(sc), cxgb_tick, sc); + callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); } static void @@ -2406,8 +2385,6 @@ cxgb_tick_handler(void *arg, int count) if (sc->flags & CXGB_SHUTDOWN || !(sc->flags & FULL_INIT_DONE)) return; - check_link_status(sc); - if (p->rev == T3_REV_B2 && p->nports < 4 && sc->open_device_map) check_t3b2_mac(sc); @@ -3077,7 +3054,6 @@ cxgb_extension_ioctl(struct cdev *dev, u if (!error) { v = (uint32_t *)buf; - ioqs->bufsize -= 4 * sizeof(uint32_t); ioqs->ioq_rx_enable = *v++; ioqs->ioq_tx_enable = *v++; ioqs->ioq_rx_status = *v++; Modified: stable/8/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_sge.c Thu Aug 26 16:01:29 2010 (r211847) +++ stable/8/sys/dev/cxgb/cxgb_sge.c Thu Aug 26 19:55:03 2010 (r211848) @@ -910,6 +910,8 @@ sge_slow_intr_handler(void *arg, int nco adapter_t *sc = arg; t3_slow_intr_handler(sc); + t3_write_reg(sc, A_PL_INT_ENABLE0, sc->slow_intr_mask); + (void) t3_read_reg(sc, A_PL_INT_ENABLE0); } /** @@ -2961,6 +2963,7 @@ process_responses(adapter_t *adap, struc struct lro_ctrl *lro_ctrl = &qs->lro.ctrl; struct mbuf *offload_mbufs[RX_BUNDLE_SIZE]; int ngathered = 0; + struct t3_mbuf_hdr *mh = &rspq->rspq_mh; #ifdef DEBUG static int last_holdoff = 0; if (cxgb_debug && rspq->holdoff_tmr != last_holdoff) { @@ -2984,9 +2987,9 @@ process_responses(adapter_t *adap, struc if (cxgb_debug) printf("async notification\n"); - if (rspq->rspq_mh.mh_head == NULL) { - rspq->rspq_mh.mh_head = m_gethdr(M_DONTWAIT, MT_DATA); - m = rspq->rspq_mh.mh_head; + if (mh->mh_head == NULL) { + mh->mh_head = m_gethdr(M_DONTWAIT, MT_DATA); + m = mh->mh_head; } else { m = m_gethdr(M_DONTWAIT, MT_DATA); } @@ -3005,27 +3008,28 @@ process_responses(adapter_t *adap, struc DPRINTF("IMM DATA VALID opcode=0x%x rspq->cidx=%d\n", r->rss_hdr.opcode, rspq->cidx); - if (rspq->rspq_mh.mh_head == NULL) - rspq->rspq_mh.mh_head = m_gethdr(M_DONTWAIT, MT_DATA); + if (mh->mh_head == NULL) + mh->mh_head = m_gethdr(M_DONTWAIT, MT_DATA); else m = m_gethdr(M_DONTWAIT, MT_DATA); - if (rspq->rspq_mh.mh_head == NULL && m == NULL) { + if (mh->mh_head == NULL && m == NULL) { no_mem: rspq->next_holdoff = NOMEM_INTR_DELAY; budget_left--; break; } - get_imm_packet(adap, r, rspq->rspq_mh.mh_head); + get_imm_packet(adap, r, mh->mh_head); eop = 1; rspq->imm_data++; } else if (r->len_cq) { int drop_thresh = eth ? SGE_RX_DROP_THRES : 0; - eop = get_packet(adap, drop_thresh, qs, &rspq->rspq_mh, r); + eop = get_packet(adap, drop_thresh, qs, mh, r); if (eop) { - rspq->rspq_mh.mh_head->m_flags |= M_FLOWID; - rspq->rspq_mh.mh_head->m_pkthdr.flowid = rss_hash; + if (r->rss_hdr.hash_type && !adap->timestamp) + mh->mh_head->m_flags |= M_FLOWID; + mh->mh_head->m_pkthdr.flowid = rss_hash; } ethpad = 2; @@ -3050,20 +3054,20 @@ process_responses(adapter_t *adap, struc rspq->credits = 0; } if (!eth && eop) { - rspq->rspq_mh.mh_head->m_pkthdr.csum_data = rss_csum; + mh->mh_head->m_pkthdr.csum_data = rss_csum; /* * XXX size mismatch */ - m_set_priority(rspq->rspq_mh.mh_head, rss_hash); + m_set_priority(mh->mh_head, rss_hash); ngathered = rx_offload(&adap->tdev, rspq, - rspq->rspq_mh.mh_head, offload_mbufs, ngathered); - rspq->rspq_mh.mh_head = NULL; + mh->mh_head, offload_mbufs, ngathered); + mh->mh_head = NULL; DPRINTF("received offload packet\n"); } else if (eth && eop) { - struct mbuf *m = rspq->rspq_mh.mh_head; + struct mbuf *m = mh->mh_head; t3_rx_eth(adap, rspq, m, ethpad); @@ -3092,7 +3096,7 @@ process_responses(adapter_t *adap, struc struct ifnet *ifp = m->m_pkthdr.rcvif; (*ifp->if_input)(ifp, m); } - rspq->rspq_mh.mh_head = NULL; + mh->mh_head = NULL; } __refill_fl_lt(adap, &qs->fl[0], 32); @@ -3166,8 +3170,11 @@ t3b_intr(void *data) if (!map) return; - if (__predict_false(map & F_ERRINTR)) + if (__predict_false(map & F_ERRINTR)) { + t3_write_reg(adap, A_PL_INT_ENABLE0, 0); + (void) t3_read_reg(adap, A_PL_INT_ENABLE0); taskqueue_enqueue(adap->tq, &adap->slow_intr_task); + } mtx_lock(&q0->lock); for_each_port(adap, i) @@ -3195,8 +3202,11 @@ t3_intr_msi(void *data) if (process_responses_gts(adap, &adap->sge.qs[i].rspq)) new_packets = 1; mtx_unlock(&q0->lock); - if (new_packets == 0) + if (new_packets == 0) { + t3_write_reg(adap, A_PL_INT_ENABLE0, 0); + (void) t3_read_reg(adap, A_PL_INT_ENABLE0); taskqueue_enqueue(adap->tq, &adap->slow_intr_task); + } } void @@ -3459,6 +3469,29 @@ t3_set_coalesce_usecs(SYSCTL_HANDLER_ARG return (0); } +static int +t3_pkt_timestamp(SYSCTL_HANDLER_ARGS) +{ + adapter_t *sc = arg1; + int rc, timestamp; + + if ((sc->flags & FULL_INIT_DONE) == 0) + return (ENXIO); + + timestamp = sc->timestamp; + rc = sysctl_handle_int(oidp, ×tamp, arg2, req); + + if (rc != 0) + return (rc); + + if (timestamp != sc->timestamp) { + t3_set_reg_field(sc, A_TP_PC_CONFIG2, F_ENABLERXPKTTMSTPRSS, + timestamp ? F_ENABLERXPKTTMSTPRSS : 0); + sc->timestamp = timestamp; + } + + return (0); +} void t3_add_attach_sysctls(adapter_t *sc) @@ -3493,6 +3526,10 @@ t3_add_attach_sysctls(adapter_t *sc) "txq_overrun", CTLFLAG_RD, &txq_fills, 0, "#times txq overrun"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, + "core_clock", + CTLFLAG_RD, &sc->params.vpd.cclk, + 0, "core clock frequency (in KHz)"); } @@ -3537,6 +3574,12 @@ t3_add_configured_sysctls(adapter_t *sc) 0, t3_set_coalesce_usecs, "I", "interrupt coalescing timer (us)"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, + "pkt_timestamp", + CTLTYPE_INT | CTLFLAG_RW, sc, + 0, t3_pkt_timestamp, + "I", "provide packet timestamp instead of connection hash"); + for (i = 0; i < sc->params.nports; i++) { struct port_info *pi = &sc->port[i]; struct sysctl_oid *poid; From owner-svn-src-stable@FreeBSD.ORG Thu Aug 26 20:44:12 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA9CF1065694; Thu, 26 Aug 2010 20:44:12 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5D158FC21; Thu, 26 Aug 2010 20:44:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7QKiCCr053235; Thu, 26 Aug 2010 20:44:12 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7QKiCrI053223; Thu, 26 Aug 2010 20:44:12 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201008262044.o7QKiCrI053223@svn.freebsd.org> From: Ulrich Spoerlein Date: Thu, 26 Aug 2010 20:44:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211849 - in stable/8: lib/libarchive sbin/restore sys/dev/cxgb/ulp/iw_cxgb sys/fs/msdosfs sys/gnu/fs/ext2fs usr.bin/cpio usr.bin/tar usr.bin/tar/test usr.bin/xinstall usr.sbin/mtree X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2010 20:44:12 -0000 Author: uqs Date: Thu Aug 26 20:44:12 2010 New Revision: 211849 URL: http://svn.freebsd.org/changeset/base/211849 Log: MFC r204111: Fix common misspelling of hierarchy Modified: stable/8/lib/libarchive/archive_write_disk.3 stable/8/sbin/restore/restore.h stable/8/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c stable/8/sys/fs/msdosfs/msdosfs_vnops.c stable/8/sys/gnu/fs/ext2fs/ext2_vnops.c stable/8/usr.bin/cpio/bsdcpio.1 stable/8/usr.bin/tar/test/test_option_T.c stable/8/usr.bin/tar/test/test_option_s.c stable/8/usr.bin/tar/tree.c stable/8/usr.bin/xinstall/xinstall.c stable/8/usr.sbin/mtree/mtree.5 Directory Properties: stable/8/lib/libarchive/ (props changed) stable/8/sbin/restore/ (props changed) stable/8/sys/ (props changed) stable/8/usr.bin/cpio/ (props changed) stable/8/usr.bin/tar/ (props changed) stable/8/usr.bin/xinstall/ (props changed) stable/8/usr.sbin/mtree/ (props changed) Modified: stable/8/lib/libarchive/archive_write_disk.3 ============================================================================== --- stable/8/lib/libarchive/archive_write_disk.3 Thu Aug 26 19:55:03 2010 (r211848) +++ stable/8/lib/libarchive/archive_write_disk.3 Thu Aug 26 20:44:12 2010 (r211849) @@ -339,7 +339,7 @@ In particular, the directory .Pa aa is created as well as the final object .Pa bb . -In theory, this can be exploited to create an entire directory heirarchy +In theory, this can be exploited to create an entire directory hierarchy with a single request. Of course, this does not work if the .Cm ARCHIVE_EXTRACT_NODOTDOT @@ -371,5 +371,5 @@ compact implementation when appropriate. .Pp There should be a corresponding .Nm archive_read_disk -interface that walks a directory heirarchy and returns archive +interface that walks a directory hierarchy and returns archive entry objects. \ No newline at end of file Modified: stable/8/sbin/restore/restore.h ============================================================================== --- stable/8/sbin/restore/restore.h Thu Aug 26 19:55:03 2010 (r211848) +++ stable/8/sbin/restore/restore.h Thu Aug 26 20:44:12 2010 (r211849) @@ -41,7 +41,7 @@ extern int bflag; /* set input block size */ extern int dflag; /* print out debugging info */ extern int Dflag; /* degraded mode - try hard to get stuff back */ -extern int hflag; /* restore heirarchies */ +extern int hflag; /* restore hierarchies */ extern int mflag; /* restore by name instead of inode number */ extern int Nflag; /* do not write the disk */ extern int uflag; /* unlink symlink targets */ Modified: stable/8/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c ============================================================================== --- stable/8/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c Thu Aug 26 19:55:03 2010 (r211848) +++ stable/8/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c Thu Aug 26 20:44:12 2010 (r211849) @@ -675,7 +675,7 @@ static void __flush_qp(struct iwch_qp *q qhp->refcnt++; mtx_unlock(&qhp->lock); - /* locking heirarchy: cq lock first, then qp lock. */ + /* locking hierarchy: cq lock first, then qp lock. */ mtx_lock(&rchp->lock); mtx_lock(&qhp->lock); cxio_flush_hw_cq(&rchp->cq); @@ -685,7 +685,7 @@ static void __flush_qp(struct iwch_qp *q mtx_unlock(&rchp->lock); (*rchp->ibcq.comp_handler)(&rchp->ibcq, rchp->ibcq.cq_context); - /* locking heirarchy: cq lock first, then qp lock. */ + /* locking hierarchy: cq lock first, then qp lock. */ mtx_lock(&schp->lock); mtx_lock(&qhp->lock); cxio_flush_hw_cq(&schp->cq); Modified: stable/8/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- stable/8/sys/fs/msdosfs/msdosfs_vnops.c Thu Aug 26 19:55:03 2010 (r211848) +++ stable/8/sys/fs/msdosfs/msdosfs_vnops.c Thu Aug 26 20:44:12 2010 (r211849) @@ -1072,7 +1072,7 @@ abortit: /* * If ".." must be changed (ie the directory gets a new * parent) then the source directory must not be in the - * directory heirarchy above the target, as this would + * directory hierarchy above the target, as this would * orphan everything below the source directory. Also * the user must have write permission in the source so * as to be able to change "..". We must repeat the call Modified: stable/8/sys/gnu/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/8/sys/gnu/fs/ext2fs/ext2_vnops.c Thu Aug 26 19:55:03 2010 (r211848) +++ stable/8/sys/gnu/fs/ext2fs/ext2_vnops.c Thu Aug 26 20:44:12 2010 (r211849) @@ -864,7 +864,7 @@ abortit: /* * If ".." must be changed (ie the directory gets a new * parent) then the source directory must not be in the - * directory heirarchy above the target, as this would + * directory hierarchy above the target, as this would * orphan everything below the source directory. Also * the user must have write permission in the source so * as to be able to change "..". We must repeat the call Modified: stable/8/usr.bin/cpio/bsdcpio.1 ============================================================================== --- stable/8/usr.bin/cpio/bsdcpio.1 Thu Aug 26 19:55:03 2010 (r211848) +++ stable/8/usr.bin/cpio/bsdcpio.1 Thu Aug 26 20:44:12 2010 (r211849) @@ -266,7 +266,7 @@ for more information. .Sh EXAMPLES The .Nm -command is traditionally used to copy file heirarchies in conjunction +command is traditionally used to copy file hierarchies in conjunction with the .Xr find 1 command. Modified: stable/8/usr.bin/tar/test/test_option_T.c ============================================================================== --- stable/8/usr.bin/tar/test/test_option_T.c Thu Aug 26 19:55:03 2010 (r211848) +++ stable/8/usr.bin/tar/test/test_option_T.c Thu Aug 26 20:44:12 2010 (r211849) @@ -43,7 +43,7 @@ DEFINE_TEST(test_option_T) int r; struct stat st; - /* Create a simple dir heirarchy; bail if anything fails. */ + /* Create a simple dir hierarchy; bail if anything fails. */ if (!assertEqualInt(0, mkdir("d1", 0755))) return; if (!assertEqualInt(0, mkdir("d1/d2", 0755))) return; if (!touch("d1/f1")) return; Modified: stable/8/usr.bin/tar/test/test_option_s.c ============================================================================== --- stable/8/usr.bin/tar/test/test_option_s.c Thu Aug 26 19:55:03 2010 (r211848) +++ stable/8/usr.bin/tar/test/test_option_s.c Thu Aug 26 20:44:12 2010 (r211849) @@ -44,7 +44,7 @@ DEFINE_TEST(test_option_s) { struct stat st; - /* Create a sample file heirarchy. */ + /* Create a sample file hierarchy. */ assertEqualInt(0, mkdir("in", 0755)); assertEqualInt(0, mkdir("in/d1", 0755)); assertEqualInt(0, mkfile("in/d1/foo", "foo")); Modified: stable/8/usr.bin/tar/tree.c ============================================================================== --- stable/8/usr.bin/tar/tree.c Thu Aug 26 19:55:03 2010 (r211848) +++ stable/8/usr.bin/tar/tree.c Thu Aug 26 20:44:12 2010 (r211849) @@ -313,7 +313,7 @@ tree_next(struct tree *t) * violation. Just crash now. */ if (t->visit_type == TREE_ERROR_FATAL) { const char *msg = "Unable to continue traversing" - " directory heirarchy after a fatal error."; + " directory hierarchy after a fatal error."; write(2, msg, strlen(msg)); *(int *)0 = 1; /* Deliberate SEGV; NULL pointer dereference. */ exit(1); /* In case the SEGV didn't work. */ Modified: stable/8/usr.bin/xinstall/xinstall.c ============================================================================== --- stable/8/usr.bin/xinstall/xinstall.c Thu Aug 26 19:55:03 2010 (r211848) +++ stable/8/usr.bin/xinstall/xinstall.c Thu Aug 26 20:44:12 2010 (r211849) @@ -734,7 +734,7 @@ strip(const char *to_name) /* * install_dir -- - * build directory heirarchy + * build directory hierarchy */ void install_dir(char *path) Modified: stable/8/usr.sbin/mtree/mtree.5 ============================================================================== --- stable/8/usr.sbin/mtree/mtree.5 Thu Aug 26 19:55:03 2010 (r211848) +++ stable/8/usr.sbin/mtree/mtree.5 Thu Aug 26 20:44:12 2010 (r211849) @@ -33,12 +33,12 @@ .Os .Sh NAME .Nm mtree -.Nd format of mtree dir heirarchy files +.Nd format of mtree dir hierarchy files .Sh DESCRIPTION The .Nm format is a textual format that describes a collection of filesystem objects. -Such files are typically used to create or verify directory heirarchies. +Such files are typically used to create or verify directory hierarchies. .Ss General Format An .Nm From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 02:14:02 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9A541065674; Fri, 27 Aug 2010 02:14:02 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A804C8FC1A; Fri, 27 Aug 2010 02:14:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7R2E2qK060112; Fri, 27 Aug 2010 02:14:02 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7R2E2tQ060108; Fri, 27 Aug 2010 02:14:02 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201008270214.o7R2E2tQ060108@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 27 Aug 2010 02:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211856 - stable/7/sys/dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 02:14:02 -0000 Author: np Date: Fri Aug 27 02:14:02 2010 New Revision: 211856 URL: http://svn.freebsd.org/changeset/base/211856 Log: MFC r204348, r206109 r204348 Support IFCAP_VLAN_HWTSO capability. r206109 Bump response queue size to 2K, add statistic for starvation. Modified: stable/7/sys/dev/cxgb/cxgb_adapter.h stable/7/sys/dev/cxgb/cxgb_main.c stable/7/sys/dev/cxgb/cxgb_sge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_adapter.h Thu Aug 26 23:44:32 2010 (r211855) +++ stable/7/sys/dev/cxgb/cxgb_adapter.h Fri Aug 27 02:14:02 2010 (r211856) @@ -149,7 +149,7 @@ enum { #define FL_Q_SIZE 4096 #define JUMBO_Q_SIZE 1024 -#define RSPQ_Q_SIZE 1024 +#define RSPQ_Q_SIZE 2048 #define TX_ETH_Q_SIZE 1024 enum { TXQ_ETH = 0, @@ -187,6 +187,7 @@ struct sge_rspq { uint32_t offload_bundles; uint32_t pure_rsps; uint32_t unhandled_irqs; + uint32_t starved; bus_addr_t phys_addr; bus_dma_tag_t desc_tag; Modified: stable/7/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_main.c Thu Aug 26 23:44:32 2010 (r211855) +++ stable/7/sys/dev/cxgb/cxgb_main.c Fri Aug 27 02:14:02 2010 (r211856) @@ -1012,9 +1012,9 @@ cxgb_makedev(struct port_info *pi) } #ifdef TSO_SUPPORTED -#define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO) +#define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | IFCAP_VLAN_HWTSO) /* Don't enable TSO6 yet */ -#define CXGB_CAP_ENABLE (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO4 | IFCAP_JUMBO_MTU | IFCAP_LRO) +#define CXGB_CAP_ENABLE (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO4 | IFCAP_JUMBO_MTU | IFCAP_LRO | IFCAP_VLAN_HWTSO) #else #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_JUMBO_MTU) /* Don't enable TSO6 yet */ @@ -1072,9 +1072,9 @@ cxgb_port_attach(device_t dev) /* * disable TSO on 4-port - it isn't supported by the firmware yet */ - if (p->adapter->params.nports > 2) { - ifp->if_capabilities &= ~(IFCAP_TSO4 | IFCAP_TSO6); - ifp->if_capenable &= ~(IFCAP_TSO4 | IFCAP_TSO6); + if (sc->params.nports > 2) { + ifp->if_capabilities &= ~(IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTSO); + ifp->if_capenable &= ~(IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTSO); ifp->if_hwassist &= ~CSUM_TSO; } @@ -2095,28 +2095,34 @@ fail: mask = ifr->ifr_reqcap ^ ifp->if_capenable; if (mask & IFCAP_TXCSUM) { - if (IFCAP_TXCSUM & ifp->if_capenable) { - ifp->if_capenable &= ~(IFCAP_TXCSUM|IFCAP_TSO4); - ifp->if_hwassist &= ~(CSUM_TCP | CSUM_UDP - | CSUM_IP | CSUM_TSO); - } else { - ifp->if_capenable |= IFCAP_TXCSUM; - ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP - | CSUM_IP); + ifp->if_capenable ^= IFCAP_TXCSUM; + ifp->if_hwassist ^= (CSUM_TCP | CSUM_UDP | CSUM_IP); + + if (IFCAP_TSO & ifp->if_capenable && + !(IFCAP_TXCSUM & ifp->if_capenable)) { + ifp->if_capenable &= ~IFCAP_TSO; + ifp->if_hwassist &= ~CSUM_TSO; + if_printf(ifp, + "tso disabled due to -txcsum.\n"); } } - if (mask & IFCAP_RXCSUM) { + if (mask & IFCAP_RXCSUM) ifp->if_capenable ^= IFCAP_RXCSUM; - } if (mask & IFCAP_TSO4) { - if (IFCAP_TSO4 & ifp->if_capenable) { - ifp->if_capenable &= ~IFCAP_TSO4; - ifp->if_hwassist &= ~CSUM_TSO; - } else if (IFCAP_TXCSUM & ifp->if_capenable) { - ifp->if_capenable |= IFCAP_TSO4; - ifp->if_hwassist |= CSUM_TSO; + ifp->if_capenable ^= IFCAP_TSO4; + + if (IFCAP_TSO & ifp->if_capenable) { + if (IFCAP_TXCSUM & ifp->if_capenable) + ifp->if_hwassist |= CSUM_TSO; + else { + ifp->if_capenable &= ~IFCAP_TSO; + ifp->if_hwassist &= ~CSUM_TSO; + if_printf(ifp, + "enable txcsum first.\n"); + error = EAGAIN; + } } else - error = EINVAL; + ifp->if_hwassist &= ~CSUM_TSO; } if (mask & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; @@ -2140,6 +2146,8 @@ fail: PORT_UNLOCK(p); } } + if (mask & IFCAP_VLAN_HWTSO) + ifp->if_capenable ^= IFCAP_VLAN_HWTSO; if (mask & IFCAP_VLAN_HWCSUM) ifp->if_capenable ^= IFCAP_VLAN_HWCSUM; @@ -2431,25 +2439,33 @@ cxgb_tick_handler(void *arg, int count) if (p->rev == T3_REV_B2 && p->nports < 4 && sc->open_device_map) check_t3b2_mac(sc); - cause = t3_read_reg(sc, A_SG_INT_CAUSE); - reset = 0; - if (cause & F_FLEMPTY) { + cause = t3_read_reg(sc, A_SG_INT_CAUSE) & (F_RSPQSTARVE | F_FLEMPTY); + if (cause) { struct sge_qset *qs = &sc->sge.qs[0]; + uint32_t mask, v; + + v = t3_read_reg(sc, A_SG_RSPQ_FL_STATUS) & ~0xff00; + + mask = 1; + for (i = 0; i < SGE_QSETS; i++) { + if (v & mask) + qs[i].rspq.starved++; + mask <<= 1; + } - i = 0; - reset |= F_FLEMPTY; + mask <<= SGE_QSETS; /* skip RSPQXDISABLED */ - cause = (t3_read_reg(sc, A_SG_RSPQ_FL_STATUS) >> - S_FL0EMPTY) & 0xffff; - while (cause) { - qs->fl[i].empty += (cause & 1); - if (i) - qs++; - i ^= 1; - cause >>= 1; + for (i = 0; i < SGE_QSETS * 2; i++) { + if (v & mask) { + qs[i / 2].fl[i % 2].empty++; + } + mask <<= 1; } + + /* clear */ + t3_write_reg(sc, A_SG_RSPQ_FL_STATUS, v); + t3_write_reg(sc, A_SG_INT_CAUSE, cause); } - t3_write_reg(sc, A_SG_INT_CAUSE, reset); for (i = 0; i < sc->params.nports; i++) { struct port_info *pi = &sc->port[i]; Modified: stable/7/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_sge.c Thu Aug 26 23:44:32 2010 (r211855) +++ stable/7/sys/dev/cxgb/cxgb_sge.c Fri Aug 27 02:14:02 2010 (r211856) @@ -52,6 +52,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include +#include +#include #include #include @@ -1215,8 +1220,8 @@ write_wr_hdr_sgl(unsigned int ndesc, str } } -/* sizeof(*eh) + sizeof(*vhdr) + sizeof(*ip) + sizeof(*tcp) */ -#define TCPPKTHDRSIZE (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + 20 + 20) +/* sizeof(*eh) + sizeof(*ip) + sizeof(*tcp) */ +#define TCPPKTHDRSIZE (ETHER_HDR_LEN + 20 + 20) #ifdef VLAN_SUPPORTED #define GET_VTAG(cntrl, m) \ @@ -1266,12 +1271,7 @@ t3_encap(struct sge_qset *qs, struct mbu txsd = &txq->sdesc[txq->pidx]; sgl = txq->txq_sgl; m0 = *m; - - DPRINTF("t3_encap port_id=%d qsidx=%d ", pi->port_id, pi->first_qset); - DPRINTF("mlen=%d txpkt_intf=%d tx_chan=%d\n", m[0]->m_pkthdr.len, pi->txpkt_intf, pi->tx_chan); - if (cxgb_debug) - printf("mi_base=%p cidx=%d pidx=%d\n\n", txsd->mi.mi_base, txq->cidx, txq->pidx); - + mtx_assert(&txq->lock, MA_OWNED); cntrl = V_TXPKT_INTF(pi->txpkt_intf); /* @@ -1339,11 +1339,11 @@ t3_encap(struct sge_qset *qs, struct mbu return (0); } else if (tso_info) { - int min_size = TCPPKTHDRSIZE, eth_type, tagged; + int eth_type; struct cpl_tx_pkt_lso *hdr = (struct cpl_tx_pkt_lso *)txd; + struct ether_header *eh; struct ip *ip; struct tcphdr *tcp; - char *pkthdr; txd->flit[2] = 0; GET_VTAG(cntrl, m0); @@ -1352,13 +1352,7 @@ t3_encap(struct sge_qset *qs, struct mbu mlen = m0->m_pkthdr.len; hdr->len = htonl(mlen | 0x80000000); - DPRINTF("tso buf len=%d\n", mlen); - - tagged = m0->m_flags & M_VLANTAG; - if (!tagged) - min_size -= ETHER_VLAN_ENCAP_LEN; - - if (__predict_false(mlen < min_size)) { + if (__predict_false(mlen < TCPPKTHDRSIZE)) { printf("mbuf=%p,len=%d,tso_segsz=%d,csum_flags=%#x,flags=%#x", m0, mlen, m0->m_pkthdr.tso_segsz, m0->m_pkthdr.csum_flags, m0->m_flags); @@ -1366,25 +1360,23 @@ t3_encap(struct sge_qset *qs, struct mbu } /* Make sure that ether, ip, tcp headers are all in m0 */ - if (__predict_false(m0->m_len < min_size)) { - m0 = m_pullup(m0, min_size); + if (__predict_false(m0->m_len < TCPPKTHDRSIZE)) { + m0 = m_pullup(m0, TCPPKTHDRSIZE); if (__predict_false(m0 == NULL)) { /* XXX panic probably an overreaction */ panic("couldn't fit header into mbuf"); } } - pkthdr = m0->m_data; - if (tagged) { + eh = mtod(m0, struct ether_header *); + if (eh->ether_type == htons(ETHERTYPE_VLAN)) { eth_type = CPL_ETH_II_VLAN; - ip = (struct ip *)(pkthdr + ETHER_HDR_LEN + - ETHER_VLAN_ENCAP_LEN); + ip = (struct ip *)((struct ether_vlan_header *)eh + 1); } else { eth_type = CPL_ETH_II; - ip = (struct ip *)(pkthdr + ETHER_HDR_LEN); + ip = (struct ip *)(eh + 1); } - tcp = (struct tcphdr *)((uint8_t *)ip + - sizeof(*ip)); + tcp = (struct tcphdr *)(ip + 1); tso_info |= V_LSO_ETH_TYPE(eth_type) | V_LSO_IPHDR_WORDS(ip->ip_hl) | @@ -1392,11 +1384,10 @@ t3_encap(struct sge_qset *qs, struct mbu hdr->lso_info = htonl(tso_info); if (__predict_false(mlen <= PIO_LEN)) { - /* pkt not undersized but fits in PIO_LEN + /* + * pkt not undersized but fits in PIO_LEN * Indicates a TSO bug at the higher levels. */ - DPRINTF("**5592 Fix** mbuf=%p,len=%d,tso_segsz=%d,csum_flags=%#x,flags=%#x", - m0, mlen, m0->m_pkthdr.tso_segsz, m0->m_pkthdr.csum_flags, m0->m_flags); txq_prod(txq, 1, &txqs); m_copydata(m0, 0, mlen, (caddr_t)&txd->flit[3]); m_freem(m0); @@ -3487,6 +3478,9 @@ t3_add_configured_sysctls(adapter_t *sc) SYSCTL_ADD_UINT(ctx, rspqpoidlist, OID_AUTO, "credits", CTLFLAG_RD, &qs->rspq.credits, 0, "#credits"); + SYSCTL_ADD_UINT(ctx, rspqpoidlist, OID_AUTO, "starved", + CTLFLAG_RD, &qs->rspq.starved, + 0, "#times starved"); SYSCTL_ADD_XLONG(ctx, rspqpoidlist, OID_AUTO, "phys_addr", CTLFLAG_RD, &qs->rspq.phys_addr, "physical_address_of the queue"); From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 02:29:16 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8793106564A; Fri, 27 Aug 2010 02:29:16 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6E588FC08; Fri, 27 Aug 2010 02:29:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7R2TGIi060459; Fri, 27 Aug 2010 02:29:16 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7R2TGoV060456; Fri, 27 Aug 2010 02:29:16 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201008270229.o7R2TGoV060456@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 27 Aug 2010 02:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211857 - stable/7/sys/dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 02:29:17 -0000 Author: np Date: Fri Aug 27 02:29:16 2010 New Revision: 211857 URL: http://svn.freebsd.org/changeset/base/211857 Log: MFC r207643, r207687, r208887, r209115 r207643 T3 hardware filters. r207687 Do not hold the T3 firmware in memory all the time. r208887 tunable to control mc5 partition r209115 make format string a string literal Modified: stable/7/sys/dev/cxgb/cxgb_ioctl.h stable/7/sys/dev/cxgb/cxgb_main.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/cxgb/cxgb_ioctl.h ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_ioctl.h Fri Aug 27 02:14:02 2010 (r211856) +++ stable/7/sys/dev/cxgb/cxgb_ioctl.h Fri Aug 27 02:29:16 2010 (r211857) @@ -59,6 +59,9 @@ enum { CH_CLEAR_STATS, CH_GET_UP_LA, CH_GET_UP_IOQS, + CH_SET_FILTER, + CH_DEL_FILTER, + CH_GET_FILTER, }; /* statistics categories */ @@ -215,6 +218,29 @@ struct ch_up_ioqs { struct t3_ioq_entry *data; }; +struct ch_filter_tuple { + uint32_t sip; + uint32_t dip; + uint16_t sport; + uint16_t dport; + uint16_t vlan:12; + uint16_t vlan_prio:3; +}; + +struct ch_filter { + uint32_t filter_id; + struct ch_filter_tuple val; + struct ch_filter_tuple mask; + uint16_t mac_addr_idx; + uint8_t mac_hit:1; + uint8_t proto:2; + + uint8_t want_filter_id:1; + uint8_t pass:1; + uint8_t rss:1; + uint8_t qset; +}; + #define CHELSIO_SETREG _IOW('f', CH_SETREG, struct ch_reg) #define CHELSIO_GETREG _IOWR('f', CH_GETREG, struct ch_reg) #define CHELSIO_GETMTUTAB _IOR('f', CH_GETMTUTAB, struct ch_mtus) @@ -239,4 +265,7 @@ struct ch_up_ioqs { #define CHELSIO_GET_EEPROM _IOWR('f', CH_GET_EEPROM, struct ch_eeprom) #define CHELSIO_GET_UP_LA _IOWR('f', CH_GET_UP_LA, struct ch_up_la) #define CHELSIO_GET_UP_IOQS _IOWR('f', CH_GET_UP_IOQS, struct ch_up_ioqs) +#define CHELSIO_SET_FILTER _IOW('f', CH_SET_FILTER, struct ch_filter) +#define CHELSIO_DEL_FILTER _IOW('f', CH_DEL_FILTER, struct ch_filter) +#define CHELSIO_GET_FILTER _IOWR('f', CH_GET_FILTER, struct ch_filter) #endif Modified: stable/7/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_main.c Fri Aug 27 02:14:02 2010 (r211856) +++ stable/7/sys/dev/cxgb/cxgb_main.c Fri Aug 27 02:29:16 2010 (r211857) @@ -103,6 +103,13 @@ static void cxgb_ext_intr_handler(void * static void cxgb_tick_handler(void *, int); static void cxgb_tick(void *); static void setup_rss(adapter_t *sc); +static int alloc_filters(struct adapter *); +static int setup_hw_filters(struct adapter *); +static int set_filter(struct adapter *, int, const struct filter_info *); +static inline void mk_set_tcb_field(struct cpl_set_tcb_field *, unsigned int, + unsigned int, u64, u64); +static inline void set_tcb_field_ulp(struct cpl_set_tcb_field *, unsigned int, + unsigned int, u64, u64); /* Attachment glue for the PCI controller end of the device. Each port of * the device is attached separately, as defined later. @@ -235,6 +242,10 @@ TUNABLE_INT("hw.cxgb.snd_queue_len", &cx SYSCTL_UINT(_hw_cxgb, OID_AUTO, snd_queue_len, CTLFLAG_RDTUN, &cxgb_snd_queue_len, 0, "send queue size "); +static int nfilters = -1; +TUNABLE_INT("hw.cxgb.nfilters", &nfilters); +SYSCTL_INT(_hw_cxgb, OID_AUTO, nfilters, CTLFLAG_RDTUN, + &nfilters, 0, "max number of entries in the filter table"); enum { MAX_TXQ_ENTRIES = 16384, @@ -1001,7 +1012,7 @@ cxgb_makedev(struct port_info *pi) { pi->port_cdev = make_dev(&cxgb_cdevsw, pi->ifp->if_dunit, - UID_ROOT, GID_WHEEL, 0600, if_name(pi->ifp)); + UID_ROOT, GID_WHEEL, 0600, "%s", if_name(pi->ifp)); if (pi->port_cdev == NULL) return (ENOMEM); @@ -1695,6 +1706,7 @@ static int cxgb_up(struct adapter *sc) { int err = 0; + unsigned int mxf = t3_mc5_size(&sc->mc5) - MC5_MIN_TIDS; KASSERT(sc->open_device_map == 0, ("%s: device(s) already open (%x)", __func__, sc->open_device_map)); @@ -1711,6 +1723,15 @@ cxgb_up(struct adapter *sc) if ((err = update_tpsram(sc))) goto out; + if (is_offload(sc) && nfilters != 0) { + sc->params.mc5.nservers = 0; + + if (nfilters < 0) + sc->params.mc5.nfilters = mxf; + else + sc->params.mc5.nfilters = min(nfilters, mxf); + } + err = t3_init_hw(sc, 0); if (err) goto out; @@ -1722,6 +1743,7 @@ cxgb_up(struct adapter *sc) if (err) goto out; + alloc_filters(sc); setup_rss(sc); t3_intr_clear(sc); @@ -1748,6 +1770,7 @@ cxgb_up(struct adapter *sc) if (!(sc->flags & QUEUES_BOUND)) { bind_qsets(sc); + setup_hw_filters(sc); sc->flags |= QUEUES_BOUND; } @@ -3130,6 +3153,139 @@ cxgb_extension_ioctl(struct cdev *dev, u free(buf, M_DEVBUF); break; } + case CHELSIO_SET_FILTER: { + struct ch_filter *f = (struct ch_filter *)data;; + struct filter_info *p; + unsigned int nfilters = sc->params.mc5.nfilters; + + if (!is_offload(sc)) + return (EOPNOTSUPP); /* No TCAM */ + if (!(sc->flags & FULL_INIT_DONE)) + return (EAGAIN); /* mc5 not setup yet */ + if (nfilters == 0) + return (EBUSY); /* TOE will use TCAM */ + + /* sanity checks */ + if (f->filter_id >= nfilters || + (f->val.dip && f->mask.dip != 0xffffffff) || + (f->val.sport && f->mask.sport != 0xffff) || + (f->val.dport && f->mask.dport != 0xffff) || + (f->val.vlan && f->mask.vlan != 0xfff) || + (f->val.vlan_prio && + f->mask.vlan_prio != FILTER_NO_VLAN_PRI) || + (f->mac_addr_idx != 0xffff && f->mac_addr_idx > 15) || + f->qset >= SGE_QSETS || + sc->rrss_map[f->qset] >= RSS_TABLE_SIZE) + return (EINVAL); + + /* Was allocated with M_WAITOK */ + KASSERT(sc->filters, ("filter table NULL\n")); + + p = &sc->filters[f->filter_id]; + if (p->locked) + return (EPERM); + + bzero(p, sizeof(*p)); + p->sip = f->val.sip; + p->sip_mask = f->mask.sip; + p->dip = f->val.dip; + p->sport = f->val.sport; + p->dport = f->val.dport; + p->vlan = f->mask.vlan ? f->val.vlan : 0xfff; + p->vlan_prio = f->mask.vlan_prio ? (f->val.vlan_prio & 6) : + FILTER_NO_VLAN_PRI; + p->mac_hit = f->mac_hit; + p->mac_vld = f->mac_addr_idx != 0xffff; + p->mac_idx = f->mac_addr_idx; + p->pkt_type = f->proto; + p->report_filter_id = f->want_filter_id; + p->pass = f->pass; + p->rss = f->rss; + p->qset = f->qset; + + error = set_filter(sc, f->filter_id, p); + if (error == 0) + p->valid = 1; + break; + } + case CHELSIO_DEL_FILTER: { + struct ch_filter *f = (struct ch_filter *)data; + struct filter_info *p; + unsigned int nfilters = sc->params.mc5.nfilters; + + if (!is_offload(sc)) + return (EOPNOTSUPP); + if (!(sc->flags & FULL_INIT_DONE)) + return (EAGAIN); + if (nfilters == 0 || sc->filters == NULL) + return (EINVAL); + if (f->filter_id >= nfilters) + return (EINVAL); + + p = &sc->filters[f->filter_id]; + if (p->locked) + return (EPERM); + if (!p->valid) + return (EFAULT); /* Read "Bad address" as "Bad index" */ + + bzero(p, sizeof(*p)); + p->sip = p->sip_mask = 0xffffffff; + p->vlan = 0xfff; + p->vlan_prio = FILTER_NO_VLAN_PRI; + p->pkt_type = 1; + error = set_filter(sc, f->filter_id, p); + break; + } + case CHELSIO_GET_FILTER: { + struct ch_filter *f = (struct ch_filter *)data; + struct filter_info *p; + unsigned int i, nfilters = sc->params.mc5.nfilters; + + if (!is_offload(sc)) + return (EOPNOTSUPP); + if (!(sc->flags & FULL_INIT_DONE)) + return (EAGAIN); + if (nfilters == 0 || sc->filters == NULL) + return (EINVAL); + + i = f->filter_id == 0xffffffff ? 0 : f->filter_id + 1; + for (; i < nfilters; i++) { + p = &sc->filters[i]; + if (!p->valid) + continue; + + bzero(f, sizeof(*f)); + + f->filter_id = i; + f->val.sip = p->sip; + f->mask.sip = p->sip_mask; + f->val.dip = p->dip; + f->mask.dip = p->dip ? 0xffffffff : 0; + f->val.sport = p->sport; + f->mask.sport = p->sport ? 0xffff : 0; + f->val.dport = p->dport; + f->mask.dport = p->dport ? 0xffff : 0; + f->val.vlan = p->vlan == 0xfff ? 0 : p->vlan; + f->mask.vlan = p->vlan == 0xfff ? 0 : 0xfff; + f->val.vlan_prio = p->vlan_prio == FILTER_NO_VLAN_PRI ? + 0 : p->vlan_prio; + f->mask.vlan_prio = p->vlan_prio == FILTER_NO_VLAN_PRI ? + 0 : FILTER_NO_VLAN_PRI; + f->mac_hit = p->mac_hit; + f->mac_addr_idx = p->mac_vld ? p->mac_idx : 0xffff; + f->proto = p->pkt_type; + f->want_filter_id = p->report_filter_id; + f->pass = p->pass; + f->rss = p->rss; + f->qset = p->qset; + + break; + } + + if (i == nfilters) + f->filter_id = 0xffffffff; + break; + } default: return (EOPNOTSUPP); break; @@ -3184,5 +3340,127 @@ cxgb_get_regs(adapter_t *sc, struct ch_i XGM_REG(A_XGM_RX_SPI4_SOP_EOP_CNT, 1)); } +static int +alloc_filters(struct adapter *sc) +{ + struct filter_info *p; + unsigned int nfilters = sc->params.mc5.nfilters; -MODULE_DEPEND(if_cxgb, cxgb_t3fw, 1, 1, 1); + if (nfilters == 0) + return (0); + + p = malloc(sizeof(*p) * nfilters, M_DEVBUF, M_WAITOK | M_ZERO); + sc->filters = p; + + p = &sc->filters[nfilters - 1]; + p->vlan = 0xfff; + p->vlan_prio = FILTER_NO_VLAN_PRI; + p->pass = p->rss = p->valid = p->locked = 1; + + return (0); +} + +static int +setup_hw_filters(struct adapter *sc) +{ + int i, rc; + unsigned int nfilters = sc->params.mc5.nfilters; + + if (!sc->filters) + return (0); + + t3_enable_filters(sc); + + for (i = rc = 0; i < nfilters && !rc; i++) { + if (sc->filters[i].locked) + rc = set_filter(sc, i, &sc->filters[i]); + } + + return (rc); +} + +static int +set_filter(struct adapter *sc, int id, const struct filter_info *f) +{ + int len; + struct mbuf *m; + struct ulp_txpkt *txpkt; + struct work_request_hdr *wr; + struct cpl_pass_open_req *oreq; + struct cpl_set_tcb_field *sreq; + + len = sizeof(*wr) + sizeof(*oreq) + 2 * sizeof(*sreq); + KASSERT(len <= MHLEN, ("filter request too big for an mbuf")); + + id += t3_mc5_size(&sc->mc5) - sc->params.mc5.nroutes - + sc->params.mc5.nfilters; + + m = m_gethdr(M_WAITOK, MT_DATA); + m->m_len = m->m_pkthdr.len = len; + bzero(mtod(m, char *), len); + + wr = mtod(m, struct work_request_hdr *); + wr->wr_hi = htonl(V_WR_OP(FW_WROPCODE_BYPASS) | F_WR_ATOMIC); + + oreq = (struct cpl_pass_open_req *)(wr + 1); + txpkt = (struct ulp_txpkt *)oreq; + txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); + txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*oreq) / 8)); + OPCODE_TID(oreq) = htonl(MK_OPCODE_TID(CPL_PASS_OPEN_REQ, id)); + oreq->local_port = htons(f->dport); + oreq->peer_port = htons(f->sport); + oreq->local_ip = htonl(f->dip); + oreq->peer_ip = htonl(f->sip); + oreq->peer_netmask = htonl(f->sip_mask); + oreq->opt0h = 0; + oreq->opt0l = htonl(F_NO_OFFLOAD); + oreq->opt1 = htonl(V_MAC_MATCH_VALID(f->mac_vld) | + V_CONN_POLICY(CPL_CONN_POLICY_FILTER) | + V_VLAN_PRI(f->vlan_prio >> 1) | + V_VLAN_PRI_VALID(f->vlan_prio != FILTER_NO_VLAN_PRI) | + V_PKT_TYPE(f->pkt_type) | V_OPT1_VLAN(f->vlan) | + V_MAC_MATCH(f->mac_idx | (f->mac_hit << 4))); + + sreq = (struct cpl_set_tcb_field *)(oreq + 1); + set_tcb_field_ulp(sreq, id, 1, 0x1800808000ULL, + (f->report_filter_id << 15) | (1 << 23) | + ((u64)f->pass << 35) | ((u64)!f->rss << 36)); + set_tcb_field_ulp(sreq + 1, id, 0, 0xffffffff, (2 << 19) | 1); + t3_mgmt_tx(sc, m); + + if (f->pass && !f->rss) { + len = sizeof(*sreq); + m = m_gethdr(M_WAITOK, MT_DATA); + m->m_len = m->m_pkthdr.len = len; + bzero(mtod(m, char *), len); + sreq = mtod(m, struct cpl_set_tcb_field *); + sreq->wr.wr_hi = htonl(V_WR_OP(FW_WROPCODE_FORWARD)); + mk_set_tcb_field(sreq, id, 25, 0x3f80000, + (u64)sc->rrss_map[f->qset] << 19); + t3_mgmt_tx(sc, m); + } + return 0; +} + +static inline void +mk_set_tcb_field(struct cpl_set_tcb_field *req, unsigned int tid, + unsigned int word, u64 mask, u64 val) +{ + OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid)); + req->reply = V_NO_REPLY(1); + req->cpu_idx = 0; + req->word = htons(word); + req->mask = htobe64(mask); + req->val = htobe64(val); +} + +static inline void +set_tcb_field_ulp(struct cpl_set_tcb_field *req, unsigned int tid, + unsigned int word, u64 mask, u64 val) +{ + struct ulp_txpkt *txpkt = (struct ulp_txpkt *)req; + + txpkt->cmd_dest = htonl(V_ULPTX_CMD(ULP_TXPKT)); + txpkt->len = htonl(V_ULPTX_NFLITS(sizeof(*req) / 8)); + mk_set_tcb_field(req, tid, word, mask, val); +} From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 02:46:21 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA1F7106566C; Fri, 27 Aug 2010 02:46:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97EC68FC0C; Fri, 27 Aug 2010 02:46:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7R2kLFQ060891; Fri, 27 Aug 2010 02:46:21 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7R2kLlS060883; Fri, 27 Aug 2010 02:46:21 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201008270246.o7R2kLlS060883@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 27 Aug 2010 02:46:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211858 - in stable/7/sys/dev/cxgb: . common X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 02:46:21 -0000 Author: np Date: Fri Aug 27 02:46:21 2010 New Revision: 211858 URL: http://svn.freebsd.org/changeset/base/211858 Log: MFC r209839-209841, r211345-211347 r209839 Fix bufsize calculation so that cxgbtool can display information for the last I/O queue too. r209840 Eliminate ext_intr_task. The "slow" interrupt handler is already running on the adapter's task queue. Just do what the task does instead of enqueueing it. r209841 Improved link detection. r211345 wakeup is required if the adapter lock is released anywhere during init and not just for the may_sleep case. r211346 Always reset the XGMAC's XAUI PCS on a link up. r211347 Fix tx pause quanta and timer calculations. Modified: stable/7/sys/dev/cxgb/common/cxgb_ael1002.c stable/7/sys/dev/cxgb/common/cxgb_common.h stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c stable/7/sys/dev/cxgb/common/cxgb_xgmac.c stable/7/sys/dev/cxgb/cxgb_adapter.h stable/7/sys/dev/cxgb/cxgb_main.c stable/7/sys/dev/cxgb/cxgb_sge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Fri Aug 27 02:29:16 2010 (r211857) +++ stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Fri Aug 27 02:46:21 2010 (r211858) @@ -301,6 +301,9 @@ static int get_link_status_r(struct cphy if (err) return err; *link_ok = (stat0 & stat1 & (stat2 >> 12)) & 1; + + if (*link_ok == 0) + return (0); } if (speed) *speed = SPEED_10000; @@ -1951,8 +1954,6 @@ static int ael2020_intr_enable(struct cp if (err) return err; - phy->caps |= POLL_LINK_1ST_TIME; - /* enable standard Link Alarm Status Interrupts */ err = t3_phy_lasi_intr_enable(phy); if (err) Modified: stable/7/sys/dev/cxgb/common/cxgb_common.h ============================================================================== --- stable/7/sys/dev/cxgb/common/cxgb_common.h Fri Aug 27 02:29:16 2010 (r211857) +++ stable/7/sys/dev/cxgb/common/cxgb_common.h Fri Aug 27 02:46:21 2010 (r211858) @@ -64,7 +64,6 @@ enum { /* skip 25 */ SUPPORTED_MISC_IRQ = 1 << 26, SUPPORTED_IRQ = (SUPPORTED_LINK_IRQ | SUPPORTED_MISC_IRQ), - POLL_LINK_1ST_TIME = 1 << 27 }; enum { /* adapter interrupt-maintained statistics */ @@ -714,7 +713,6 @@ void t3_port_intr_enable(adapter_t *adap void t3_port_intr_disable(adapter_t *adapter, int idx); void t3_port_intr_clear(adapter_t *adapter, int idx); int t3_slow_intr_handler(adapter_t *adapter); -int t3_phy_intr_handler(adapter_t *adapter); void t3_link_changed(adapter_t *adapter, int port_id); int t3_link_start(struct cphy *phy, struct cmac *mac, struct link_config *lc); @@ -760,6 +758,7 @@ int t3_mc7_bd_read(struct mc7 *mc7, unsi int t3_mac_init(struct cmac *mac); void t3b_pcs_reset(struct cmac *mac); +void t3c_pcs_force_los(struct cmac *mac); void t3_mac_disable_exact_filters(struct cmac *mac); void t3_mac_enable_exact_filters(struct cmac *mac); int t3_mac_enable(struct cmac *mac, int which); Modified: stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c Fri Aug 27 02:29:16 2010 (r211857) +++ stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c Fri Aug 27 02:46:21 2010 (r211858) @@ -1533,6 +1533,9 @@ void t3_link_changed(adapter_t *adapter, phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); + if (link_ok == 0) + pi->link_fault = LF_NO; + if (lc->requested_fc & PAUSE_AUTONEG) fc &= lc->requested_fc; else @@ -1558,6 +1561,13 @@ void t3_link_changed(adapter_t *adapter, pi->link_fault = LF_YES; } + if (uses_xaui(adapter)) { + if (adapter->params.rev >= T3_REV_C) + t3c_pcs_force_los(mac); + else + t3b_pcs_reset(mac); + } + /* Don't report link up */ link_ok = 0; } else { @@ -1584,12 +1594,20 @@ void t3_link_changed(adapter_t *adapter, /* down -> up, or up -> up with changed settings */ if (adapter->params.rev > 0 && uses_xaui(adapter)) { + + if (adapter->params.rev >= T3_REV_C) + t3c_pcs_force_los(mac); + else + t3b_pcs_reset(mac); + t3_write_reg(adapter, A_XGM_XAUI_ACT_CTRL + mac->offset, F_TXACTENABLE | F_RXEN); } + /* disable TX FIFO drain */ t3_set_reg_field(adapter, A_XGM_TXFIFO_CFG + mac->offset, F_ENDROPPKT, 0); + t3_mac_enable(mac, MAC_DIRECTION_TX | MAC_DIRECTION_RX); t3_set_reg_field(adapter, A_XGM_STAT_CTRL + mac->offset, F_CLRSTATS, 1); @@ -1609,24 +1627,21 @@ void t3_link_changed(adapter_t *adapter, t3_set_reg_field(adapter, A_XGM_INT_ENABLE + mac->offset, F_XGM_INT, 0); - } - if (!link_fault) { - if (is_10G(adapter)) - pi->phy.ops->power_down(&pi->phy, 1); t3_mac_disable(mac, MAC_DIRECTION_RX); - t3_link_start(phy, mac, lc); - } - /* - * Make sure Tx FIFO continues to drain, even as rxen is left - * high to help detect and indicate remote faults. - */ - t3_set_reg_field(adapter, A_XGM_TXFIFO_CFG + mac->offset, 0, - F_ENDROPPKT); - t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, 0); - t3_write_reg(adapter, A_XGM_TX_CTRL + mac->offset, F_TXEN); - t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, F_RXEN); + /* + * Make sure Tx FIFO continues to drain, even as rxen is + * left high to help detect and indicate remote faults. + */ + t3_set_reg_field(adapter, + A_XGM_TXFIFO_CFG + mac->offset, 0, F_ENDROPPKT); + t3_write_reg(adapter, A_XGM_RX_CTRL + mac->offset, 0); + t3_write_reg(adapter, + A_XGM_TX_CTRL + mac->offset, F_TXEN); + t3_write_reg(adapter, + A_XGM_RX_CTRL + mac->offset, F_RXEN); + } } t3_os_link_changed(adapter, port_id, link_ok, speed, duplex, fc, @@ -2165,13 +2180,14 @@ static int mac_intr_handler(adapter_t *a mac->stats.xaui_pcs_ctc_err++; if (cause & F_XAUIPCSALIGNCHANGE) mac->stats.xaui_pcs_align_change++; - if (cause & F_XGM_INT) { - t3_set_reg_field(adap, - A_XGM_INT_ENABLE + mac->offset, - F_XGM_INT, 0); + if (cause & F_XGM_INT & + t3_read_reg(adap, A_XGM_INT_ENABLE + mac->offset)) { + t3_set_reg_field(adap, A_XGM_INT_ENABLE + mac->offset, + F_XGM_INT, 0); /* link fault suspected */ pi->link_fault = LF_MAYBE; + t3_os_link_intr(pi); } t3_write_reg(adap, A_XGM_INT_CAUSE + mac->offset, cause); @@ -2185,7 +2201,7 @@ static int mac_intr_handler(adapter_t *a /* * Interrupt handler for PHY events. */ -int t3_phy_intr_handler(adapter_t *adapter) +static int phy_intr_handler(adapter_t *adapter) { u32 i, cause = t3_read_reg(adapter, A_T3DBG_INT_CAUSE); @@ -2199,7 +2215,7 @@ int t3_phy_intr_handler(adapter_t *adapt int phy_cause = p->phy.ops->intr_handler(&p->phy); if (phy_cause & cphy_cause_link_change) - t3_link_changed(adapter, i); + t3_os_link_intr(p); if (phy_cause & cphy_cause_fifo_error) p->phy.fifo_errors++; if (phy_cause & cphy_cause_module_change) @@ -2267,7 +2283,7 @@ int t3_slow_intr_handler(adapter_t *adap if (cause & F_XGMAC0_1) mac_intr_handler(adapter, 1); if (cause & F_T3DBG) - t3_os_ext_intr_handler(adapter); + phy_intr_handler(adapter); /* Clear the interrupts just processed. */ t3_write_reg(adapter, A_PL_INT_CAUSE0, cause); Modified: stable/7/sys/dev/cxgb/common/cxgb_xgmac.c ============================================================================== --- stable/7/sys/dev/cxgb/common/cxgb_xgmac.c Fri Aug 27 02:29:16 2010 (r211857) +++ stable/7/sys/dev/cxgb/common/cxgb_xgmac.c Fri Aug 27 02:46:21 2010 (r211858) @@ -101,11 +101,40 @@ void t3b_pcs_reset(struct cmac *mac) { t3_set_reg_field(mac->adapter, A_XGM_RESET_CTRL + mac->offset, F_PCS_RESET_, 0); - udelay(20); + + /* No delay required */ + t3_set_reg_field(mac->adapter, A_XGM_RESET_CTRL + mac->offset, 0, F_PCS_RESET_); } +void t3c_pcs_force_los(struct cmac *mac) +{ + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT0 + mac->offset, + F_LOWSIGFORCEEN0 | F_LOWSIGFORCEVALUE0, + F_LOWSIGFORCEEN0 | F_LOWSIGFORCEVALUE0); + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT1 + mac->offset, + F_LOWSIGFORCEEN1 | F_LOWSIGFORCEVALUE1, + F_LOWSIGFORCEEN1 | F_LOWSIGFORCEVALUE1); + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT2 + mac->offset, + F_LOWSIGFORCEEN2 | F_LOWSIGFORCEVALUE2, + F_LOWSIGFORCEEN2 | F_LOWSIGFORCEVALUE2); + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT3 + mac->offset, + F_LOWSIGFORCEEN3 | F_LOWSIGFORCEVALUE3, + F_LOWSIGFORCEEN3 | F_LOWSIGFORCEVALUE3); + + /* No delay required */ + + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT0 + mac->offset, + F_LOWSIGFORCEEN0, 0); + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT1 + mac->offset, + F_LOWSIGFORCEEN1, 0); + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT2 + mac->offset, + F_LOWSIGFORCEEN2, 0); + t3_set_reg_field(mac->adapter, A_XGM_SERDES_STAT3 + mac->offset, + F_LOWSIGFORCEEN3, 0); +} + /** * t3_mac_init - initialize a MAC * @mac: the MAC to initialize @@ -437,7 +466,7 @@ static int rx_fifo_hwm(int mtu) */ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu) { - int hwm, lwm, divisor; + int hwm, lwm; int ipg; unsigned int thres, v, reg; adapter_t *adap = mac->adapter; @@ -516,16 +545,6 @@ int t3_mac_set_mtu(struct cmac *mac, uns t3_set_reg_field(adap, A_XGM_TXFIFO_CFG + mac->offset, V_TXFIFOTHRESH(M_TXFIFOTHRESH) | V_TXIPG(M_TXIPG), V_TXFIFOTHRESH(thres) | V_TXIPG(ipg)); - - /* Assuming a minimum drain rate of 2.5Gbps... - */ - if (adap->params.rev > 0) { - divisor = (adap->params.rev == T3_REV_C) ? 64 : 8; - t3_write_reg(adap, A_XGM_PAUSE_TIMER + mac->offset, - (hwm - lwm) * 4 / divisor); - } - t3_write_reg(adap, A_XGM_TX_PAUSE_QUANTA + mac->offset, - MAC_RXFIFO_SIZE * 4 * 8 / 512); return 0; } @@ -545,9 +564,17 @@ int t3_mac_set_speed_duplex_fc(struct cm u32 val; adapter_t *adap = mac->adapter; unsigned int oft = mac->offset; + unsigned int pause_bits; if (duplex >= 0 && duplex != DUPLEX_FULL) return -EINVAL; + + pause_bits = MAC_RXFIFO_SIZE * 4 * 8; + t3_write_reg(adap, A_XGM_TX_PAUSE_QUANTA + mac->offset, + pause_bits / 512); + t3_write_reg(adap, A_XGM_PAUSE_TIMER + mac->offset, + (pause_bits >> (adap->params.rev == T3_REV_C ? 10 : 7))); + if (mac->multiport) { u32 rx_max_pkt_size = G_RXMAXPKTSIZE(t3_read_reg(adap, @@ -556,9 +583,9 @@ int t3_mac_set_speed_duplex_fc(struct cm val &= ~V_RXFIFOPAUSEHWM(M_RXFIFOPAUSEHWM); val |= V_RXFIFOPAUSEHWM(rx_fifo_hwm(rx_max_pkt_size) / 8); t3_write_reg(adap, A_XGM_RXFIFO_CFG + oft, val); - t3_set_reg_field(adap, A_XGM_TX_CFG + oft, F_TXPAUSEEN, F_TXPAUSEEN); + return t3_vsc7323_set_speed_fc(adap, speed, fc, mac->ext_port); } if (speed >= 0) { Modified: stable/7/sys/dev/cxgb/cxgb_adapter.h ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_adapter.h Fri Aug 27 02:29:16 2010 (r211857) +++ stable/7/sys/dev/cxgb/cxgb_adapter.h Fri Aug 27 02:46:21 2010 (r211858) @@ -116,6 +116,8 @@ struct port_info { int link_fault; uint8_t hw_addr[ETHER_ADDR_LEN]; + struct callout link_check_ch; + struct task link_check_task; struct task timer_reclaim_task; struct cdev *port_cdev; @@ -363,7 +365,6 @@ struct adapter { struct filter_info *filters; /* Tasks */ - struct task ext_intr_task; struct task slow_intr_task; struct task tick_task; struct taskqueue *tq; @@ -508,12 +509,12 @@ adap2pinfo(struct adapter *adap, int idx int t3_os_find_pci_capability(adapter_t *adapter, int cap); int t3_os_pci_save_state(struct adapter *adapter); int t3_os_pci_restore_state(struct adapter *adapter); +void t3_os_link_intr(struct port_info *); void t3_os_link_changed(adapter_t *adapter, int port_id, int link_status, int speed, int duplex, int fc, int mac_was_reset); void t3_os_phymod_changed(struct adapter *adap, int port_id); void t3_sge_err_intr_handler(adapter_t *adapter); int t3_offload_tx(struct t3cdev *, struct mbuf *); -void t3_os_ext_intr_handler(adapter_t *adapter); void t3_os_set_hw_addr(adapter_t *adapter, int port_idx, u8 hw_addr[]); int t3_mgmt_tx(adapter_t *adap, struct mbuf *m); @@ -545,10 +546,6 @@ int t3_get_desc(const struct sge_qset *q unsigned char *data); void t3_update_qset_coalesce(struct sge_qset *qs, const struct qset_params *p); -#define CXGB_TICKS(a) ((a)->params.linkpoll_period ? \ - (hz * (a)->params.linkpoll_period) / 10 : \ - (a)->params.stats_update_period * hz) - /* * XXX figure out how we can return this to being private to sge */ Modified: stable/7/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_main.c Fri Aug 27 02:29:16 2010 (r211857) +++ stable/7/sys/dev/cxgb/cxgb_main.c Fri Aug 27 02:46:21 2010 (r211858) @@ -99,9 +99,10 @@ static void cxgb_build_medialist(struct static void cxgb_media_status(struct ifnet *, struct ifmediareq *); static int setup_sge_qsets(adapter_t *); static void cxgb_async_intr(void *); -static void cxgb_ext_intr_handler(void *, int); static void cxgb_tick_handler(void *, int); static void cxgb_tick(void *); +static void link_check_callout(void *); +static void check_link_status(void *, int); static void setup_rss(adapter_t *sc); static int alloc_filters(struct adapter *); static int setup_hw_filters(struct adapter *); @@ -608,7 +609,6 @@ cxgb_controller_attach(device_t dev) taskqueue_start_threads(&sc->tq, 1, PI_NET, "%s taskq", device_get_nameunit(dev)); - TASK_INIT(&sc->ext_intr_task, 0, cxgb_ext_intr_handler, sc); TASK_INIT(&sc->tick_task, 0, cxgb_tick_handler, sc); @@ -692,7 +692,7 @@ cxgb_controller_attach(device_t dev) sc->params.vpd.port_type[2], sc->params.vpd.port_type[3]); device_printf(sc->dev, "Firmware Version %s\n", &sc->fw_version[0]); - callout_reset(&sc->cxgb_tick_ch, CXGB_TICKS(sc), cxgb_tick, sc); + callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); t3_add_attach_sysctls(sc); out: if (error) @@ -1051,6 +1051,9 @@ cxgb_port_attach(device_t dev) device_get_unit(device_get_parent(dev)), p->port_id); PORT_LOCK_INIT(p, p->lockbuf); + callout_init(&p->link_check_ch, CALLOUT_MPSAFE); + TASK_INIT(&p->link_check_task, 0, check_link_status, p); + /* Allocate an ifnet object and set it up */ ifp = p->ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { @@ -1307,29 +1310,6 @@ void t3_os_phymod_changed(struct adapter } } -/* - * Interrupt-context handler for external (PHY) interrupts. - */ -void -t3_os_ext_intr_handler(adapter_t *sc) -{ - if (cxgb_debug) - printf("t3_os_ext_intr_handler\n"); - /* - * Schedule a task to handle external interrupts as they may be slow - * and we use a mutex to protect MDIO registers. We disable PHY - * interrupts in the meantime and let the task reenable them when - * it's done. - */ - if (sc->slow_intr_mask) { - ADAPTER_LOCK(sc); - sc->slow_intr_mask &= ~F_T3DBG; - t3_write_reg(sc, A_PL_INT_ENABLE0, sc->slow_intr_mask); - taskqueue_enqueue(sc->tq, &sc->ext_intr_task); - ADAPTER_UNLOCK(sc); - } -} - void t3_os_set_hw_addr(adapter_t *adapter, int port_idx, u8 hw_addr[]) { @@ -1850,11 +1830,12 @@ cxgb_init_locked(struct port_info *p) struct adapter *sc = p->adapter; struct ifnet *ifp = p->ifp; struct cmac *mac = &p->mac; - int rc = 0, may_sleep = 0; + int rc = 0, may_sleep = 0, gave_up_lock = 0; ADAPTER_LOCK_ASSERT_OWNED(sc); while (!IS_DOOMED(p) && IS_BUSY(sc)) { + gave_up_lock = 1; if (mtx_sleep(&sc->flags, &sc->lock, PCATCH, "cxgbinit", 0)) { rc = EINTR; goto done; @@ -1874,6 +1855,7 @@ cxgb_init_locked(struct port_info *p) if (may_sleep) { SET_BUSY(sc); + gave_up_lock = 1; ADAPTER_UNLOCK(sc); } @@ -1902,18 +1884,20 @@ cxgb_init_locked(struct port_info *p) ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; PORT_UNLOCK(p); - t3_link_changed(sc, p->port_id); - /* all ok */ setbit(&sc->open_device_map, p->port_id); + callout_reset(&p->link_check_ch, + p->phy.caps & SUPPORTED_LINK_IRQ ? hz * 3 : hz / 4, + link_check_callout, p); done: if (may_sleep) { ADAPTER_LOCK(sc); KASSERT(IS_BUSY(sc), ("%s: controller not busy.", __func__)); CLR_BUSY(sc); - wakeup_one(&sc->flags); } + if (gave_up_lock) + wakeup_one(&sc->flags); ADAPTER_UNLOCK(sc); return (rc); } @@ -1979,9 +1963,11 @@ cxgb_uninit_synchronized(struct port_inf clrbit(&sc->open_device_map, pi->port_id); t3_port_intr_disable(sc, pi->port_id); taskqueue_drain(sc->tq, &sc->slow_intr_task); - taskqueue_drain(sc->tq, &sc->ext_intr_task); taskqueue_drain(sc->tq, &sc->tick_task); + callout_drain(&pi->link_check_ch); + taskqueue_drain(sc->tq, &pi->link_check_task); + PORT_LOCK(pi); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); @@ -2337,61 +2323,47 @@ cxgb_async_intr(void *data) { adapter_t *sc = data; - if (cxgb_debug) - device_printf(sc->dev, "cxgb_async_intr\n"); - /* - * May need to sleep - defer to taskqueue - */ + t3_write_reg(sc, A_PL_INT_ENABLE0, 0); + (void) t3_read_reg(sc, A_PL_INT_ENABLE0); taskqueue_enqueue(sc->tq, &sc->slow_intr_task); } static void -cxgb_ext_intr_handler(void *arg, int count) +link_check_callout(void *arg) { - adapter_t *sc = (adapter_t *)arg; - - if (cxgb_debug) - printf("cxgb_ext_intr_handler\n"); + struct port_info *pi = arg; + struct adapter *sc = pi->adapter; - t3_phy_intr_handler(sc); + if (!isset(&sc->open_device_map, pi->port_id)) + return; - /* Now reenable external interrupts */ - ADAPTER_LOCK(sc); - if (sc->slow_intr_mask) { - sc->slow_intr_mask |= F_T3DBG; - t3_write_reg(sc, A_PL_INT_CAUSE0, F_T3DBG); - t3_write_reg(sc, A_PL_INT_ENABLE0, sc->slow_intr_mask); - } - ADAPTER_UNLOCK(sc); + taskqueue_enqueue(sc->tq, &pi->link_check_task); } -static inline int -link_poll_needed(struct port_info *p) +static void +check_link_status(void *arg, int pending) { - struct cphy *phy = &p->phy; + struct port_info *pi = arg; + struct adapter *sc = pi->adapter; - if (phy->caps & POLL_LINK_1ST_TIME) { - p->phy.caps &= ~POLL_LINK_1ST_TIME; - return (1); - } + if (!isset(&sc->open_device_map, pi->port_id)) + return; + + t3_link_changed(sc, pi->port_id); - return (p->link_fault || !(phy->caps & SUPPORTED_LINK_IRQ)); + if (pi->link_fault || !(pi->phy.caps & SUPPORTED_LINK_IRQ)) + callout_reset(&pi->link_check_ch, hz, link_check_callout, pi); } -static void -check_link_status(adapter_t *sc) +void +t3_os_link_intr(struct port_info *pi) { - int i; - - for (i = 0; i < (sc)->params.nports; ++i) { - struct port_info *p = &sc->port[i]; - - if (!isset(&sc->open_device_map, p->port_id)) - continue; - - if (link_poll_needed(p)) - t3_link_changed(sc, i); - } + /* + * Schedule a link check in the near future. If the link is flapping + * rapidly we'll keep resetting the callout and delaying the check until + * things stabilize a bit. + */ + callout_reset(&pi->link_check_ch, hz / 4, link_check_callout, pi); } static void @@ -2443,7 +2415,7 @@ cxgb_tick(void *arg) return; taskqueue_enqueue(sc->tq, &sc->tick_task); - callout_reset(&sc->cxgb_tick_ch, CXGB_TICKS(sc), cxgb_tick, sc); + callout_reset(&sc->cxgb_tick_ch, hz, cxgb_tick, sc); } static void @@ -2457,8 +2429,6 @@ cxgb_tick_handler(void *arg, int count) if (sc->flags & CXGB_SHUTDOWN || !(sc->flags & FULL_INIT_DONE)) return; - check_link_status(sc); - if (p->rev == T3_REV_B2 && p->nports < 4 && sc->open_device_map) check_t3b2_mac(sc); @@ -3141,7 +3111,6 @@ cxgb_extension_ioctl(struct cdev *dev, u if (!error) { v = (uint32_t *)buf; - ioqs->bufsize -= 4 * sizeof(uint32_t); ioqs->ioq_rx_enable = *v++; ioqs->ioq_tx_enable = *v++; ioqs->ioq_rx_status = *v++; Modified: stable/7/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_sge.c Fri Aug 27 02:29:16 2010 (r211857) +++ stable/7/sys/dev/cxgb/cxgb_sge.c Fri Aug 27 02:46:21 2010 (r211858) @@ -731,6 +731,8 @@ sge_slow_intr_handler(void *arg, int nco adapter_t *sc = arg; t3_slow_intr_handler(sc); + t3_write_reg(sc, A_PL_INT_ENABLE0, sc->slow_intr_mask); + (void) t3_read_reg(sc, A_PL_INT_ENABLE0); } /** @@ -3009,8 +3011,11 @@ t3b_intr(void *data) if (!map) return; - if (__predict_false(map & F_ERRINTR)) + if (__predict_false(map & F_ERRINTR)) { + t3_write_reg(adap, A_PL_INT_ENABLE0, 0); + (void) t3_read_reg(adap, A_PL_INT_ENABLE0); taskqueue_enqueue(adap->tq, &adap->slow_intr_task); + } mtx_lock(&q0->lock); for_each_port(adap, i) @@ -3038,8 +3043,11 @@ t3_intr_msi(void *data) if (process_responses_gts(adap, &adap->sge.qs[i].rspq)) new_packets = 1; mtx_unlock(&q0->lock); - if (new_packets == 0) + if (new_packets == 0) { + t3_write_reg(adap, A_PL_INT_ENABLE0, 0); + (void) t3_read_reg(adap, A_PL_INT_ENABLE0); taskqueue_enqueue(adap->tq, &adap->slow_intr_task); + } } void From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 08:05:44 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98EBE1065679; Fri, 27 Aug 2010 08:05:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87A0A8FC19; Fri, 27 Aug 2010 08:05:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7R85iCb068282; Fri, 27 Aug 2010 08:05:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7R85i2w068280; Fri, 27 Aug 2010 08:05:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201008270805.o7R85i2w068280@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 27 Aug 2010 08:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211863 - stable/8/lib/libc/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 08:05:44 -0000 Author: kib Date: Fri Aug 27 08:05:44 2010 New Revision: 211863 URL: http://svn.freebsd.org/changeset/base/211863 Log: MFC r211750: Remove extra FreeBSD tag. Modified: stable/8/lib/libc/sys/stack_protector.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/sys/stack_protector.c ============================================================================== --- stable/8/lib/libc/sys/stack_protector.c Fri Aug 27 07:45:50 2010 (r211862) +++ stable/8/lib/libc/sys/stack_protector.c Fri Aug 27 08:05:44 2010 (r211863) @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* $NetBSD: stack_protector.c,v 1.4 2006/11/22 17:23:25 christos Exp $ */ /* $OpenBSD: stack_protector.c,v 1.10 2006/03/31 05:34:44 deraadt Exp $ */ /* From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 09:33:27 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14FDE1065694; Fri, 27 Aug 2010 09:33:27 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02D688FC15; Fri, 27 Aug 2010 09:33:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7R9XQqI070374; Fri, 27 Aug 2010 09:33:26 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7R9XQll070371; Fri, 27 Aug 2010 09:33:26 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201008270933.o7R9XQll070371@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 27 Aug 2010 09:33:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211865 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 09:33:27 -0000 Author: uqs Date: Fri Aug 27 09:33:26 2010 New Revision: 211865 URL: http://svn.freebsd.org/changeset/base/211865 Log: MFC r205208: - Use `Va' for variables instead of `Dv'. - Correctly spell negative values. - Also fixes make manlint. Modified: stable/8/share/man/man4/sysmouse.4 Directory Properties: stable/8/share/man/ (props changed) stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/sysmouse.4 ============================================================================== --- stable/8/share/man/man4/sysmouse.4 Fri Aug 27 08:54:40 2010 (r211864) +++ stable/8/share/man/man4/sysmouse.4 Fri Aug 27 09:33:26 2010 (r211865) @@ -94,18 +94,18 @@ Right button status; cleared if pressed, .El .It Byte 2 The first half of horizontal movement count in two's complement; --128 through 127. +\-128 through 127. .It Byte 3 The first half of vertical movement count in two's complement; --128 through 127. +\-128 through 127. .It Byte 4 The second half of the horizontal movement count in two's complement; --128 through 127. +\-128 through 127. To obtain the full horizontal movement count, add the byte 2 and 4. .It Byte 5 The second half of the vertical movement count in two's complement; --128 through 127. +\-128 through 127. To obtain the full vertical movement count, add the byte 3 and 5. .El @@ -148,7 +148,7 @@ These commands manipulate the operation Returns the hardware information of the attached device in the following structure. Only the -.Dv iftype +.Va iftype field is guaranteed to be filled with the correct value in the current version of the .Nm @@ -164,16 +164,16 @@ typedef struct mousehw { .Ed .Pp The -.Dv buttons +.Va buttons field holds the number of buttons detected by the driver. .Pp The -.Dv iftype +.Va iftype is always .Dv MOUSE_IF_SYSMOUSE . .Pp The -.Dv type +.Va type tells the device type: .Dv MOUSE_MOUSE , .Dv MOUSE_TRACKBALL , @@ -183,7 +183,7 @@ or .Dv MOUSE_UNKNOWN . .Pp The -.Dv model +.Va model is always .Dv MOUSE_MODEL_GENERIC at the operation level 0. @@ -194,7 +194,7 @@ or one of constants at higher operation levels. .Pp The -.Dv hwid +.Va hwid is always zero. .Pp .It Dv MOUSE_GETMODE Ar mousemode_t *mode @@ -213,7 +213,7 @@ typedef struct mousemode { .Ed .Pp The -.Dv protocol +.Va protocol field tells the format in which the device status is returned when the mouse data is read by the user program. It is @@ -223,19 +223,19 @@ at the operation level zero. at the operation level one. .Pp The -.Dv rate -is always set to -1. +.Va rate +is always set to \-1. .Pp The -.Dv resolution -is always set to -1. +.Va resolution +is always set to \-1. .Pp The -.Dv accelfactor +.Va accelfactor is always 0. .Pp The -.Dv packetsize +.Va packetsize field specifies the length of the data packet. It depends on the operation level. @@ -248,13 +248,13 @@ operation level. .El .Pp The array -.Dv syncmask +.Va syncmask holds a bit mask and pattern to detect the first byte of the data packet. -.Dv syncmask[0] +.Va syncmask[0] is the bit mask to be ANDed with a byte. If the result is equal to -.Dv syncmask[1] , +.Va syncmask[1] , the byte is likely to be the first byte of the data packet. Note that this method of detecting the first byte is not 100% reliable; thus, it should be taken only as an advisory measure. @@ -264,7 +264,7 @@ The command changes the current operatio as specified in .Ar mode . Only -.Dv level +.Va level may be modifiable. Setting values in the other field does not generate error and has no effect. @@ -323,7 +323,7 @@ struct mouse_info { .Ed .Pp .Bl -tag -width operation -compact -.It Dv operation +.It Va operation This can be one of .Pp .Bl -tag -width MOUSE_MOVEABS -compact @@ -333,21 +333,21 @@ Enables and displays mouse cursor. Disables and hides mouse cursor. .It Dv MOUSE_MOVEABS Moves mouse cursor to position supplied in -.Dv u.data . +.Va u.data . .It Dv MOUSE_MOVEREL Adds position supplied in -.Dv u.data +.Va u.data to current position. .It Dv MOUSE_GETINFO Returns current mouse position in the current virtual console and button status in -.Dv u.data . +.Va u.data . .It Dv MOUSE_MODE This sets the .Xr signal 3 to be delivered to the current process when a button is pressed. The signal to be delivered is set in -.Dv u.mode . +.Va u.mode . .El .Pp The above operations are for virtual consoles. @@ -360,7 +360,7 @@ to pass mouse data to the console driver .It Dv MOUSE_ACTION .It Dv MOUSE_MOTION_EVENT These operations take the information in -.Dv u.data +.Va u.data and act upon it. Mouse data will be sent to the .Nm @@ -370,7 +370,7 @@ also processes button press actions and requested or performs cut and paste operations if the current console is a text interface. .It Dv MOUSE_BUTTON_EVENT -.Dv u.data +.Va u.data specifies a button and its click count. The console driver will use this information for signal delivery if requested or @@ -385,11 +385,11 @@ They are intended to replace functions p .Dv MOUSE_ACTION alone. .Pp -.It Dv Sq u +.It Va u This union is one of .Pp .Bl -tag -width data -compact -.It Dv data +.It Va data .Bd -literal struct mouse_data { int x; @@ -399,18 +399,17 @@ struct mouse_data { }; .Ed .Pp -.Dv x , -.Dv y +.Va x , y and -.Dv z +.Va z represent movement of the mouse along respective directions. -.Dv buttons +.Va buttons tells the state of buttons. It encodes up to 31 buttons in the bit 0 though the bit 30. If a button is held down, the corresponding bit is set. .Pp -.It Dv mode +.It Va mode .Bd -literal struct mouse_mode { int mode; @@ -419,16 +418,16 @@ struct mouse_mode { .Ed .Pp The -.Dv signal +.Va signal field specifies the signal to be delivered to the process. It must be one of the values defined in .In signal.h . The -.Dv mode +.Va mode field is currently unused. .Pp -.It Dv event +.It Va event .Bd -literal struct mouse_event { int id; @@ -437,12 +436,12 @@ struct mouse_event { .Ed .Pp The -.Dv id +.Va id field specifies a button number as in -.Dv u.data.buttons . +.Va u.data.buttons . Only one bit/button is set. The -.Dv value +.Va value field holds the click count: the number of times the user has clicked the button successively. From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 09:35:05 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90C821065674; Fri, 27 Aug 2010 09:35:05 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EC498FC13; Fri, 27 Aug 2010 09:35:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7R9Z5w2070507; Fri, 27 Aug 2010 09:35:05 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7R9Z55J070501; Fri, 27 Aug 2010 09:35:05 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201008270935.o7R9Z55J070501@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 27 Aug 2010 09:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211866 - in stable/8/lib/libc: gen locale X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 09:35:05 -0000 Author: uqs Date: Fri Aug 27 09:35:05 2010 New Revision: 211866 URL: http://svn.freebsd.org/changeset/base/211866 Log: MFC r206615: remove .Pp where not needed Modified: stable/8/lib/libc/gen/confstr.3 stable/8/lib/libc/gen/sysconf.3 stable/8/lib/libc/gen/sysctl.3 stable/8/lib/libc/locale/isalnum.3 stable/8/lib/libc/locale/isalpha.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) Modified: stable/8/lib/libc/gen/confstr.3 ============================================================================== --- stable/8/lib/libc/gen/confstr.3 Fri Aug 27 09:33:26 2010 (r211865) +++ stable/8/lib/libc/gen/confstr.3 Fri Aug 27 09:35:05 2010 (r211866) @@ -79,7 +79,6 @@ The copied value is always null terminat The available values are as follows: .Pp .Bl -tag -width 6n -.Pp .It Li _CS_PATH Return a value for the .Ev PATH Modified: stable/8/lib/libc/gen/sysconf.3 ============================================================================== --- stable/8/lib/libc/gen/sysconf.3 Fri Aug 27 09:33:26 2010 (r211865) +++ stable/8/lib/libc/gen/sysconf.3 Fri Aug 27 09:35:05 2010 (r211866) @@ -60,9 +60,7 @@ Shell programmers who need access to the utility. .Pp The available values are as follows: -.Pp .Bl -tag -width 6n -.Pp .It Li _SC_ARG_MAX The maximum bytes of argument to .Xr execve 2 . @@ -165,9 +163,7 @@ otherwise \-1. .El .Pp These values also exist, but may not be standard: -.Pp .Bl -tag -width 6n -.Pp .It Li _SC_PHYS_PAGES The number of pages of physical memory. Note that it is possible that the product of this value and the value of Modified: stable/8/lib/libc/gen/sysctl.3 ============================================================================== --- stable/8/lib/libc/gen/sysctl.3 Fri Aug 27 09:33:26 2010 (r211865) +++ stable/8/lib/libc/gen/sysctl.3 Fri Aug 27 09:35:05 2010 (r211866) @@ -286,7 +286,6 @@ privilege may change the value. .It "HW_MACHINE_ARCH string no" .It "HW_REALMEM integer no" .El -.Pp .Bl -tag -width 6n .It Li HW_MACHINE The machine class. @@ -352,7 +351,6 @@ information. .It "KERN_VERSION string no" .It "KERN_VNODE struct xvnode no" .El -.Pp .Bl -tag -width 6n .It Li KERN_ARGMAX The maximum bytes of argument to @@ -539,7 +537,6 @@ privilege may change the value. .It "PF_INET IPv4 values yes" .It "PF_INET6 IPv6 values yes" .El -.Pp .Bl -tag -width 6n .It Li PF_ROUTE Return the entire routing table or a subset of it. @@ -646,7 +643,6 @@ privilege may change the value. .It "USER_TZNAME_MAX integer no" .El .Bl -tag -width 6n -.Pp .It Li USER_BC_BASE_MAX The maximum ibase/obase values in the .Xr bc 1 @@ -736,7 +732,6 @@ privilege may change the value. .It "VM_V_INACTIVE_TARGET integer yes" .It "VM_V_PAGEOUT_FREE_MIN integer yes" .El -.Pp .Bl -tag -width 6n .It Li VM_LOADAVG Return the load average history. Modified: stable/8/lib/libc/locale/isalnum.3 ============================================================================== --- stable/8/lib/libc/locale/isalnum.3 Fri Aug 27 09:33:26 2010 (r211865) +++ stable/8/lib/libc/locale/isalnum.3 Fri Aug 27 09:35:05 2010 (r211866) @@ -59,7 +59,6 @@ or the value of .Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): -.Pp .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ .It "\&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''" .It "\&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''" Modified: stable/8/lib/libc/locale/isalpha.3 ============================================================================== --- stable/8/lib/libc/locale/isalpha.3 Fri Aug 27 09:33:26 2010 (r211865) +++ stable/8/lib/libc/locale/isalpha.3 Fri Aug 27 09:35:05 2010 (r211866) @@ -59,7 +59,6 @@ or the value of .Pp In the ASCII character set, this includes the following characters (with their numeric values shown in octal): -.Pp .Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ .It "\&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''" .It "\&106\ ``F'' \t107\ ``G'' \t110\ ``H'' \t111\ ``I'' \t112\ ``J''" From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 09:36:03 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E7D41065695; Fri, 27 Aug 2010 09:36:03 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0DF48FC19; Fri, 27 Aug 2010 09:36:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7R9a2IL070569; Fri, 27 Aug 2010 09:36:02 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7R9a2uP070565; Fri, 27 Aug 2010 09:36:02 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201008270936.o7R9a2uP070565@svn.freebsd.org> From: Andre Oppermann Date: Fri, 27 Aug 2010 09:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211867 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 09:36:03 -0000 Author: andre Date: Fri Aug 27 09:36:02 2010 New Revision: 211867 URL: http://svn.freebsd.org/changeset/base/211867 Log: MFC r211462: Untangle the net.inet.tcp.log_in_vain and net.inet.tcp.log_debug sysctl's and remove any side effects. Modified: stable/8/sys/netinet/tcp_input.c stable/8/sys/netinet/tcp_subr.c stable/8/sys/netinet/tcp_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Fri Aug 27 09:35:05 2010 (r211866) +++ stable/8/sys/netinet/tcp_input.c Fri Aug 27 09:36:02 2010 (r211867) @@ -571,7 +571,7 @@ findpcb: */ if ((tcp_log_in_vain == 1 && (thflags & TH_SYN)) || tcp_log_in_vain == 2) { - if ((s = tcp_log_addrs(NULL, th, (void *)ip, ip6))) + if ((s = tcp_log_vain(NULL, th, (void *)ip, ip6))) log(LOG_INFO, "%s; %s: Connection attempt " "to closed port\n", s, __func__); } Modified: stable/8/sys/netinet/tcp_subr.c ============================================================================== --- stable/8/sys/netinet/tcp_subr.c Fri Aug 27 09:35:05 2010 (r211866) +++ stable/8/sys/netinet/tcp_subr.c Fri Aug 27 09:36:02 2010 (r211867) @@ -262,6 +262,8 @@ VNET_DEFINE(uma_zone_t, sack_hole_zone); static struct inpcb *tcp_notify(struct inpcb *, int); static void tcp_isn_tick(void *); +static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, + void *ip4hdr, const void *ip6hdr); /* * Target size of TCP PCB hash tables. Must be a power of two. @@ -2224,9 +2226,33 @@ SYSCTL_PROC(_net_inet_tcp, TCPCTL_DROP, * and ip6_hdr pointers have to be passed as void pointers. */ char * +tcp_log_vain(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, + const void *ip6hdr) +{ + + /* Is logging enabled? */ + if (tcp_log_in_vain == 0) + return (NULL); + + return (tcp_log_addr(inc, th, ip4hdr, ip6hdr)); +} + +char * tcp_log_addrs(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, const void *ip6hdr) { + + /* Is logging enabled? */ + if (tcp_log_debug == 0) + return (NULL); + + return (tcp_log_addr(inc, th, ip4hdr, ip6hdr)); +} + +static char * +tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, + const void *ip6hdr) +{ char *s, *sp; size_t size; struct ip *ip; @@ -2249,10 +2275,6 @@ tcp_log_addrs(struct in_conninfo *inc, s 2 * INET_ADDRSTRLEN; #endif /* INET6 */ - /* Is logging enabled? */ - if (tcp_log_debug == 0 && tcp_log_in_vain == 0) - return (NULL); - s = malloc(size, M_TCPLOG, M_ZERO|M_NOWAIT); if (s == NULL) return (NULL); Modified: stable/8/sys/netinet/tcp_var.h ============================================================================== --- stable/8/sys/netinet/tcp_var.h Fri Aug 27 09:35:05 2010 (r211866) +++ stable/8/sys/netinet/tcp_var.h Fri Aug 27 09:36:02 2010 (r211867) @@ -602,6 +602,8 @@ void tcp_destroy(void); void tcp_fini(void *); char *tcp_log_addrs(struct in_conninfo *, struct tcphdr *, void *, const void *); +char *tcp_log_vain(struct in_conninfo *, struct tcphdr *, void *, + const void *); int tcp_reass(struct tcpcb *, struct tcphdr *, int *, struct mbuf *); void tcp_reass_init(void); #ifdef VIMAGE From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 09:59:51 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1C7D106566C; Fri, 27 Aug 2010 09:59:51 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C00208FC19; Fri, 27 Aug 2010 09:59:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7R9xpuV071573; Fri, 27 Aug 2010 09:59:51 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7R9xpBF071569; Fri, 27 Aug 2010 09:59:51 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201008270959.o7R9xpBF071569@svn.freebsd.org> From: Andre Oppermann Date: Fri, 27 Aug 2010 09:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211869 - stable/7/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 09:59:52 -0000 Author: andre Date: Fri Aug 27 09:59:51 2010 New Revision: 211869 URL: http://svn.freebsd.org/changeset/base/211869 Log: MFC r211462: Untangle the net.inet.tcp.log_in_vain and net.inet.tcp.log_debug sysctl's and remove any side effects. Modified: stable/7/sys/netinet/tcp_input.c stable/7/sys/netinet/tcp_subr.c stable/7/sys/netinet/tcp_var.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/tcp_input.c ============================================================================== --- stable/7/sys/netinet/tcp_input.c Fri Aug 27 09:55:51 2010 (r211868) +++ stable/7/sys/netinet/tcp_input.c Fri Aug 27 09:59:51 2010 (r211869) @@ -462,7 +462,7 @@ findpcb: */ if ((tcp_log_in_vain == 1 && (thflags & TH_SYN)) || tcp_log_in_vain == 2) { - if ((s = tcp_log_addrs(NULL, th, (void *)ip, ip6))) + if ((s = tcp_log_vain(NULL, th, (void *)ip, ip6))) log(LOG_INFO, "%s; %s: Connection attempt " "to closed port\n", s, __func__); } Modified: stable/7/sys/netinet/tcp_subr.c ============================================================================== --- stable/7/sys/netinet/tcp_subr.c Fri Aug 27 09:55:51 2010 (r211868) +++ stable/7/sys/netinet/tcp_subr.c Fri Aug 27 09:59:51 2010 (r211869) @@ -235,6 +235,8 @@ uma_zone_t sack_hole_zone; static struct inpcb *tcp_notify(struct inpcb *, int); static void tcp_isn_tick(void *); +static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, + void *ip4hdr, const void *ip6hdr); /* * Target size of TCP PCB hash tables. Must be a power of two. @@ -2120,9 +2122,33 @@ SYSCTL_PROC(_net_inet_tcp, TCPCTL_DROP, * and ip6_hdr pointers have to be passed as void pointers. */ char * +tcp_log_vain(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, + const void *ip6hdr) +{ + + /* Is logging enabled? */ + if (tcp_log_in_vain == 0) + return (NULL); + + return (tcp_log_addr(inc, th, ip4hdr, ip6hdr)); +} + +char * tcp_log_addrs(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, const void *ip6hdr) { + + /* Is logging enabled? */ + if (tcp_log_debug == 0) + return (NULL); + + return (tcp_log_addr(inc, th, ip4hdr, ip6hdr)); +} + +static char * +tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, + const void *ip6hdr) +{ char *s, *sp; size_t size; struct ip *ip; @@ -2145,10 +2171,6 @@ tcp_log_addrs(struct in_conninfo *inc, s 2 * INET_ADDRSTRLEN; #endif /* INET6 */ - /* Is logging enabled? */ - if (tcp_log_debug == 0 && tcp_log_in_vain == 0) - return (NULL); - s = malloc(size, M_TCPLOG, M_ZERO|M_NOWAIT); if (s == NULL) return (NULL); Modified: stable/7/sys/netinet/tcp_var.h ============================================================================== --- stable/7/sys/netinet/tcp_var.h Fri Aug 27 09:55:51 2010 (r211868) +++ stable/7/sys/netinet/tcp_var.h Fri Aug 27 09:59:51 2010 (r211869) @@ -538,6 +538,8 @@ void tcp_init(void); void tcp_fini(void *); char *tcp_log_addrs(struct in_conninfo *, struct tcphdr *, void *, const void *); +char *tcp_log_vain(struct in_conninfo *, struct tcphdr *, void *, + const void *); int tcp_reass(struct tcpcb *, struct tcphdr *, int *, struct mbuf *); void tcp_reass_init(void); void tcp_input(struct mbuf *, int); From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 10:15:46 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3636E10656A4; Fri, 27 Aug 2010 10:15:46 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 246678FC12; Fri, 27 Aug 2010 10:15:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7RAFkAm072133; Fri, 27 Aug 2010 10:15:46 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7RAFknT072130; Fri, 27 Aug 2010 10:15:46 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201008271015.o7RAFknT072130@svn.freebsd.org> From: Andre Oppermann Date: Fri, 27 Aug 2010 10:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211870 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 10:15:46 -0000 Author: andre Date: Fri Aug 27 10:15:45 2010 New Revision: 211870 URL: http://svn.freebsd.org/changeset/base/211870 Log: MFC r211464: If a TCP connection has been idle for one retransmit timeout or more it must reset its congestion window back to the initial window. RFC3390 has increased the initial window from 1 segment to up to 4 segments. The initial window increase of RFC3390 wasn't reflected into the restart window which remained at its original defaults of 4 segments for local and 1 segment for all other connections. Both values are controllable through sysctl net.inet.tcp.local_slowstart_flightsize and net.inet.tcp.slowstart_flightsize. The increase helps TCP's slow start algorithm to open up the congestion window much faster. Reviewed by: lstewart MFC after: 1 week Modified: stable/8/sys/netinet/tcp_output.c stable/8/sys/netinet/tcp_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/tcp_output.c ============================================================================== --- stable/8/sys/netinet/tcp_output.c Fri Aug 27 09:59:51 2010 (r211869) +++ stable/8/sys/netinet/tcp_output.c Fri Aug 27 10:15:45 2010 (r211870) @@ -140,7 +140,7 @@ tcp_output(struct tcpcb *tp) { struct socket *so = tp->t_inpcb->inp_socket; long len, recwin, sendwin; - int off, flags, error; + int off, flags, error, rw; struct mbuf *m; struct ip *ip = NULL; struct ipovly *ipov = NULL; @@ -176,23 +176,34 @@ tcp_output(struct tcpcb *tp) idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una); if (idle && ticks - tp->t_rcvtime >= tp->t_rxtcur) { /* - * We have been idle for "a while" and no acks are - * expected to clock out any data we send -- - * slow start to get ack "clock" running again. + * If we've been idle for more than one retransmit + * timeout the old congestion window is no longer + * current and we have to reduce it to the restart + * window before we can transmit again. * - * Set the slow-start flight size depending on whether - * this is a local network or not. + * The restart window is the initial window or the last + * CWND, whichever is smaller. + * + * This is done to prevent us from flooding the path with + * a full CWND at wirespeed, overloading router and switch + * buffers along the way. + * + * See RFC5681 Section 4.1. "Restarting Idle Connections". */ - int ss = V_ss_fltsz; + if (V_tcp_do_rfc3390) + rw = min(4 * tp->t_maxseg, + max(2 * tp->t_maxseg, 4380)); #ifdef INET6 - if (isipv6) { - if (in6_localaddr(&tp->t_inpcb->in6p_faddr)) - ss = V_ss_fltsz_local; - } else -#endif /* INET6 */ - if (in_localaddr(tp->t_inpcb->inp_faddr)) - ss = V_ss_fltsz_local; - tp->snd_cwnd = tp->t_maxseg * ss; + else if ((isipv6 ? in6_localaddr(&tp->t_inpcb->in6p_faddr) : + in_localaddr(tp->t_inpcb->inp_faddr))) +#else + else if (in_localaddr(tp->t_inpcb->inp_faddr)) +#endif + rw = V_ss_fltsz_local * tp->t_maxseg; + else + rw = V_ss_fltsz * tp->t_maxseg; + + tp->snd_cwnd = min(rw, tp->snd_cwnd); } tp->t_flags &= ~TF_LASTIDLE; if (idle) { Modified: stable/8/sys/netinet/tcp_var.h ============================================================================== --- stable/8/sys/netinet/tcp_var.h Fri Aug 27 09:59:51 2010 (r211869) +++ stable/8/sys/netinet/tcp_var.h Fri Aug 27 10:15:45 2010 (r211870) @@ -556,6 +556,7 @@ extern int tcp_log_in_vain; VNET_DECLARE(int, tcp_mssdflt); /* XXX */ VNET_DECLARE(int, tcp_minmss); VNET_DECLARE(int, tcp_delack_enabled); +VNET_DECLARE(int, tcp_do_rfc3390); VNET_DECLARE(int, tcp_do_newreno); VNET_DECLARE(int, path_mtu_discovery); VNET_DECLARE(int, ss_fltsz); @@ -566,6 +567,7 @@ VNET_DECLARE(int, ss_fltsz_local); #define V_tcp_mssdflt VNET(tcp_mssdflt) #define V_tcp_minmss VNET(tcp_minmss) #define V_tcp_delack_enabled VNET(tcp_delack_enabled) +#define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) #define V_tcp_do_newreno VNET(tcp_do_newreno) #define V_path_mtu_discovery VNET(path_mtu_discovery) #define V_ss_fltsz VNET(ss_fltsz) From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 10:16:32 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 906D310656B5; Fri, 27 Aug 2010 10:16:32 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E8988FC15; Fri, 27 Aug 2010 10:16:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7RAGWrI074604; Fri, 27 Aug 2010 10:16:32 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7RAGWgV074600; Fri, 27 Aug 2010 10:16:32 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201008271016.o7RAGWgV074600@svn.freebsd.org> From: Andre Oppermann Date: Fri, 27 Aug 2010 10:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211871 - stable/7/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 10:16:32 -0000 Author: andre Date: Fri Aug 27 10:16:32 2010 New Revision: 211871 URL: http://svn.freebsd.org/changeset/base/211871 Log: MFC r211464: If a TCP connection has been idle for one retransmit timeout or more it must reset its congestion window back to the initial window. RFC3390 has increased the initial window from 1 segment to up to 4 segments. The initial window increase of RFC3390 wasn't reflected into the restart window which remained at its original defaults of 4 segments for local and 1 segment for all other connections. Both values are controllable through sysctl net.inet.tcp.local_slowstart_flightsize and net.inet.tcp.slowstart_flightsize. The increase helps TCP's slow start algorithm to open up the congestion window much faster. Reviewed by: lstewart MFC after: 1 week Modified: stable/7/sys/netinet/tcp_input.c stable/7/sys/netinet/tcp_output.c stable/7/sys/netinet/tcp_var.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/tcp_input.c ============================================================================== --- stable/7/sys/netinet/tcp_input.c Fri Aug 27 10:15:45 2010 (r211870) +++ stable/7/sys/netinet/tcp_input.c Fri Aug 27 10:16:32 2010 (r211871) @@ -123,7 +123,7 @@ static int tcp_do_rfc3042 = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW, &tcp_do_rfc3042, 0, "Enable RFC 3042 (Limited Transmit)"); -static int tcp_do_rfc3390 = 1; +int tcp_do_rfc3390 = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW, &tcp_do_rfc3390, 0, "Enable RFC 3390 (Increasing TCP's Initial Congestion Window)"); Modified: stable/7/sys/netinet/tcp_output.c ============================================================================== --- stable/7/sys/netinet/tcp_output.c Fri Aug 27 10:15:45 2010 (r211870) +++ stable/7/sys/netinet/tcp_output.c Fri Aug 27 10:16:32 2010 (r211871) @@ -127,7 +127,7 @@ tcp_output(struct tcpcb *tp) { struct socket *so = tp->t_inpcb->inp_socket; long len, recwin, sendwin; - int off, flags, error; + int off, flags, error, rw; struct mbuf *m; struct ip *ip = NULL; struct ipovly *ipov = NULL; @@ -163,23 +163,34 @@ tcp_output(struct tcpcb *tp) idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una); if (idle && (ticks - (int)tp->t_rcvtime) >= tp->t_rxtcur) { /* - * We have been idle for "a while" and no acks are - * expected to clock out any data we send -- - * slow start to get ack "clock" running again. + * If we've been idle for more than one retransmit + * timeout the old congestion window is no longer + * current and we have to reduce it to the restart + * window before we can transmit again. * - * Set the slow-start flight size depending on whether - * this is a local network or not. + * The restart window is the initial window or the last + * CWND, whichever is smaller. + * + * This is done to prevent us from flooding the path with + * a full CWND at wirespeed, overloading router and switch + * buffers along the way. + * + * See RFC5681 Section 4.1. "Restarting Idle Connections". */ - int ss = ss_fltsz; + if (tcp_do_rfc3390) + rw = min(4 * tp->t_maxseg, + max(2 * tp->t_maxseg, 4380)); #ifdef INET6 - if (isipv6) { - if (in6_localaddr(&tp->t_inpcb->in6p_faddr)) - ss = ss_fltsz_local; - } else -#endif /* INET6 */ - if (in_localaddr(tp->t_inpcb->inp_faddr)) - ss = ss_fltsz_local; - tp->snd_cwnd = tp->t_maxseg * ss; + else if ((isipv6 ? in6_localaddr(&tp->t_inpcb->in6p_faddr) : + in_localaddr(tp->t_inpcb->inp_faddr))) +#else + else if (in_localaddr(tp->t_inpcb->inp_faddr)) +#endif + rw = ss_fltsz_local * tp->t_maxseg; + else + rw = ss_fltsz * tp->t_maxseg; + + tp->snd_cwnd = min(rw, tp->snd_cwnd); } tp->t_flags &= ~TF_LASTIDLE; if (idle) { Modified: stable/7/sys/netinet/tcp_var.h ============================================================================== --- stable/7/sys/netinet/tcp_var.h Fri Aug 27 10:15:45 2010 (r211870) +++ stable/7/sys/netinet/tcp_var.h Fri Aug 27 10:16:32 2010 (r211871) @@ -513,6 +513,7 @@ extern int tcp_mssdflt; /* XXX */ extern int tcp_minmss; extern int tcp_delack_enabled; extern int tcp_do_newreno; +extern int tcp_do_rfc3390; extern int path_mtu_discovery; extern int ss_fltsz; extern int ss_fltsz_local; From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 10:47:19 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E05E10656A5; Fri, 27 Aug 2010 10:47:19 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBD3D8FC14; Fri, 27 Aug 2010 10:47:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7RAlIGx075475; Fri, 27 Aug 2010 10:47:18 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7RAlHBe075388; Fri, 27 Aug 2010 10:47:17 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201008271047.o7RAlHBe075388@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 27 Aug 2010 10:47:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211872 - in stable/8: bin/pwait contrib/com_err contrib/csup games/pom gnu/usr.bin/gdb/kgdb lib/libarchive lib/libc/gen lib/libc/posix1e lib/libc/stdlib lib/libcam lib/libcompat/4.1 li... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 10:47:19 -0000 Author: uqs Date: Fri Aug 27 10:47:17 2010 New Revision: 211872 URL: http://svn.freebsd.org/changeset/base/211872 Log: MFC r206622,207939,208593,208732,209031: mdoc cleanup - order prologue by Dd/Dt/Os - fix prologue - remove empty lines and other garbage - uppercase document title Modified: stable/8/bin/pwait/pwait.1 stable/8/contrib/com_err/compile_et.1 stable/8/contrib/csup/csup.1 stable/8/games/pom/pom.6 stable/8/gnu/usr.bin/gdb/kgdb/kgdb.1 stable/8/lib/libarchive/archive_entry.3 stable/8/lib/libarchive/archive_read.3 stable/8/lib/libarchive/archive_read_disk.3 stable/8/lib/libarchive/archive_util.3 stable/8/lib/libarchive/archive_write.3 stable/8/lib/libarchive/archive_write_disk.3 stable/8/lib/libarchive/libarchive-formats.5 stable/8/lib/libarchive/tar.5 stable/8/lib/libc/gen/check_utility_compat.3 stable/8/lib/libc/gen/dladdr.3 stable/8/lib/libc/gen/dlinfo.3 stable/8/lib/libc/gen/dllockinit.3 stable/8/lib/libc/gen/dlopen.3 stable/8/lib/libc/gen/fmtcheck.3 stable/8/lib/libc/gen/ftok.3 stable/8/lib/libc/gen/setproctitle.3 stable/8/lib/libc/gen/stringlist.3 stable/8/lib/libc/posix1e/mac_prepare.3 stable/8/lib/libc/stdlib/hcreate.3 stable/8/lib/libc/stdlib/ptsname.3 stable/8/lib/libcam/cam.3 stable/8/lib/libcam/cam_cdbparse.3 stable/8/lib/libcompat/4.1/cftime.3 stable/8/lib/libcompat/4.4/cuserid.3 stable/8/lib/libedit/editline.3 stable/8/lib/libedit/editrc.5 stable/8/lib/libelf/elf.3 stable/8/lib/libelf/elf_begin.3 stable/8/lib/libelf/elf_cntl.3 stable/8/lib/libelf/elf_end.3 stable/8/lib/libelf/elf_errmsg.3 stable/8/lib/libelf/elf_fill.3 stable/8/lib/libelf/elf_flagdata.3 stable/8/lib/libelf/elf_getarhdr.3 stable/8/lib/libelf/elf_getarsym.3 stable/8/lib/libelf/elf_getbase.3 stable/8/lib/libelf/elf_getdata.3 stable/8/lib/libelf/elf_getident.3 stable/8/lib/libelf/elf_getphnum.3 stable/8/lib/libelf/elf_getscn.3 stable/8/lib/libelf/elf_getshnum.3 stable/8/lib/libelf/elf_getshstrndx.3 stable/8/lib/libelf/elf_hash.3 stable/8/lib/libelf/elf_kind.3 stable/8/lib/libelf/elf_memory.3 stable/8/lib/libelf/elf_next.3 stable/8/lib/libelf/elf_rand.3 stable/8/lib/libelf/elf_rawfile.3 stable/8/lib/libelf/elf_strptr.3 stable/8/lib/libelf/elf_update.3 stable/8/lib/libelf/elf_version.3 stable/8/lib/libelf/gelf.3 stable/8/lib/libelf/gelf_checksum.3 stable/8/lib/libelf/gelf_fsize.3 stable/8/lib/libelf/gelf_getcap.3 stable/8/lib/libelf/gelf_getclass.3 stable/8/lib/libelf/gelf_getdyn.3 stable/8/lib/libelf/gelf_getehdr.3 stable/8/lib/libelf/gelf_getmove.3 stable/8/lib/libelf/gelf_getphdr.3 stable/8/lib/libelf/gelf_getrel.3 stable/8/lib/libelf/gelf_getrela.3 stable/8/lib/libelf/gelf_getshdr.3 stable/8/lib/libelf/gelf_getsym.3 stable/8/lib/libelf/gelf_getsyminfo.3 stable/8/lib/libelf/gelf_getsymshndx.3 stable/8/lib/libelf/gelf_newehdr.3 stable/8/lib/libelf/gelf_newphdr.3 stable/8/lib/libelf/gelf_update_ehdr.3 stable/8/lib/libelf/gelf_xlatetof.3 stable/8/lib/libgssapi/gss_accept_sec_context.3 stable/8/lib/libgssapi/gss_acquire_cred.3 stable/8/lib/libgssapi/gss_add_cred.3 stable/8/lib/libgssapi/gss_add_oid_set_member.3 stable/8/lib/libgssapi/gss_canonicalize_name.3 stable/8/lib/libgssapi/gss_compare_name.3 stable/8/lib/libgssapi/gss_context_time.3 stable/8/lib/libgssapi/gss_create_empty_oid_set.3 stable/8/lib/libgssapi/gss_delete_sec_context.3 stable/8/lib/libgssapi/gss_display_name.3 stable/8/lib/libgssapi/gss_display_status.3 stable/8/lib/libgssapi/gss_duplicate_name.3 stable/8/lib/libgssapi/gss_export_name.3 stable/8/lib/libgssapi/gss_export_sec_context.3 stable/8/lib/libgssapi/gss_get_mic.3 stable/8/lib/libgssapi/gss_import_name.3 stable/8/lib/libgssapi/gss_import_sec_context.3 stable/8/lib/libgssapi/gss_indicate_mechs.3 stable/8/lib/libgssapi/gss_init_sec_context.3 stable/8/lib/libgssapi/gss_inquire_context.3 stable/8/lib/libgssapi/gss_inquire_cred.3 stable/8/lib/libgssapi/gss_inquire_cred_by_mech.3 stable/8/lib/libgssapi/gss_inquire_mechs_for_name.3 stable/8/lib/libgssapi/gss_inquire_names_for_mech.3 stable/8/lib/libgssapi/gss_process_context_token.3 stable/8/lib/libgssapi/gss_release_buffer.3 stable/8/lib/libgssapi/gss_release_cred.3 stable/8/lib/libgssapi/gss_release_name.3 stable/8/lib/libgssapi/gss_release_oid_set.3 stable/8/lib/libgssapi/gss_test_oid_set_member.3 stable/8/lib/libgssapi/gss_unwrap.3 stable/8/lib/libgssapi/gss_verify_mic.3 stable/8/lib/libgssapi/gss_wrap.3 stable/8/lib/libgssapi/gss_wrap_size_limit.3 stable/8/lib/libmemstat/libmemstat.3 stable/8/lib/libpmc/pmc.3 stable/8/lib/libpmc/pmc.atom.3 stable/8/lib/libpmc/pmc.core.3 stable/8/lib/libpmc/pmc.core2.3 stable/8/lib/libpmc/pmc.corei7.3 stable/8/lib/libpmc/pmc.corei7uc.3 stable/8/lib/libpmc/pmc.iaf.3 stable/8/lib/libpmc/pmc.k7.3 stable/8/lib/libpmc/pmc.k8.3 stable/8/lib/libpmc/pmc.p4.3 stable/8/lib/libpmc/pmc.p5.3 stable/8/lib/libpmc/pmc.p6.3 stable/8/lib/libpmc/pmc.tsc.3 stable/8/lib/libpmc/pmc.ucf.3 stable/8/lib/libpmc/pmc.westmere.3 stable/8/lib/libpmc/pmc.westmereuc.3 stable/8/lib/libpmc/pmc_allocate.3 stable/8/lib/libpmc/pmc_attach.3 stable/8/lib/libpmc/pmc_capabilities.3 stable/8/lib/libpmc/pmc_configure_logfile.3 stable/8/lib/libpmc/pmc_disable.3 stable/8/lib/libpmc/pmc_event_names_of_class.3 stable/8/lib/libpmc/pmc_get_driver_stats.3 stable/8/lib/libpmc/pmc_get_msr.3 stable/8/lib/libpmc/pmc_init.3 stable/8/lib/libpmc/pmc_name_of_capability.3 stable/8/lib/libpmc/pmc_read.3 stable/8/lib/libpmc/pmc_set.3 stable/8/lib/libpmc/pmc_start.3 stable/8/lib/libpmc/pmclog.3 stable/8/lib/libthr/libthr.3 stable/8/lib/libugidfw/bsde_get_rule.3 stable/8/lib/libugidfw/bsde_get_rule_count.3 stable/8/lib/libugidfw/bsde_parse_rule.3 stable/8/lib/libugidfw/bsde_rule_to_string.3 stable/8/lib/libugidfw/libugidfw.3 stable/8/lib/libutil/_secure_path.3 stable/8/lib/libutil/auth.3 stable/8/lib/libutil/hexdump.3 stable/8/lib/libutil/kinfo_getfile.3 stable/8/lib/libutil/kinfo_getvmmap.3 stable/8/lib/libutil/kld.3 stable/8/lib/libutil/login_auth.3 stable/8/lib/libutil/login_cap.3 stable/8/lib/libutil/login_class.3 stable/8/lib/libutil/login_ok.3 stable/8/lib/libutil/login_times.3 stable/8/lib/libutil/login_tty.3 stable/8/lib/libutil/property.3 stable/8/lib/libutil/pty.3 stable/8/lib/libutil/realhostname.3 stable/8/lib/libutil/realhostname_sa.3 stable/8/lib/libutil/trimdomain.3 stable/8/lib/libutil/uucplock.3 stable/8/sbin/iscontrol/iscsi.conf.5 stable/8/sbin/spppcontrol/spppcontrol.8 stable/8/share/man/man3/sysexits.3 stable/8/share/man/man3/tgmath.3 stable/8/share/man/man4/audit.4 stable/8/share/man/man4/auditpipe.4 stable/8/share/man/man4/coda.4 stable/8/share/man/man4/gbde.4 stable/8/share/man/man4/geom.4 stable/8/share/man/man4/geom_fox.4 stable/8/share/man/man4/geom_linux_lvm.4 stable/8/share/man/man4/geom_uzip.4 stable/8/share/man/man4/ipw.4 stable/8/share/man/man4/iscsi_initiator.4 stable/8/share/man/man4/iwi.4 stable/8/share/man/man4/iwn.4 stable/8/share/man/man4/kbdmux.4 stable/8/share/man/man4/lp.4 stable/8/share/man/man4/mac.4 stable/8/share/man/man4/mac_biba.4 stable/8/share/man/man4/mac_bsdextended.4 stable/8/share/man/man4/mac_ifoff.4 stable/8/share/man/man4/mac_lomac.4 stable/8/share/man/man4/mac_mls.4 stable/8/share/man/man4/mac_none.4 stable/8/share/man/man4/mac_partition.4 stable/8/share/man/man4/mac_seeotheruids.4 stable/8/share/man/man4/mac_stub.4 stable/8/share/man/man4/mac_test.4 stable/8/share/man/man4/ng_netflow.4 stable/8/share/man/man4/orm.4 stable/8/share/man/man4/ral.4 stable/8/share/man/man4/rp.4 stable/8/share/man/man4/rum.4 stable/8/share/man/man4/sched_4bsd.4 stable/8/share/man/man4/sched_ule.4 stable/8/share/man/man4/si.4 stable/8/share/man/man4/tap.4 stable/8/share/man/man4/textdump.4 stable/8/share/man/man4/uhso.4 stable/8/share/man/man4/upgt.4 stable/8/share/man/man4/ural.4 stable/8/share/man/man4/vkbd.4 stable/8/share/man/man4/wpi.4 stable/8/share/man/man5/ar.5 stable/8/share/man/man7/clocks.7 stable/8/share/man/man7/maclabel.7 stable/8/share/man/man8/picobsd.8 stable/8/share/man/man8/rescue.8 stable/8/share/man/man9/CTASSERT.9 stable/8/share/man/man9/DELAY.9 stable/8/share/man/man9/KASSERT.9 stable/8/share/man/man9/VFS.9 stable/8/share/man/man9/VFS_CHECKEXP.9 stable/8/share/man/man9/VFS_FHTOVP.9 stable/8/share/man/man9/VFS_MOUNT.9 stable/8/share/man/man9/VFS_QUOTACTL.9 stable/8/share/man/man9/VFS_ROOT.9 stable/8/share/man/man9/VFS_STATFS.9 stable/8/share/man/man9/VFS_SYNC.9 stable/8/share/man/man9/VFS_UNMOUNT.9 stable/8/share/man/man9/VFS_VGET.9 stable/8/share/man/man9/VOP_ACCESS.9 stable/8/share/man/man9/VOP_ACLCHECK.9 stable/8/share/man/man9/VOP_ADVLOCK.9 stable/8/share/man/man9/VOP_ATTRIB.9 stable/8/share/man/man9/VOP_BWRITE.9 stable/8/share/man/man9/VOP_CREATE.9 stable/8/share/man/man9/VOP_FSYNC.9 stable/8/share/man/man9/VOP_GETACL.9 stable/8/share/man/man9/VOP_GETEXTATTR.9 stable/8/share/man/man9/VOP_GETPAGES.9 stable/8/share/man/man9/VOP_GETVOBJECT.9 stable/8/share/man/man9/VOP_INACTIVE.9 stable/8/share/man/man9/VOP_IOCTL.9 stable/8/share/man/man9/VOP_LINK.9 stable/8/share/man/man9/VOP_LISTEXTATTR.9 stable/8/share/man/man9/VOP_LOCK.9 stable/8/share/man/man9/VOP_LOOKUP.9 stable/8/share/man/man9/VOP_OPENCLOSE.9 stable/8/share/man/man9/VOP_PATHCONF.9 stable/8/share/man/man9/VOP_PRINT.9 stable/8/share/man/man9/VOP_RDWR.9 stable/8/share/man/man9/VOP_READDIR.9 stable/8/share/man/man9/VOP_READLINK.9 stable/8/share/man/man9/VOP_REALLOCBLKS.9 stable/8/share/man/man9/VOP_REMOVE.9 stable/8/share/man/man9/VOP_RENAME.9 stable/8/share/man/man9/VOP_REVOKE.9 stable/8/share/man/man9/VOP_SETACL.9 stable/8/share/man/man9/VOP_SETEXTATTR.9 stable/8/share/man/man9/VOP_STRATEGY.9 stable/8/share/man/man9/VOP_VPTOCNP.9 stable/8/share/man/man9/VOP_VPTOFH.9 stable/8/share/man/man9/accept_filter.9 stable/8/share/man/man9/accf_data.9 stable/8/share/man/man9/accf_dns.9 stable/8/share/man/man9/accf_http.9 stable/8/share/man/man9/acl.9 stable/8/share/man/man9/atomic.9 stable/8/share/man/man9/bus_generic_new_pass.9 stable/8/share/man/man9/bus_set_pass.9 stable/8/share/man/man9/cr_cansee.9 stable/8/share/man/man9/cr_seeothergids.9 stable/8/share/man/man9/cr_seeotheruids.9 stable/8/share/man/man9/devfs_set_cdevpriv.9 stable/8/share/man/man9/devtoname.9 stable/8/share/man/man9/extattr.9 stable/8/share/man/man9/firmware.9 stable/8/share/man/man9/hexdump.9 stable/8/share/man/man9/ifnet.9 stable/8/share/man/man9/insmntque.9 stable/8/share/man/man9/make_dev.9 stable/8/share/man/man9/namei.9 stable/8/share/man/man9/p_candebug.9 stable/8/share/man/man9/p_cansee.9 stable/8/share/man/man9/pfind.9 stable/8/share/man/man9/pgfind.9 stable/8/share/man/man9/prison_check.9 stable/8/share/man/man9/random.9 stable/8/share/man/man9/rijndael.9 stable/8/share/man/man9/rtalloc.9 stable/8/share/man/man9/rtentry.9 stable/8/share/man/man9/sleep.9 stable/8/share/man/man9/spl.9 stable/8/share/man/man9/uio.9 stable/8/share/man/man9/usbdi.9 stable/8/share/man/man9/vaccess.9 stable/8/share/man/man9/vaccess_acl_nfs4.9 stable/8/share/man/man9/vaccess_acl_posix1e.9 stable/8/share/man/man9/vcount.9 stable/8/share/man/man9/vfs_mountedfrom.9 stable/8/share/man/man9/vget.9 stable/8/share/man/man9/vm_map_entry_resize_free.9 stable/8/share/man/man9/vnode.9 stable/8/share/man/man9/vput.9 stable/8/share/man/man9/vref.9 stable/8/share/man/man9/vrefcnt.9 stable/8/share/man/man9/vrele.9 stable/8/share/misc/mdoc.template stable/8/usr.bin/ar/ar.1 stable/8/usr.bin/c89/c89.1 stable/8/usr.bin/c99/c99.1 stable/8/usr.bin/column/column.1 stable/8/usr.bin/comm/comm.1 stable/8/usr.bin/enigma/enigma.1 stable/8/usr.bin/hexdump/od.1 stable/8/usr.bin/killall/killall.1 stable/8/usr.bin/lockf/lockf.1 stable/8/usr.sbin/asf/asf.8 stable/8/usr.sbin/burncd/burncd.8 stable/8/usr.sbin/ctm/ctm/ctm.1 stable/8/usr.sbin/ctm/ctm/ctm.5 stable/8/usr.sbin/devinfo/devinfo.8 stable/8/usr.sbin/fdcontrol/fdcontrol.8 stable/8/usr.sbin/fdformat/fdformat.1 stable/8/usr.sbin/fdread/fdread.1 stable/8/usr.sbin/fdwrite/fdwrite.1 stable/8/usr.sbin/fifolog/fifolog_create/fifolog.1 stable/8/usr.sbin/flowctl/flowctl.8 stable/8/usr.sbin/i2c/i2c.8 stable/8/usr.sbin/mtest/mtest.8 stable/8/usr.sbin/periodic/periodic.8 stable/8/usr.sbin/pmcannotate/pmcannotate.8 stable/8/usr.sbin/pmccontrol/pmccontrol.8 stable/8/usr.sbin/pmcstat/pmcstat.8 stable/8/usr.sbin/pppctl/pppctl.8 stable/8/usr.sbin/service/service.8 stable/8/usr.sbin/setfmac/setfsmac.8 stable/8/usr.sbin/setpmac/setpmac.8 stable/8/usr.sbin/smbmsg/smbmsg.8 stable/8/usr.sbin/uhsoctl/uhsoctl.1 Directory Properties: stable/8/bin/pwait/ (props changed) stable/8/contrib/com_err/ (props changed) stable/8/contrib/csup/ (props changed) stable/8/games/pom/ (props changed) stable/8/gnu/usr.bin/gdb/ (props changed) stable/8/gnu/usr.bin/gdb/kgdb/ (props changed) stable/8/lib/libarchive/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) stable/8/lib/libcam/ (props changed) stable/8/lib/libcompat/ (props changed) stable/8/lib/libedit/ (props changed) stable/8/lib/libelf/ (props changed) stable/8/lib/libgssapi/ (props changed) stable/8/lib/libmemstat/ (props changed) stable/8/lib/libpmc/ (props changed) stable/8/lib/libthr/ (props changed) stable/8/lib/libugidfw/ (props changed) stable/8/lib/libutil/ (props changed) stable/8/sbin/iscontrol/ (props changed) stable/8/sbin/spppcontrol/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) stable/8/share/misc/ (props changed) stable/8/usr.bin/ar/ (props changed) stable/8/usr.bin/c89/ (props changed) stable/8/usr.bin/c99/ (props changed) stable/8/usr.bin/column/ (props changed) stable/8/usr.bin/comm/ (props changed) stable/8/usr.bin/csup/ (props changed) stable/8/usr.bin/enigma/ (props changed) stable/8/usr.bin/hexdump/ (props changed) stable/8/usr.bin/killall/ (props changed) stable/8/usr.bin/lockf/ (props changed) stable/8/usr.sbin/asf/ (props changed) stable/8/usr.sbin/burncd/ (props changed) stable/8/usr.sbin/ctm/ (props changed) stable/8/usr.sbin/devinfo/ (props changed) stable/8/usr.sbin/fdcontrol/ (props changed) stable/8/usr.sbin/fdformat/ (props changed) stable/8/usr.sbin/fdread/ (props changed) stable/8/usr.sbin/fdwrite/ (props changed) stable/8/usr.sbin/fifolog/ (props changed) stable/8/usr.sbin/flowctl/ (props changed) stable/8/usr.sbin/i2c/ (props changed) stable/8/usr.sbin/mtest/ (props changed) stable/8/usr.sbin/periodic/ (props changed) stable/8/usr.sbin/pmcannotate/ (props changed) stable/8/usr.sbin/pmccontrol/ (props changed) stable/8/usr.sbin/pmcstat/ (props changed) stable/8/usr.sbin/pppctl/ (props changed) stable/8/usr.sbin/service/ (props changed) stable/8/usr.sbin/setfmac/ (props changed) stable/8/usr.sbin/setpmac/ (props changed) stable/8/usr.sbin/smbmsg/ (props changed) stable/8/usr.sbin/uhsoctl/ (props changed) Modified: stable/8/bin/pwait/pwait.1 ============================================================================== --- stable/8/bin/pwait/pwait.1 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/bin/pwait/pwait.1 Fri Aug 27 10:47:17 2010 (r211872) @@ -33,8 +33,8 @@ .\" $FreeBSD$ .\" .Dd November 1, 2009 -.Os .Dt PWAIT 1 +.Os .Sh NAME .Nm pwait .Nd wait for processes to terminate Modified: stable/8/contrib/com_err/compile_et.1 ============================================================================== --- stable/8/contrib/com_err/compile_et.1 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/contrib/com_err/compile_et.1 Fri Aug 27 10:47:17 2010 (r211872) @@ -4,8 +4,8 @@ .\" $FreeBSD$ .\" .Dd November 22, 1988 -.Os .Dt COMPILE_ET 1 +.Os .Sh NAME .Nm compile_et .Nd error table compiler Modified: stable/8/contrib/csup/csup.1 ============================================================================== --- stable/8/contrib/csup/csup.1 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/contrib/csup/csup.1 Fri Aug 27 10:47:17 2010 (r211872) @@ -25,8 +25,8 @@ .\" $FreeBSD$ .\" .Dd February 1, 2006 -.Os FreeBSD .Dt CSUP 1 +.Os FreeBSD .Sh NAME .Nm csup .Nd network distribution package for CVS repositories Modified: stable/8/games/pom/pom.6 ============================================================================== --- stable/8/games/pom/pom.6 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/games/pom/pom.6 Fri Aug 27 10:47:17 2010 (r211872) @@ -34,7 +34,7 @@ .\" .Dd July 14, 2010 .Dt POM 6 -.UC 7 +.Os .Sh NAME .Nm pom .Nd display the phase of the moon Modified: stable/8/gnu/usr.bin/gdb/kgdb/kgdb.1 ============================================================================== --- stable/8/gnu/usr.bin/gdb/kgdb/kgdb.1 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/gnu/usr.bin/gdb/kgdb/kgdb.1 Fri Aug 27 10:47:17 2010 (r211872) @@ -25,8 +25,8 @@ .\" $FreeBSD$ .\" .Dd October 11, 2006 -.Os .Dt KGDB 1 +.Os .Sh NAME .Nm kgdb .Nd "kernel debugger" Modified: stable/8/lib/libarchive/archive_entry.3 ============================================================================== --- stable/8/lib/libarchive/archive_entry.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libarchive/archive_entry.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd May 12, 2008 -.Dt archive_entry 3 +.Dt ARCHIVE_ENTRY 3 .Os .Sh NAME .Nm archive_entry_acl_add_entry , Modified: stable/8/lib/libarchive/archive_read.3 ============================================================================== --- stable/8/lib/libarchive/archive_read.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libarchive/archive_read.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd April 13, 2009 -.Dt archive_read 3 +.Dt ARCHIVE_READ 3 .Os .Sh NAME .Nm archive_read_new , Modified: stable/8/lib/libarchive/archive_read_disk.3 ============================================================================== --- stable/8/lib/libarchive/archive_read_disk.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libarchive/archive_read_disk.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd March 10, 2009 -.Dt archive_read_disk 3 +.Dt ARCHIVE_READ_DISK 3 .Os .Sh NAME .Nm archive_read_disk_new , Modified: stable/8/lib/libarchive/archive_util.3 ============================================================================== --- stable/8/lib/libarchive/archive_util.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libarchive/archive_util.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd January 8, 2005 -.Dt archive_util 3 +.Dt ARCHIVE_UTIL 3 .Os .Sh NAME .Nm archive_clear_error , Modified: stable/8/lib/libarchive/archive_write.3 ============================================================================== --- stable/8/lib/libarchive/archive_write.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libarchive/archive_write.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd May 11, 2008 -.Dt archive_write 3 +.Dt ARCHIVE_WRITE 3 .Os .Sh NAME .Nm archive_write_new , Modified: stable/8/lib/libarchive/archive_write_disk.3 ============================================================================== --- stable/8/lib/libarchive/archive_write_disk.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libarchive/archive_write_disk.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd August 5, 2008 -.Dt archive_write_disk 3 +.Dt ARCHIVE_WRITE_DISK 3 .Os .Sh NAME .Nm archive_write_disk_new , Modified: stable/8/lib/libarchive/libarchive-formats.5 ============================================================================== --- stable/8/lib/libarchive/libarchive-formats.5 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libarchive/libarchive-formats.5 Fri Aug 27 10:47:17 2010 (r211872) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd April 17, 2009 -.Dt libarchive-formats 5 +.Dt LIBARCHIVE-FORMATS 5 .Os .Sh NAME .Nm libarchive-formats Modified: stable/8/lib/libarchive/tar.5 ============================================================================== --- stable/8/lib/libarchive/tar.5 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libarchive/tar.5 Fri Aug 27 10:47:17 2010 (r211872) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd April 19, 2009 -.Dt tar 5 +.Dt TAR 5 .Os .Sh NAME .Nm tar Modified: stable/8/lib/libc/gen/check_utility_compat.3 ============================================================================== --- stable/8/lib/libc/gen/check_utility_compat.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libc/gen/check_utility_compat.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -29,8 +29,8 @@ .\" $FreeBSD$ .\" .Dd October 27, 2002 -.Os .Dt CHECK_UTILITY_COMPAT 3 +.Os .Sh NAME .Nm check_utility_compat .Nd "determine whether a utility should be compatible" Modified: stable/8/lib/libc/gen/dladdr.3 ============================================================================== --- stable/8/lib/libc/gen/dladdr.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libc/gen/dladdr.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -26,8 +26,8 @@ .\" $FreeBSD$ .\" .Dd February 5, 1998 -.Os .Dt DLADDR 3 +.Os .Sh NAME .Nm dladdr .Nd find the shared object containing a given address Modified: stable/8/lib/libc/gen/dlinfo.3 ============================================================================== --- stable/8/lib/libc/gen/dlinfo.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libc/gen/dlinfo.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -26,8 +26,8 @@ .\" $FreeBSD$ .\" .Dd February 14, 2003 -.Os .Dt DLINFO 3 +.Os .Sh NAME .Nm dlinfo .Nd information about dynamically loaded object Modified: stable/8/lib/libc/gen/dllockinit.3 ============================================================================== --- stable/8/lib/libc/gen/dllockinit.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libc/gen/dllockinit.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -26,8 +26,8 @@ .\" $FreeBSD$ .\" .Dd July 5, 2000 -.Os .Dt DLLOCKINIT 3 +.Os .Sh NAME .Nm dllockinit .Nd register thread locking methods with the dynamic linker Modified: stable/8/lib/libc/gen/dlopen.3 ============================================================================== --- stable/8/lib/libc/gen/dlopen.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libc/gen/dlopen.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -33,8 +33,8 @@ .\" $FreeBSD$ .\" .Dd July 7, 2009 -.Os .Dt DLOPEN 3 +.Os .Sh NAME .Nm dlopen , .Nm dlsym , Modified: stable/8/lib/libc/gen/fmtcheck.3 ============================================================================== --- stable/8/lib/libc/gen/fmtcheck.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libc/gen/fmtcheck.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -33,8 +33,8 @@ .\" .\" $FreeBSD$ .Dd October 16, 2002 -.Os .Dt FMTCHECK 3 +.Os .Sh NAME .Nm fmtcheck .Nd sanitizes user-supplied Modified: stable/8/lib/libc/gen/ftok.3 ============================================================================== --- stable/8/lib/libc/gen/ftok.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libc/gen/ftok.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -25,8 +25,8 @@ .\" .\" $FreeBSD$ .Dd July 9, 2009 -.Os .Dt FTOK 3 +.Os .Sh NAME .Nm ftok .Nd create IPC identifier from path name Modified: stable/8/lib/libc/gen/setproctitle.3 ============================================================================== --- stable/8/lib/libc/gen/setproctitle.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libc/gen/setproctitle.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -21,8 +21,8 @@ .\" .\" The following requests are required for all man pages. .Dd December 16, 1995 -.Os .Dt SETPROCTITLE 3 +.Os .Sh NAME .Nm setproctitle .Nd set process title Modified: stable/8/lib/libc/gen/stringlist.3 ============================================================================== --- stable/8/lib/libc/gen/stringlist.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libc/gen/stringlist.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -36,8 +36,8 @@ .\" $FreeBSD$ .\" .Dd November 28, 1999 -.Os .Dt STRINGLIST 3 +.Os .Sh NAME .Nm stringlist , .Nm sl_init , Modified: stable/8/lib/libc/posix1e/mac_prepare.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_prepare.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libc/posix1e/mac_prepare.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -31,8 +31,8 @@ .\" $FreeBSD$ .\" .Dd August 22, 2003 -.Os .Dt MAC_PREPARE 3 +.Os .Sh NAME .Nm mac_prepare , mac_prepare_type , mac_prepare_file_label , .Nm mac_prepare_ifnet_label , mac_prepare_process_label Modified: stable/8/lib/libc/stdlib/hcreate.3 ============================================================================== --- stable/8/lib/libc/stdlib/hcreate.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libc/stdlib/hcreate.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -29,8 +29,8 @@ .\" $FreeBSD$ .\" .Dd July 6, 2008 -.Os .Dt HCREATE 3 +.Os .Sh NAME .Nm hcreate , hdestroy , hsearch .Nd manage hash search table Modified: stable/8/lib/libc/stdlib/ptsname.3 ============================================================================== --- stable/8/lib/libc/stdlib/ptsname.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libc/stdlib/ptsname.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -32,8 +32,8 @@ .\" $FreeBSD$ .\" .Dd August 20, 2008 -.Os .Dt PTSNAME 3 +.Os .Sh NAME .Nm grantpt , .Nm ptsname , Modified: stable/8/lib/libcam/cam.3 ============================================================================== --- stable/8/lib/libcam/cam.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libcam/cam.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -28,8 +28,8 @@ .\" $FreeBSD$ .\" .Dd October 10, 1998 -.Os .Dt CAM 3 +.Os .Sh NAME .Nm cam_open_device , .Nm cam_open_spec_device , Modified: stable/8/lib/libcam/cam_cdbparse.3 ============================================================================== --- stable/8/lib/libcam/cam_cdbparse.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libcam/cam_cdbparse.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -62,8 +62,8 @@ .\" .\" .Dd October 13, 1998 -.Os .Dt CAM_CDBPARSE 3 +.Os .Sh NAME .Nm csio_build , .Nm csio_build_visit , Modified: stable/8/lib/libcompat/4.1/cftime.3 ============================================================================== --- stable/8/lib/libcompat/4.1/cftime.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libcompat/4.1/cftime.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -35,8 +35,8 @@ .\" $FreeBSD$ .\" .Dd June 15, 1993 -.Os .Dt CFTIME 3 +.Os .Sh NAME .Nm cftime , .Nm ascftime Modified: stable/8/lib/libcompat/4.4/cuserid.3 ============================================================================== --- stable/8/lib/libcompat/4.4/cuserid.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libcompat/4.4/cuserid.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -32,8 +32,8 @@ .\" $FreeBSD$ .\" .Dd April 10, 1995 -.Os .Dt CUSERID 3 +.Os .Sh NAME .Nm cuserid .Nd get user name associated with effective UID Modified: stable/8/lib/libedit/editline.3 ============================================================================== --- stable/8/lib/libedit/editline.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libedit/editline.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -32,8 +32,8 @@ .\" $FreeBSD$ .\" .Dd January 12, 2007 -.Os .Dt EDITLINE 3 +.Os .Sh NAME .Nm editline , .Nm el_init , Modified: stable/8/lib/libedit/editrc.5 ============================================================================== --- stable/8/lib/libedit/editrc.5 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libedit/editrc.5 Fri Aug 27 10:47:17 2010 (r211872) @@ -32,8 +32,8 @@ .\" $FreeBSD$ .\" .Dd October 18, 2003 -.Os .Dt EDITRC 5 +.Os .Sh NAME .Nm editrc .Nd configuration file for editline library Modified: stable/8/lib/libelf/elf.3 ============================================================================== --- stable/8/lib/libelf/elf.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 21, 2007 -.Os .Dt ELF 3 +.Os .Sh NAME .Nm elf .Nd API for manipulating ELF objects Modified: stable/8/lib/libelf/elf_begin.3 ============================================================================== --- stable/8/lib/libelf/elf_begin.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_begin.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 21, 2006 -.Os .Dt ELF_BEGIN 3 +.Os .Sh NAME .Nm elf_begin .Nd open an ELF file or ar(1) archive Modified: stable/8/lib/libelf/elf_cntl.3 ============================================================================== --- stable/8/lib/libelf/elf_cntl.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_cntl.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 9, 2006 -.Os .Dt ELF_CNTL 3 +.Os .Sh NAME .Nm elf_cntl .Nd control an elf file descriptor Modified: stable/8/lib/libelf/elf_end.3 ============================================================================== --- stable/8/lib/libelf/elf_end.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_end.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 29, 2006 -.Os .Dt ELF_END 3 +.Os .Sh NAME .Nm elf_end .Nd release an ELF descriptor Modified: stable/8/lib/libelf/elf_errmsg.3 ============================================================================== --- stable/8/lib/libelf/elf_errmsg.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_errmsg.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 11, 2006 -.Os .Dt ELF_ERRMSG 3 +.Os .Sh NAME .Nm elf_errmsg , .Nm elf_errno Modified: stable/8/lib/libelf/elf_fill.3 ============================================================================== --- stable/8/lib/libelf/elf_fill.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_fill.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 11, 2006 -.Os .Dt ELF_FILL 3 +.Os .Sh NAME .Nm elf_fill .Nd set fill byte for inter-section padding Modified: stable/8/lib/libelf/elf_flagdata.3 ============================================================================== --- stable/8/lib/libelf/elf_flagdata.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_flagdata.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 22, 2007 -.Os .Dt ELF_FLAGDATA 3 +.Os .Sh NAME .Nm elf_flagdata , .Nm elf_flagehdr , Modified: stable/8/lib/libelf/elf_getarhdr.3 ============================================================================== --- stable/8/lib/libelf/elf_getarhdr.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_getarhdr.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 15, 2006 -.Os .Dt ELF_GETARHDR 3 +.Os .Sh NAME .Nm elf_getarhdr .Nd retrieve ar(1) header for an archive member Modified: stable/8/lib/libelf/elf_getarsym.3 ============================================================================== --- stable/8/lib/libelf/elf_getarsym.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_getarsym.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 15, 2006 -.Os .Dt ELF_GETARSYM 3 +.Os .Sh NAME .Nm elf_getarsym .Nd retrieve the symbol table of an archive Modified: stable/8/lib/libelf/elf_getbase.3 ============================================================================== --- stable/8/lib/libelf/elf_getbase.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_getbase.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 6, 2010 -.Os .Dt ELF_GETBASE 3 +.Os .Sh NAME .Nm elf_getbase .Nd get the base offset for an object file Modified: stable/8/lib/libelf/elf_getdata.3 ============================================================================== --- stable/8/lib/libelf/elf_getdata.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_getdata.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 26, 2006 -.Os .Dt ELF_GETDATA 3 +.Os .Sh NAME .Nm elf_getdata , .Nm elf_newdata , Modified: stable/8/lib/libelf/elf_getident.3 ============================================================================== --- stable/8/lib/libelf/elf_getident.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_getident.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd July 3, 2006 -.Os .Dt ELF_GETIDENT 3 +.Os .Sh NAME .Nm elf_getident .Nd return the initial bytes of a file Modified: stable/8/lib/libelf/elf_getphnum.3 ============================================================================== --- stable/8/lib/libelf/elf_getphnum.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_getphnum.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd December 16, 2006 -.Os .Dt ELF_GETPHNUM 3 +.Os .Sh NAME .Nm elf_getphnum .Nd return the number of program headers in an ELF file Modified: stable/8/lib/libelf/elf_getscn.3 ============================================================================== --- stable/8/lib/libelf/elf_getscn.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_getscn.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 22, 2007 -.Os .Dt ELF_GETSCN 3 +.Os .Sh NAME .Nm elf_getscn , .Nm elf_ndxscn , Modified: stable/8/lib/libelf/elf_getshnum.3 ============================================================================== --- stable/8/lib/libelf/elf_getshnum.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_getshnum.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 31, 2006 -.Os .Dt ELF_GETSHNUM 3 +.Os .Sh NAME .Nm elf_getshnum .Nd return the number of sections in an ELF file Modified: stable/8/lib/libelf/elf_getshstrndx.3 ============================================================================== --- stable/8/lib/libelf/elf_getshstrndx.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_getshstrndx.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 31, 2006 -.Os .Dt ELF_GETSHSTRNDX 3 +.Os .Sh NAME .Nm elf_getshstrndx , .Nm elf_setshstrndx Modified: stable/8/lib/libelf/elf_hash.3 ============================================================================== --- stable/8/lib/libelf/elf_hash.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_hash.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 15, 2006 -.Os .Dt ELF_HASH 3 +.Os .Sh NAME .Nm elf_hash .Nd compute a hash value for a string Modified: stable/8/lib/libelf/elf_kind.3 ============================================================================== --- stable/8/lib/libelf/elf_kind.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_kind.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 1, 2006 -.Os .Dt ELF_KIND 3 +.Os .Sh NAME .Nm elf_kind .Nd determine ELF file type Modified: stable/8/lib/libelf/elf_memory.3 ============================================================================== --- stable/8/lib/libelf/elf_memory.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_memory.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 28, 2006 -.Os .Dt ELF_MEMORY 3 +.Os .Sh NAME .Nm elf_memory .Nd process an ELF or ar(1) archive mapped into memory Modified: stable/8/lib/libelf/elf_next.3 ============================================================================== --- stable/8/lib/libelf/elf_next.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_next.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 17, 2006 -.Os .Dt ELF_NEXT 3 +.Os .Sh NAME .Nm elf_next .Nd provide sequential access to the next archive member Modified: stable/8/lib/libelf/elf_rand.3 ============================================================================== --- stable/8/lib/libelf/elf_rand.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_rand.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 17, 2006 -.Os .Dt ELF_RAND 3 +.Os .Sh NAME .Nm elf_rand .Nd provide sequential access to the next archive member Modified: stable/8/lib/libelf/elf_rawfile.3 ============================================================================== --- stable/8/lib/libelf/elf_rawfile.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_rawfile.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd July 3, 2006 -.Os .Dt ELF_RAWFILE 3 +.Os .Sh NAME .Nm elf_rawfile .Nd return uninterpreted contents of an ELF file Modified: stable/8/lib/libelf/elf_strptr.3 ============================================================================== --- stable/8/lib/libelf/elf_strptr.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_strptr.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd December 16, 2006 -.Os .Dt ELF_STRPTR 3 +.Os .Sh NAME .Nm elf_strptr .Nd retrieve a string pointer in a string table Modified: stable/8/lib/libelf/elf_update.3 ============================================================================== --- stable/8/lib/libelf/elf_update.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_update.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd March 19, 2008 -.Os .Dt ELF_UPDATE 3 +.Os .Sh NAME .Nm elf_update .Nd update an ELF descriptor Modified: stable/8/lib/libelf/elf_version.3 ============================================================================== --- stable/8/lib/libelf/elf_version.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/elf_version.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd June 1, 2006 -.Os .Dt ELF_VERSION 3 +.Os .Sh NAME .Nm elf_version .Nd retrieve or set ELF library operating version Modified: stable/8/lib/libelf/gelf.3 ============================================================================== --- stable/8/lib/libelf/gelf.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd September 1, 2006 -.Os .Dt GELF 3 +.Os .Sh NAME .Nm GElf .Nd class-independent API for ELF manipulation Modified: stable/8/lib/libelf/gelf_checksum.3 ============================================================================== --- stable/8/lib/libelf/gelf_checksum.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_checksum.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_CHECKSUM 3 +.Os .Sh NAME .Nm elf32_checksum , .Nm elf64_checksum , Modified: stable/8/lib/libelf/gelf_fsize.3 ============================================================================== --- stable/8/lib/libelf/gelf_fsize.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_fsize.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd February 5, 2008 -.Os .Dt GELF_FSIZE 3 +.Os .Sh NAME .Nm gelf_fsize , .Nm elf32_fsize , Modified: stable/8/lib/libelf/gelf_getcap.3 ============================================================================== --- stable/8/lib/libelf/gelf_getcap.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_getcap.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETCAP 3 +.Os .Sh NAME .Nm gelf_getcap , .Nm gelf_update_cap Modified: stable/8/lib/libelf/gelf_getclass.3 ============================================================================== --- stable/8/lib/libelf/gelf_getclass.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_getclass.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd July 3, 2006 -.Os .Dt GELF_GETCLASS 3 +.Os .Sh NAME .Nm gelf_getclass .Nd retrieve the class of an ELF descriptor Modified: stable/8/lib/libelf/gelf_getdyn.3 ============================================================================== --- stable/8/lib/libelf/gelf_getdyn.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_getdyn.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETDYN 3 +.Os .Sh NAME .Nm gelf_getdyn , .Nm gelf_update_dyn Modified: stable/8/lib/libelf/gelf_getehdr.3 ============================================================================== --- stable/8/lib/libelf/gelf_getehdr.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_getehdr.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd December 16, 2006 -.Os .Dt GELF_GETEHDR 3 +.Os .Sh NAME .Nm elf32_getehdr , .Nm elf64_getehdr , Modified: stable/8/lib/libelf/gelf_getmove.3 ============================================================================== --- stable/8/lib/libelf/gelf_getmove.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_getmove.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETMOVE 3 +.Os .Sh NAME .Nm gelf_getmove , .Nm gelf_update_move Modified: stable/8/lib/libelf/gelf_getphdr.3 ============================================================================== --- stable/8/lib/libelf/gelf_getphdr.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_getphdr.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 21, 2007 -.Os .Dt GELF_GETPHDR 3 +.Os .Sh NAME .Nm elf32_getphdr , .Nm elf64_getphdr , Modified: stable/8/lib/libelf/gelf_getrel.3 ============================================================================== --- stable/8/lib/libelf/gelf_getrel.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_getrel.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETREL 3 +.Os .Sh NAME .Nm gelf_getrel , .Nm gelf_update_rel Modified: stable/8/lib/libelf/gelf_getrela.3 ============================================================================== --- stable/8/lib/libelf/gelf_getrela.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_getrela.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETRELA 3 +.Os .Sh NAME .Nm gelf_getrela , .Nm gelf_update_rela Modified: stable/8/lib/libelf/gelf_getshdr.3 ============================================================================== --- stable/8/lib/libelf/gelf_getshdr.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_getshdr.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 27, 2006 -.Os .Dt GELF_GETSHDR 3 +.Os .Sh NAME .Nm elf32_getshdr , .Nm elf64_getshdr , Modified: stable/8/lib/libelf/gelf_getsym.3 ============================================================================== --- stable/8/lib/libelf/gelf_getsym.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_getsym.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETSYM 3 +.Os .Sh NAME .Nm gelf_getsym , .Nm gelf_update_sym Modified: stable/8/lib/libelf/gelf_getsyminfo.3 ============================================================================== --- stable/8/lib/libelf/gelf_getsyminfo.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_getsyminfo.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 29, 2006 -.Os .Dt GELF_GETSYMINFO 3 +.Os .Sh NAME .Nm gelf_getsyminfo , .Nm gelf_update_syminfo Modified: stable/8/lib/libelf/gelf_getsymshndx.3 ============================================================================== --- stable/8/lib/libelf/gelf_getsymshndx.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_getsymshndx.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd November 5, 2006 -.Os .Dt GELF_GETSYMSHNDX 3 +.Os .Sh NAME .Nm gelf_getsymshndx , .Nm gelf_update_symshndx Modified: stable/8/lib/libelf/gelf_newehdr.3 ============================================================================== --- stable/8/lib/libelf/gelf_newehdr.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_newehdr.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 22, 2007 -.Os .Dt GELF_NEWEHDR 3 +.Os .Sh NAME .Nm elf32_newehdr , .Nm elf64_newehdr , Modified: stable/8/lib/libelf/gelf_newphdr.3 ============================================================================== --- stable/8/lib/libelf/gelf_newphdr.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_newphdr.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd October 22, 2007 -.Os .Dt GELF_NEWPHDR 3 +.Os .Sh NAME .Nm elf32_newphdr , .Nm elf64_newphdr , Modified: stable/8/lib/libelf/gelf_update_ehdr.3 ============================================================================== --- stable/8/lib/libelf/gelf_update_ehdr.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_update_ehdr.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd August 27, 2006 -.Os .Dt GELF_UPDATE_EHDR 3 +.Os .Sh NAME .Nm gelf_update_ehdr , .Nm gelf_update_phdr , Modified: stable/8/lib/libelf/gelf_xlatetof.3 ============================================================================== --- stable/8/lib/libelf/gelf_xlatetof.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libelf/gelf_xlatetof.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -24,8 +24,8 @@ .\" $FreeBSD$ .\" .Dd July 24, 2006 -.Os .Dt GELF_XLATETOF 3 +.Os .Sh NAME .Nm elf32_xlate , .Nm elf64_xlate , Modified: stable/8/lib/libgssapi/gss_accept_sec_context.3 ============================================================================== --- stable/8/lib/libgssapi/gss_accept_sec_context.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libgssapi/gss_accept_sec_context.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_ACCEPT_SEC_CONTEXT 3 PRM +.Os .Sh NAME .Nm gss_accept_sec_context .Nd Accept a security context initiated by a peer application Modified: stable/8/lib/libgssapi/gss_acquire_cred.3 ============================================================================== --- stable/8/lib/libgssapi/gss_acquire_cred.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libgssapi/gss_acquire_cred.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_ACQUIRE_CRED 3 PRM +.Os .Sh NAME .Nm gss_acquire_cred .Nd Obtain a GSS-API credential handle for pre-existing credentials Modified: stable/8/lib/libgssapi/gss_add_cred.3 ============================================================================== --- stable/8/lib/libgssapi/gss_add_cred.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libgssapi/gss_add_cred.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_ADD_CRED 3 PRM +.Os .Sh NAME .Nm gss_add_cred .Nd Construct credentials incrementally Modified: stable/8/lib/libgssapi/gss_add_oid_set_member.3 ============================================================================== --- stable/8/lib/libgssapi/gss_add_oid_set_member.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libgssapi/gss_add_oid_set_member.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_ADD_OID_SET_MEMBER 3 PRM +.Os .Sh NAME .Nm gss_add_oid_set_member .Nd Add an object identifier to a set Modified: stable/8/lib/libgssapi/gss_canonicalize_name.3 ============================================================================== --- stable/8/lib/libgssapi/gss_canonicalize_name.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libgssapi/gss_canonicalize_name.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_CANONICALIZE_NAME 3 PRM +.Os .Sh NAME .Nm gss_canonicalize_name .Nd Convert an internal name to an MN Modified: stable/8/lib/libgssapi/gss_compare_name.3 ============================================================================== --- stable/8/lib/libgssapi/gss_compare_name.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libgssapi/gss_compare_name.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 +.Dt GSS_COMPARE_NAME 3 PRM .Os -.Dt GSS_COMPARE_NAME PRM .Sh NAME .Nm gss_compare_name .Nd Compare two internal-form names Modified: stable/8/lib/libgssapi/gss_context_time.3 ============================================================================== --- stable/8/lib/libgssapi/gss_context_time.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libgssapi/gss_context_time.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_CONTEXT_TIME 3 PRM +.Os .Sh NAME .Nm gss_context_time .Nd Determine for how long a context will remain valid Modified: stable/8/lib/libgssapi/gss_create_empty_oid_set.3 ============================================================================== --- stable/8/lib/libgssapi/gss_create_empty_oid_set.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libgssapi/gss_create_empty_oid_set.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_CREATE_EMPTY_OID_SET 3 PRM +.Os .Sh NAME .Nm gss_create_empty_oid_set .Nd Create a set containing no object identifiers Modified: stable/8/lib/libgssapi/gss_delete_sec_context.3 ============================================================================== --- stable/8/lib/libgssapi/gss_delete_sec_context.3 Fri Aug 27 10:16:32 2010 (r211871) +++ stable/8/lib/libgssapi/gss_delete_sec_context.3 Fri Aug 27 10:47:17 2010 (r211872) @@ -28,8 +28,8 @@ .\" .\" The following commands are required for all man pages. .Dd January 26, 2010 -.Os .Dt GSS_DELETE_SEC_CONTEXT 3 PRM +.Os .Sh NAME .Nm gss_delete_sec_context .Nd Discard a security context Modified: stable/8/lib/libgssapi/gss_display_name.3 ============================================================================== --- stable/8/lib/libgssapi/gss_display_name.3 Fri Aug 27 10:16:32 2010 (r211871) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 18:50:12 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C9BE106566B; Fri, 27 Aug 2010 18:50:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 705558FC14; Fri, 27 Aug 2010 18:50:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7RIoCW5003705; Fri, 27 Aug 2010 18:50:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7RIoCnl003700; Fri, 27 Aug 2010 18:50:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201008271850.o7RIoCnl003700@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Aug 2010 18:50:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211889 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 18:50:12 -0000 Author: jhb Date: Fri Aug 27 18:50:12 2010 New Revision: 211889 URL: http://svn.freebsd.org/changeset/base/211889 Log: MFC 211433: Ensure a minimum "slop" of 10 extra pcb structures when providing a memory size estimate to userland for pcb list sysctls. The previous behavior of a "slop" of n/8 does not work well for small values of n (e.g. no slop at all if you have less than 8 open UDP connections). Modified: stable/8/sys/netinet/ip_divert.c stable/8/sys/netinet/raw_ip.c stable/8/sys/netinet/tcp_subr.c stable/8/sys/netinet/udp_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/ip_divert.c ============================================================================== --- stable/8/sys/netinet/ip_divert.c Fri Aug 27 18:17:46 2010 (r211888) +++ stable/8/sys/netinet/ip_divert.c Fri Aug 27 18:50:12 2010 (r211889) @@ -614,8 +614,8 @@ div_pcblist(SYSCTL_HANDLER_ARGS) */ if (req->oldptr == 0) { n = V_divcbinfo.ipi_count; - req->oldidx = 2 * (sizeof xig) - + (n + n/8) * sizeof(struct xinpcb); + n += imax(n / 8, 10); + req->oldidx = 2 * (sizeof xig) + n * sizeof(struct xinpcb); return 0; } Modified: stable/8/sys/netinet/raw_ip.c ============================================================================== --- stable/8/sys/netinet/raw_ip.c Fri Aug 27 18:17:46 2010 (r211888) +++ stable/8/sys/netinet/raw_ip.c Fri Aug 27 18:50:12 2010 (r211889) @@ -1007,8 +1007,8 @@ rip_pcblist(SYSCTL_HANDLER_ARGS) */ if (req->oldptr == 0) { n = V_ripcbinfo.ipi_count; - req->oldidx = 2 * (sizeof xig) - + (n + n/8) * sizeof(struct xinpcb); + n += imax(n / 8, 10); + req->oldidx = 2 * (sizeof xig) + n * sizeof(struct xinpcb); return (0); } Modified: stable/8/sys/netinet/tcp_subr.c ============================================================================== --- stable/8/sys/netinet/tcp_subr.c Fri Aug 27 18:17:46 2010 (r211888) +++ stable/8/sys/netinet/tcp_subr.c Fri Aug 27 18:50:12 2010 (r211889) @@ -1018,8 +1018,9 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (req->oldptr == NULL) { m = syncache_pcbcount(); n = V_tcbinfo.ipi_count; - req->oldidx = 2 * (sizeof xig) - + ((m + n) + n/8) * sizeof(struct xtcpcb); + n += imax(n / 8, 10); + req->oldidx = 2 * (sizeof xig) + + (m + n) * sizeof(struct xtcpcb); return (0); } Modified: stable/8/sys/netinet/udp_usrreq.c ============================================================================== --- stable/8/sys/netinet/udp_usrreq.c Fri Aug 27 18:17:46 2010 (r211888) +++ stable/8/sys/netinet/udp_usrreq.c Fri Aug 27 18:50:12 2010 (r211889) @@ -727,8 +727,8 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) */ if (req->oldptr == 0) { n = V_udbinfo.ipi_count; - req->oldidx = 2 * (sizeof xig) - + (n + n/8) * sizeof(struct xinpcb); + n += imax(n / 8, 10); + req->oldidx = 2 * (sizeof xig) + n * sizeof(struct xinpcb); return (0); } From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 18:50:33 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 219CA10656A8; Fri, 27 Aug 2010 18:50:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 056128FC12; Fri, 27 Aug 2010 18:50:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7RIoWi2003750; Fri, 27 Aug 2010 18:50:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7RIoWov003745; Fri, 27 Aug 2010 18:50:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201008271850.o7RIoWov003745@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Aug 2010 18:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211890 - stable/7/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 18:50:33 -0000 Author: jhb Date: Fri Aug 27 18:50:32 2010 New Revision: 211890 URL: http://svn.freebsd.org/changeset/base/211890 Log: MFC 211433: Ensure a minimum "slop" of 10 extra pcb structures when providing a memory size estimate to userland for pcb list sysctls. The previous behavior of a "slop" of n/8 does not work well for small values of n (e.g. no slop at all if you have less than 8 open UDP connections). Modified: stable/7/sys/netinet/ip_divert.c stable/7/sys/netinet/raw_ip.c stable/7/sys/netinet/tcp_subr.c stable/7/sys/netinet/udp_usrreq.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/ip_divert.c ============================================================================== --- stable/7/sys/netinet/ip_divert.c Fri Aug 27 18:50:12 2010 (r211889) +++ stable/7/sys/netinet/ip_divert.c Fri Aug 27 18:50:32 2010 (r211890) @@ -579,8 +579,8 @@ div_pcblist(SYSCTL_HANDLER_ARGS) */ if (req->oldptr == 0) { n = divcbinfo.ipi_count; - req->oldidx = 2 * (sizeof xig) - + (n + n/8) * sizeof(struct xinpcb); + n += imax(n / 8, 10); + req->oldidx = 2 * (sizeof xig) + n * sizeof(struct xinpcb); return 0; } Modified: stable/7/sys/netinet/raw_ip.c ============================================================================== --- stable/7/sys/netinet/raw_ip.c Fri Aug 27 18:50:12 2010 (r211889) +++ stable/7/sys/netinet/raw_ip.c Fri Aug 27 18:50:32 2010 (r211890) @@ -894,8 +894,8 @@ rip_pcblist(SYSCTL_HANDLER_ARGS) */ if (req->oldptr == 0) { n = ripcbinfo.ipi_count; - req->oldidx = 2 * (sizeof xig) - + (n + n/8) * sizeof(struct xinpcb); + n += imax(n / 8, 10); + req->oldidx = 2 * (sizeof xig) + n * sizeof(struct xinpcb); return (0); } Modified: stable/7/sys/netinet/tcp_subr.c ============================================================================== --- stable/7/sys/netinet/tcp_subr.c Fri Aug 27 18:50:12 2010 (r211889) +++ stable/7/sys/netinet/tcp_subr.c Fri Aug 27 18:50:32 2010 (r211890) @@ -939,8 +939,9 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (req->oldptr == NULL) { m = syncache_pcbcount(); n = tcbinfo.ipi_count; - req->oldidx = 2 * (sizeof xig) - + ((m + n) + n/8) * sizeof(struct xtcpcb); + n += imax(n / 8, 10); + req->oldidx = 2 * (sizeof xig) + + (m + n) * sizeof(struct xtcpcb); return (0); } Modified: stable/7/sys/netinet/udp_usrreq.c ============================================================================== --- stable/7/sys/netinet/udp_usrreq.c Fri Aug 27 18:50:12 2010 (r211889) +++ stable/7/sys/netinet/udp_usrreq.c Fri Aug 27 18:50:32 2010 (r211890) @@ -684,8 +684,8 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) */ if (req->oldptr == 0) { n = udbinfo.ipi_count; - req->oldidx = 2 * (sizeof xig) - + (n + n/8) * sizeof(struct xinpcb); + n += imax(n / 8, 10); + req->oldidx = 2 * (sizeof xig) + n * sizeof(struct xinpcb); return (0); } From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 18:55:24 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A925F1065695; Fri, 27 Aug 2010 18:55:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9740A8FC1C; Fri, 27 Aug 2010 18:55:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7RItOWA003932; Fri, 27 Aug 2010 18:55:24 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7RItOYk003928; Fri, 27 Aug 2010 18:55:24 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201008271855.o7RItOYk003928@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Aug 2010 18:55:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211891 - in stable/8/sys: amd64/amd64 i386/i386 kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 18:55:24 -0000 Author: jhb Date: Fri Aug 27 18:55:24 2010 New Revision: 211891 URL: http://svn.freebsd.org/changeset/base/211891 Log: MFC 210774,210935: - Tweak the logic to disable CLFLUSH in virtual environments to work around problems with flushing the local APIC register range so that it checks vm_guest directly. - Add Xen to the list of virtual vendors. In the non PV (HVM) case this fixes the virtualization detection successfully disabling the CLFLUSH instruction. Modified: stable/8/sys/amd64/amd64/initcpu.c stable/8/sys/i386/i386/initcpu.c stable/8/sys/kern/subr_param.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/8/sys/amd64/amd64/initcpu.c Fri Aug 27 18:50:32 2010 (r211890) +++ stable/8/sys/amd64/amd64/initcpu.c Fri Aug 27 18:55:24 2010 (r211891) @@ -177,17 +177,17 @@ initializecpucache() if ((cpu_feature & CPUID_CLFSH) != 0) cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8; /* - * XXXKIB: (temporary) hack to work around traps generated when - * CLFLUSHing APIC registers window. + * XXXKIB: (temporary) hack to work around traps generated + * when CLFLUSHing APIC register window under virtualization + * environments. These environments tend to disable the + * CPUID_SS feature even though the native CPU supports it. */ TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable); - if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) && - hw_clflush_disable == -1) + if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) cpu_feature &= ~CPUID_CLFSH; /* * Allow to disable CLFLUSH feature manually by - * hw.clflush_disable tunable. This may help Xen guest on some AMD - * CPUs. + * hw.clflush_disable tunable. */ if (hw_clflush_disable == 1) cpu_feature &= ~CPUID_CLFSH; Modified: stable/8/sys/i386/i386/initcpu.c ============================================================================== --- stable/8/sys/i386/i386/initcpu.c Fri Aug 27 18:50:32 2010 (r211890) +++ stable/8/sys/i386/i386/initcpu.c Fri Aug 27 18:55:24 2010 (r211891) @@ -724,17 +724,17 @@ initializecpu(void) if ((cpu_feature & CPUID_CLFSH) != 0) cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8; /* - * XXXKIB: (temporary) hack to work around traps generated when - * CLFLUSHing APIC registers window. + * XXXKIB: (temporary) hack to work around traps generated + * when CLFLUSHing APIC register window under virtualization + * environments. These environments tend to disable the + * CPUID_SS feature even though the native CPU supports it. */ TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable); - if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) && - hw_clflush_disable == -1) + if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) cpu_feature &= ~CPUID_CLFSH; /* * Allow to disable CLFLUSH feature manually by - * hw.clflush_disable tunable. This may help Xen guest on some AMD - * CPUs. + * hw.clflush_disable tunable. */ if (hw_clflush_disable == 1) cpu_feature &= ~CPUID_CLFSH; Modified: stable/8/sys/kern/subr_param.c ============================================================================== --- stable/8/sys/kern/subr_param.c Fri Aug 27 18:50:32 2010 (r211890) +++ stable/8/sys/kern/subr_param.c Fri Aug 27 18:55:24 2010 (r211891) @@ -149,6 +149,7 @@ static const char *const vm_bnames[] = { "QEMU", /* QEMU */ "Plex86", /* Plex86 */ "Bochs", /* Bochs */ + "Xen", /* Xen */ NULL }; From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 18:55:48 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C320910656A3; Fri, 27 Aug 2010 18:55:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B14418FC08; Fri, 27 Aug 2010 18:55:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7RItmnW003976; Fri, 27 Aug 2010 18:55:48 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7RItmVS003972; Fri, 27 Aug 2010 18:55:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201008271855.o7RItmVS003972@svn.freebsd.org> From: John Baldwin Date: Fri, 27 Aug 2010 18:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211892 - in stable/7/sys: amd64/amd64 i386/i386 kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 18:55:49 -0000 Author: jhb Date: Fri Aug 27 18:55:48 2010 New Revision: 211892 URL: http://svn.freebsd.org/changeset/base/211892 Log: MFC 210774,210935: - Tweak the logic to disable CLFLUSH in virtual environments to work around problems with flushing the local APIC register range so that it checks vm_guest directly. - Add Xen to the list of virtual vendors. In the non PV (HVM) case this fixes the virtualization detection successfully disabling the CLFLUSH instruction. Modified: stable/7/sys/amd64/amd64/initcpu.c stable/7/sys/i386/i386/initcpu.c stable/7/sys/kern/subr_param.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/7/sys/amd64/amd64/initcpu.c Fri Aug 27 18:55:24 2010 (r211891) +++ stable/7/sys/amd64/amd64/initcpu.c Fri Aug 27 18:55:48 2010 (r211892) @@ -177,17 +177,17 @@ initializecpucache() if ((cpu_feature & CPUID_CLFSH) != 0) cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8; /* - * XXXKIB: (temporary) hack to work around traps generated when - * CLFLUSHing APIC registers window. + * XXXKIB: (temporary) hack to work around traps generated + * when CLFLUSHing APIC register window under virtualization + * environments. These environments tend to disable the + * CPUID_SS feature even though the native CPU supports it. */ TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable); - if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) && - hw_clflush_disable == -1) + if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) cpu_feature &= ~CPUID_CLFSH; /* * Allow to disable CLFLUSH feature manually by - * hw.clflush_disable tunable. This may help Xen guest on some AMD - * CPUs. + * hw.clflush_disable tunable. */ if (hw_clflush_disable == 1) cpu_feature &= ~CPUID_CLFSH; Modified: stable/7/sys/i386/i386/initcpu.c ============================================================================== --- stable/7/sys/i386/i386/initcpu.c Fri Aug 27 18:55:24 2010 (r211891) +++ stable/7/sys/i386/i386/initcpu.c Fri Aug 27 18:55:48 2010 (r211892) @@ -724,17 +724,17 @@ initializecpu(void) if ((cpu_feature & CPUID_CLFSH) != 0) cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8; /* - * XXXKIB: (temporary) hack to work around traps generated when - * CLFLUSHing APIC registers window. + * XXXKIB: (temporary) hack to work around traps generated + * when CLFLUSHing APIC register window under virtualization + * environments. These environments tend to disable the + * CPUID_SS feature even though the native CPU supports it. */ TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable); - if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) && - hw_clflush_disable == -1) + if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) cpu_feature &= ~CPUID_CLFSH; /* * Allow to disable CLFLUSH feature manually by - * hw.clflush_disable tunable. This may help Xen guest on some AMD - * CPUs. + * hw.clflush_disable tunable. */ if (hw_clflush_disable == 1) cpu_feature &= ~CPUID_CLFSH; Modified: stable/7/sys/kern/subr_param.c ============================================================================== --- stable/7/sys/kern/subr_param.c Fri Aug 27 18:55:24 2010 (r211891) +++ stable/7/sys/kern/subr_param.c Fri Aug 27 18:55:48 2010 (r211892) @@ -145,6 +145,7 @@ static const char *const vm_bnames[] = { "QEMU", /* QEMU */ "Plex86", /* Plex86 */ "Bochs", /* Bochs */ + "Xen", /* Xen */ NULL }; From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 21:52:05 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4E171065696; Fri, 27 Aug 2010 21:52:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B432D8FC12; Fri, 27 Aug 2010 21:52:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7RLq5RD008686; Fri, 27 Aug 2010 21:52:05 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7RLq5jo008684; Fri, 27 Aug 2010 21:52:05 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201008272152.o7RLq5jo008684@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 27 Aug 2010 21:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211901 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 21:52:05 -0000 Author: bz Date: Fri Aug 27 21:52:05 2010 New Revision: 211901 URL: http://svn.freebsd.org/changeset/base/211901 Log: MFC r211451: When calculating the expected memory size for userspace, also take the number of syncache entries into account for the surplus we add to account for a possible increase of records in the re-entry window. Discussed with: jhb, silby Modified: stable/8/sys/netinet/tcp_subr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/netinet/tcp_subr.c ============================================================================== --- stable/8/sys/netinet/tcp_subr.c Fri Aug 27 21:31:15 2010 (r211900) +++ stable/8/sys/netinet/tcp_subr.c Fri Aug 27 21:52:05 2010 (r211901) @@ -1018,7 +1018,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (req->oldptr == NULL) { m = syncache_pcbcount(); n = V_tcbinfo.ipi_count; - n += imax(n / 8, 10); + n += imax((m + n) / 8, 10); req->oldidx = 2 * (sizeof xig) + (m + n) * sizeof(struct xtcpcb); return (0); From owner-svn-src-stable@FreeBSD.ORG Fri Aug 27 21:52:55 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2CB910656B3; Fri, 27 Aug 2010 21:52:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E26EA8FC21; Fri, 27 Aug 2010 21:52:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7RLqsGE008771; Fri, 27 Aug 2010 21:52:54 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7RLqsfX008769; Fri, 27 Aug 2010 21:52:54 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201008272152.o7RLqsfX008769@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 27 Aug 2010 21:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211903 - stable/7/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 21:52:55 -0000 Author: bz Date: Fri Aug 27 21:52:54 2010 New Revision: 211903 URL: http://svn.freebsd.org/changeset/base/211903 Log: MFC r211451: When calculating the expected memory size for userspace, also take the number of syncache entries into account for the surplus we add to account for a possible increase of records in the re-entry window. Discussed with: jhb, silby Modified: stable/7/sys/netinet/tcp_subr.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/netinet/tcp_subr.c ============================================================================== --- stable/7/sys/netinet/tcp_subr.c Fri Aug 27 21:52:27 2010 (r211902) +++ stable/7/sys/netinet/tcp_subr.c Fri Aug 27 21:52:54 2010 (r211903) @@ -939,7 +939,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (req->oldptr == NULL) { m = syncache_pcbcount(); n = tcbinfo.ipi_count; - n += imax(n / 8, 10); + n += imax((m + n) / 8, 10); req->oldidx = 2 * (sizeof xig) + (m + n) * sizeof(struct xtcpcb); return (0); From owner-svn-src-stable@FreeBSD.ORG Sat Aug 28 00:27:48 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C6041065693; Sat, 28 Aug 2010 00:27:48 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B24D8FC17; Sat, 28 Aug 2010 00:27:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7S0Rm9N012668; Sat, 28 Aug 2010 00:27:48 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7S0Rmfv012666; Sat, 28 Aug 2010 00:27:48 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201008280027.o7S0Rmfv012666@svn.freebsd.org> From: Kirk McKusick Date: Sat, 28 Aug 2010 00:27:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211911 - stable/8/sbin/fsck_ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 00:27:48 -0000 Author: mckusick Date: Sat Aug 28 00:27:47 2010 New Revision: 211911 URL: http://svn.freebsd.org/changeset/base/211911 Log: MFC of -r210382 to note that foreground fsck should be run after a filesystem related panic. Also -r210933 and -r211397 by joel to fix typos and spelling mistakes. Modified: stable/8/sbin/fsck_ffs/fsck_ffs.8 Modified: stable/8/sbin/fsck_ffs/fsck_ffs.8 ============================================================================== --- stable/8/sbin/fsck_ffs/fsck_ffs.8 Sat Aug 28 00:23:13 2010 (r211910) +++ stable/8/sbin/fsck_ffs/fsck_ffs.8 Sat Aug 28 00:27:47 2010 (r211911) @@ -176,10 +176,10 @@ the super block for the file system. An alternate super block is usually located at block 32 for UFS1, and block 160 for UFS2. .It Fl C -Check if file system was dismouted cleanly. +Check if file system was dismounted cleanly. If so, skip file system checks (like "preen"). However, if the file system was not cleanly dismounted, do full checks, -is if +as if .Nm was invoked without .Fl C . @@ -315,6 +315,15 @@ If the .Pa lost+found directory does not exist, it is created. If there is insufficient space its size is increased. +.Pp +The full foreground +.Nm +checks for many more problems that may occur after an +unrecoverable disk write error. +Thus, it is recommended that you perform foreground +.Nm +on your systems periodically and whenever you encounter +unrecoverable disk write errors or file-system\-related panics. .Sh FILES .Bl -tag -width /etc/fstab -compact .It Pa /etc/fstab From owner-svn-src-stable@FreeBSD.ORG Sat Aug 28 00:30:57 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 662191065698; Sat, 28 Aug 2010 00:30:57 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 553AE8FC08; Sat, 28 Aug 2010 00:30:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7S0UvWN012792; Sat, 28 Aug 2010 00:30:57 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7S0UvRh012790; Sat, 28 Aug 2010 00:30:57 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201008280030.o7S0UvRh012790@svn.freebsd.org> From: Kirk McKusick Date: Sat, 28 Aug 2010 00:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211912 - stable/8/sbin/fsck X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 00:30:57 -0000 Author: mckusick Date: Sat Aug 28 00:30:57 2010 New Revision: 211912 URL: http://svn.freebsd.org/changeset/base/211912 Log: MFC of -r210382 to note that foreground fsck should be run after a filesystem related panic. Also -r210933 by joel to fix typos and spelling mistakes. Modified: stable/8/sbin/fsck/fsck.8 Modified: stable/8/sbin/fsck/fsck.8 ============================================================================== --- stable/8/sbin/fsck/fsck.8 Sat Aug 28 00:27:47 2010 (r211911) +++ stable/8/sbin/fsck/fsck.8 Sat Aug 28 00:30:57 2010 (r211912) @@ -169,6 +169,17 @@ so the check program is invoked with the flag to indicate that a check on the active file system should be done. When running in background mode, only one file system at a time will be checked. +Note that background +.Nm +is limited to checking for only the most commonly occurring +file system abnormalities. +Under certain circumstances, +some errors can escape background +.Nm . +It is recommended that you perform foreground +.Nm +on your systems periodically and whenever you encounter +file-system\-related panics. .It Fl t Ar fstype Invoke .Nm From owner-svn-src-stable@FreeBSD.ORG Sat Aug 28 00:48:41 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A4F01065698; Sat, 28 Aug 2010 00:48:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC42E8FC14; Sat, 28 Aug 2010 00:48:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7S0me9C013342; Sat, 28 Aug 2010 00:48:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7S0mee2013338; Sat, 28 Aug 2010 00:48:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201008280048.o7S0mee2013338@svn.freebsd.org> From: Xin LI Date: Sat, 28 Aug 2010 00:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211914 - in stable/8/sys: amd64/include dev/coretemp i386/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 00:48:41 -0000 Author: delphij Date: Sat Aug 28 00:48:40 2010 New Revision: 211914 URL: http://svn.freebsd.org/changeset/base/211914 Log: MFC r210624 and r210833: Improve cputemp(4) driver wrt newer Intel processors, especially Xeon 5500/5600 series: - Utilize IA32_TEMPERATURE_TARGET, a.k.a. Tj(target) in place of Tj(max) when a sane value is available, as documented in Intel whitepaper "CPU Monitoring With DTS/PECI"; (By sane value we mean 70C - 100C for now); - Print the probe results when booting verbose; - Replace cpu_mask with cpu_stepping; - Use CPUID_* macros instead of rolling our own. Catch known CPUs before using IA32_TEMPERATURE_TARGET. This way we would have an opportunity to hide the Tj(target) value doesn't seem right stuff if we know it's not working there. Add temperature value for Core2 Duo Extreme Mobile that I have access to. Modified: stable/8/sys/amd64/include/specialreg.h stable/8/sys/dev/coretemp/coretemp.c stable/8/sys/i386/include/specialreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/include/specialreg.h ============================================================================== --- stable/8/sys/amd64/include/specialreg.h Sat Aug 28 00:34:22 2010 (r211913) +++ stable/8/sys/amd64/include/specialreg.h Sat Aug 28 00:48:40 2010 (r211914) @@ -258,6 +258,7 @@ #define MSR_THERM_INTERRUPT 0x19b #define MSR_THERM_STATUS 0x19c #define MSR_IA32_MISC_ENABLE 0x1a0 +#define MSR_IA32_TEMPERATURE_TARGET 0x1a2 #define MSR_DEBUGCTLMSR 0x1d9 #define MSR_LASTBRANCHFROMIP 0x1db #define MSR_LASTBRANCHTOIP 0x1dc Modified: stable/8/sys/dev/coretemp/coretemp.c ============================================================================== --- stable/8/sys/dev/coretemp/coretemp.c Sat Aug 28 00:34:22 2010 (r211913) +++ stable/8/sys/dev/coretemp/coretemp.c Sat Aug 28 00:48:40 2010 (r211914) @@ -133,15 +133,13 @@ coretemp_attach(device_t dev) struct coretemp_softc *sc = device_get_softc(dev); device_t pdev; uint64_t msr; - int cpu_model; - int cpu_mask; + int cpu_model, cpu_stepping; + int ret, tjtarget; sc->sc_dev = dev; pdev = device_get_parent(dev); - cpu_model = (cpu_id >> 4) & 15; - /* extended model */ - cpu_model += ((cpu_id >> 16) & 0xf) << 4; - cpu_mask = cpu_id & 15; + cpu_model = CPUID_TO_MODEL(cpu_id); + cpu_stepping = cpu_id & CPUID_STEPPING; /* * Some CPUs, namely the PIII, don't have thermal sensors, but @@ -164,7 +162,7 @@ coretemp_attach(device_t dev) * * Adapted from the Linux coretemp driver. */ - if (cpu_model == 0xe && cpu_mask < 0xc) { + if (cpu_model == 0xe && cpu_stepping < 0xc) { msr = rdmsr(MSR_BIOS_SIGN); msr = msr >> 32; if (msr < 0x39) { @@ -174,20 +172,68 @@ coretemp_attach(device_t dev) } } #endif + /* - * On some Core 2 CPUs, there's an undocumented MSR that - * can tell us if Tj(max) is 100 or 85. - * - * The if-clause for CPUs having the MSR_IA32_EXT_CONFIG was adapted - * from the Linux coretemp driver. + * Use 100C as the initial value. */ sc->sc_tjmax = 100; - if ((cpu_model == 0xf && cpu_mask >= 2) || cpu_model == 0xe) { + + if ((cpu_model == 0xf && cpu_stepping >= 2) || cpu_model == 0xe) { + /* + * On some Core 2 CPUs, there's an undocumented MSR that + * can tell us if Tj(max) is 100 or 85. + * + * The if-clause for CPUs having the MSR_IA32_EXT_CONFIG was adapted + * from the Linux coretemp driver. + */ msr = rdmsr(MSR_IA32_EXT_CONFIG); if (msr & (1 << 30)) sc->sc_tjmax = 85; + } else if (cpu_model == 0x17) { + switch (cpu_stepping) { + case 0x6: /* Mobile Core 2 Duo */ + sc->sc_tjmax = 104; + break; + default: /* Unknown stepping */ + break; + } + } else { + /* + * Attempt to get Tj(max) from MSR IA32_TEMPERATURE_TARGET. + * + * This method is described in Intel white paper "CPU + * Monitoring With DTS/PECI". (#322683) + */ + ret = rdmsr_safe(MSR_IA32_TEMPERATURE_TARGET, &msr); + if (ret == 0) { + tjtarget = (msr >> 16) & 0xff; + + /* + * On earlier generation of processors, the value + * obtained from IA32_TEMPERATURE_TARGET register is + * an offset that needs to be summed with a model + * specific base. It is however not clear what + * these numbers are, with the publicly available + * documents from Intel. + * + * For now, we consider [70, 100]C range, as + * described in #322683, as "reasonable" and accept + * these values whenever the MSR is available for + * read, regardless the CPU model. + */ + if (tjtarget >= 70 && tjtarget <= 100) + sc->sc_tjmax = tjtarget; + else + device_printf(dev, "Tj(target) value %d " + "does not seem right.\n", tjtarget); + } else + device_printf(dev, "Can not get Tj(target) " + "from your CPU, using 100C.\n"); } + if (bootverbose) + device_printf(dev, "Setting TjMax=%d\n", sc->sc_tjmax); + /* * Add the "temperature" MIB to dev.cpu.N. */ Modified: stable/8/sys/i386/include/specialreg.h ============================================================================== --- stable/8/sys/i386/include/specialreg.h Sat Aug 28 00:34:22 2010 (r211913) +++ stable/8/sys/i386/include/specialreg.h Sat Aug 28 00:48:40 2010 (r211914) @@ -264,6 +264,7 @@ #define MSR_THERM_INTERRUPT 0x19b #define MSR_THERM_STATUS 0x19c #define MSR_IA32_MISC_ENABLE 0x1a0 +#define MSR_IA32_TEMPERATURE_TARGET 0x1a2 #define MSR_DEBUGCTLMSR 0x1d9 #define MSR_LASTBRANCHFROMIP 0x1db #define MSR_LASTBRANCHTOIP 0x1dc From owner-svn-src-stable@FreeBSD.ORG Sat Aug 28 06:33:01 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90A551065698; Sat, 28 Aug 2010 06:33:01 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F9A48FC08; Sat, 28 Aug 2010 06:33:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7S6X1ou021341; Sat, 28 Aug 2010 06:33:01 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7S6X17Y021339; Sat, 28 Aug 2010 06:33:01 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201008280633.o7S6X17Y021339@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 28 Aug 2010 06:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211919 - stable/7/lib/libc/stdlib X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 06:33:01 -0000 Author: jh Date: Sat Aug 28 06:33:01 2010 New Revision: 211919 URL: http://svn.freebsd.org/changeset/base/211919 Log: MFC r204636: In reallocf(3), free the memory only when size != 0. Otherwise, when the System V compatibility option (malloc "V" flag) is in effect a zero sized reallocf() could cause a double free. PR: bin/141753 Modified: stable/7/lib/libc/stdlib/reallocf.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/stdlib/reallocf.c ============================================================================== --- stable/7/lib/libc/stdlib/reallocf.c Sat Aug 28 06:31:15 2010 (r211918) +++ stable/7/lib/libc/stdlib/reallocf.c Sat Aug 28 06:33:01 2010 (r211919) @@ -35,7 +35,14 @@ reallocf(void *ptr, size_t size) void *nptr; nptr = realloc(ptr, size); - if (!nptr && ptr) + + /* + * When the System V compatibility option (malloc "V" flag) is + * in effect, realloc(ptr, 0) frees the memory and returns NULL. + * So, to avoid double free, call free() only when size != 0. + * realloc(ptr, 0) can't fail when ptr != NULL. + */ + if (!nptr && ptr && size != 0) free(ptr); return (nptr); } From owner-svn-src-stable@FreeBSD.ORG Sat Aug 28 07:21:16 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F08D110656AB; Sat, 28 Aug 2010 07:21:15 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD8138FC20; Sat, 28 Aug 2010 07:21:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7S7LFEp022512; Sat, 28 Aug 2010 07:21:15 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7S7LFG9022497; Sat, 28 Aug 2010 07:21:15 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201008280721.o7S7LFG9022497@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 28 Aug 2010 07:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211921 - in stable/8/sys: dev/bwi dev/bwn dev/iwn dev/ral dev/usb/wlan dev/wpi net80211 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 07:21:16 -0000 Author: bschmidt Date: Sat Aug 28 07:21:15 2010 New Revision: 211921 URL: http://svn.freebsd.org/changeset/base/211921 Log: MFC r211295,211314,211546: Introduce IEEE80211_C_RATECTL, drivers which use the ratectl framework should set this capability. Initialize ni_txrate after txparams have been setup. Some drivers calculate various things prior to association based on ni_txrate and rely on it being nonzero. PR: kern/149185 Modified: stable/8/sys/dev/bwi/if_bwi.c stable/8/sys/dev/bwn/if_bwn.c stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/ral/rt2560.c stable/8/sys/dev/ral/rt2661.c stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_ural.c stable/8/sys/dev/usb/wlan/if_zyd.c stable/8/sys/dev/wpi/if_wpi.c stable/8/sys/net80211/ieee80211.c stable/8/sys/net80211/ieee80211_node.c stable/8/sys/net80211/ieee80211_sta.c stable/8/sys/net80211/ieee80211_var.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/8/sys/dev/bwi/if_bwi.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/dev/bwi/if_bwi.c Sat Aug 28 07:21:15 2010 (r211921) @@ -511,7 +511,8 @@ bwi_attach(struct bwi_softc *sc) IEEE80211_C_SHPREAMBLE | IEEE80211_C_WPA | IEEE80211_C_BGSCAN | - IEEE80211_C_MONITOR; + IEEE80211_C_MONITOR | + IEEE80211_C_RATECTL; ic->ic_opmode = IEEE80211_M_STA; ieee80211_ifattach(ic, macaddr); Modified: stable/8/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/8/sys/dev/bwn/if_bwn.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/dev/bwn/if_bwn.c Sat Aug 28 07:21:15 2010 (r211921) @@ -1070,6 +1070,7 @@ bwn_attach_post(struct bwn_softc *sc) | IEEE80211_C_WPA /* capable of WPA1+WPA2 */ | IEEE80211_C_BGSCAN /* capable of bg scanning */ | IEEE80211_C_TXPMGT /* capable of txpow mgt */ + | IEEE80211_C_RATECTL /* use ratectl */ ; ic->ic_flags_ext |= IEEE80211_FEXT_SWBMISS; /* s/w bmiss */ Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/dev/iwn/if_iwn.c Sat Aug 28 07:21:15 2010 (r211921) @@ -580,6 +580,7 @@ iwn_attach(device_t dev) | IEEE80211_C_IBSS /* ibss/adhoc mode */ #endif | IEEE80211_C_WME /* WME */ + | IEEE80211_C_RATECTL /* use ratectl */ ; #if 0 /* HT */ /* XXX disable until HT channel setup works */ Modified: stable/8/sys/dev/ral/rt2560.c ============================================================================== --- stable/8/sys/dev/ral/rt2560.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/dev/ral/rt2560.c Sat Aug 28 07:21:15 2010 (r211921) @@ -291,6 +291,7 @@ rt2560_attach(device_t dev, int id) #ifdef notyet | IEEE80211_C_TXFRAG /* handle tx frags */ #endif + | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/ral/rt2661.c ============================================================================== --- stable/8/sys/dev/ral/rt2661.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/dev/ral/rt2661.c Sat Aug 28 07:21:15 2010 (r211921) @@ -294,6 +294,7 @@ rt2661_attach(device_t dev, int id) | IEEE80211_C_TXFRAG /* handle tx frags */ | IEEE80211_C_WME /* 802.11e */ #endif + | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/dev/usb/wlan/if_rum.c Sat Aug 28 07:21:15 2010 (r211921) @@ -496,6 +496,7 @@ rum_attach(device_t self) | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_BGSCAN /* bg scanning supported */ | IEEE80211_C_WPA /* 802.11i */ + | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/dev/usb/wlan/if_run.c Sat Aug 28 07:21:15 2010 (r211921) @@ -634,7 +634,8 @@ run_attach(device_t self) IEEE80211_C_SHPREAMBLE | /* short preamble supported */ IEEE80211_C_SHSLOT | /* short slot time supported */ IEEE80211_C_WME | /* WME */ - IEEE80211_C_WPA; /* WPA1|WPA2(RSN) */ + IEEE80211_C_WPA | /* WPA1|WPA2(RSN) */ + IEEE80211_C_RATECTL; /* use ratectl */ ic->ic_cryptocaps = IEEE80211_CRYPTO_WEP | Modified: stable/8/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_ural.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/dev/usb/wlan/if_ural.c Sat Aug 28 07:21:15 2010 (r211921) @@ -485,6 +485,7 @@ ural_attach(device_t self) | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_BGSCAN /* bg scanning supported */ | IEEE80211_C_WPA /* 802.11i */ + | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_zyd.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/dev/usb/wlan/if_zyd.c Sat Aug 28 07:21:15 2010 (r211921) @@ -397,6 +397,7 @@ zyd_attach(device_t dev) | IEEE80211_C_SHSLOT /* short slot time supported */ | IEEE80211_C_BGSCAN /* capable of bg scanning */ | IEEE80211_C_WPA /* 802.11i */ + | IEEE80211_C_RATECTL /* use ratectl */ ; bands = 0; Modified: stable/8/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/8/sys/dev/wpi/if_wpi.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/dev/wpi/if_wpi.c Sat Aug 28 07:21:15 2010 (r211921) @@ -634,6 +634,7 @@ wpi_attach(device_t dev) | IEEE80211_C_WME /* 802.11e */ | IEEE80211_C_HOSTAP /* Host access point mode */ #endif + | IEEE80211_C_RATECTL /* use ratectl */ ; /* Modified: stable/8/sys/net80211/ieee80211.c ============================================================================== --- stable/8/sys/net80211/ieee80211.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/net80211/ieee80211.c Sat Aug 28 07:21:15 2010 (r211921) @@ -486,7 +486,8 @@ ieee80211_vap_setup(struct ieee80211com ieee80211_regdomain_vattach(vap); ieee80211_radiotap_vattach(vap); - ieee80211_ratectl_set(vap, IEEE80211_RATECTL_AMRR); + if (vap->iv_caps & IEEE80211_C_RATECTL) + ieee80211_ratectl_set(vap, IEEE80211_RATECTL_AMRR); return 0; } Modified: stable/8/sys/net80211/ieee80211_node.c ============================================================================== --- stable/8/sys/net80211/ieee80211_node.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/net80211/ieee80211_node.c Sat Aug 28 07:21:15 2010 (r211921) @@ -817,6 +817,8 @@ ieee80211_sta_join(struct ieee80211vap * if (ieee80211_iserp_rateset(&ni->ni_rates)) ni->ni_flags |= IEEE80211_NODE_ERP; ieee80211_node_setuptxparms(ni); + if (vap->iv_caps & IEEE80211_C_RATECTL) + ieee80211_ratectl_node_init(ni); return ieee80211_sta_join1(ieee80211_ref_node(ni)); } @@ -1036,7 +1038,8 @@ node_free(struct ieee80211_node *ni) { struct ieee80211com *ic = ni->ni_ic; - ieee80211_ratectl_node_deinit(ni); + if (ni->ni_vap->iv_caps & IEEE80211_C_RATECTL) + ieee80211_ratectl_node_deinit(ni); ic->ic_node_cleanup(ni); ieee80211_ies_cleanup(&ni->ni_ies); ieee80211_psq_cleanup(&ni->ni_psq); @@ -1401,6 +1404,8 @@ ieee80211_fakeup_adhoc_node(struct ieee8 #endif } ieee80211_node_setuptxparms(ni); + if (vap->iv_caps & IEEE80211_C_RATECTL) + ieee80211_ratectl_node_init(ni); if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, 1); /* XXX not right for 802.1x/WPA */ @@ -1470,6 +1475,8 @@ ieee80211_add_neighbor(struct ieee80211v if (ieee80211_iserp_rateset(&ni->ni_rates)) ni->ni_flags |= IEEE80211_NODE_ERP; ieee80211_node_setuptxparms(ni); + if (vap->iv_caps & IEEE80211_C_RATECTL) + ieee80211_ratectl_node_init(ni); if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, 1); /* XXX not right for 802.1x/WPA */ @@ -2338,6 +2345,8 @@ ieee80211_node_join(struct ieee80211_nod ); ieee80211_node_setuptxparms(ni); + if (vap->iv_caps & IEEE80211_C_RATECTL) + ieee80211_ratectl_node_init(ni); /* give driver a chance to setup state like ni_txrate */ if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, newassoc); Modified: stable/8/sys/net80211/ieee80211_sta.c ============================================================================== --- stable/8/sys/net80211/ieee80211_sta.c Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/net80211/ieee80211_sta.c Sat Aug 28 07:21:15 2010 (r211921) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #ifdef IEEE80211_SUPPORT_SUPERG #include #endif +#include #define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2) @@ -1597,6 +1598,8 @@ sta_recv_mgmt(struct ieee80211_node *ni, IEEE80211_F_JOIN | IEEE80211_F_DOBRS); ieee80211_setup_basic_htrates(ni, htinfo); ieee80211_node_setuptxparms(ni); + if (vap->iv_caps & IEEE80211_C_RATECTL) + ieee80211_ratectl_node_init(ni); } else { #ifdef IEEE80211_SUPPORT_SUPERG if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_ATH)) Modified: stable/8/sys/net80211/ieee80211_var.h ============================================================================== --- stable/8/sys/net80211/ieee80211_var.h Sat Aug 28 07:10:51 2010 (r211920) +++ stable/8/sys/net80211/ieee80211_var.h Sat Aug 28 07:21:15 2010 (r211921) @@ -597,7 +597,8 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_C_MONITOR 0x00010000 /* CAPABILITY: monitor mode */ #define IEEE80211_C_DFS 0x00020000 /* CAPABILITY: DFS/radar avail*/ #define IEEE80211_C_MBSS 0x00040000 /* CAPABILITY: MBSS available */ -/* 0x7c0000 available */ +#define IEEE80211_C_RATECTL 0x00080000 /* CAPABILITY: use ratectl */ +/* 0x700000 available */ #define IEEE80211_C_WPA1 0x00800000 /* CAPABILITY: WPA1 avail */ #define IEEE80211_C_WPA2 0x01000000 /* CAPABILITY: WPA2 avail */ #define IEEE80211_C_WPA 0x01800000 /* CAPABILITY: WPA1+WPA2 avail*/ From owner-svn-src-stable@FreeBSD.ORG Sat Aug 28 17:06:22 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D03C41065693; Sat, 28 Aug 2010 17:06:22 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE0EB8FC1E; Sat, 28 Aug 2010 17:06:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7SH6Mds037744; Sat, 28 Aug 2010 17:06:22 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7SH6M8d037732; Sat, 28 Aug 2010 17:06:22 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201008281706.o7SH6M8d037732@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 28 Aug 2010 17:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211938 - stable/8/lib/libc/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 17:06:22 -0000 Author: ume Date: Sat Aug 28 17:06:22 2010 New Revision: 211938 URL: http://svn.freebsd.org/changeset/base/211938 Log: MFC r211276: - When there is no room for returning the result, nss backend have to return ERANGE and terminate with NS_RETURN. - When gethostbyname_r(3) and the friends end with an error, set errno to the value nss backend returns, and return errno value. PR: kern/131623 Modified: stable/8/lib/libc/net/gethostbydns.c stable/8/lib/libc/net/gethostbyht.c stable/8/lib/libc/net/gethostbynis.c stable/8/lib/libc/net/gethostnamadr.c stable/8/lib/libc/net/getnetbydns.c stable/8/lib/libc/net/getnetbyht.c stable/8/lib/libc/net/getnetbynis.c stable/8/lib/libc/net/getnetnamadr.c stable/8/lib/libc/net/getproto.c stable/8/lib/libc/net/getprotoent.c stable/8/lib/libc/net/getprotoname.c Modified: stable/8/lib/libc/net/gethostbydns.c ============================================================================== --- stable/8/lib/libc/net/gethostbydns.c Sat Aug 28 16:57:07 2010 (r211937) +++ stable/8/lib/libc/net/gethostbydns.c Sat Aug 28 17:06:22 2010 (r211938) @@ -536,9 +536,12 @@ _dns_gethostbyname(void *rval, void *cb_ return (NS_NOTFOUND); } if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } + RES_SET_H_ERRNO(statp, NETDB_SUCCESS); *((struct hostent **)rval) = hptr; return (NS_SUCCESS); } @@ -683,11 +686,13 @@ _dns_gethostbyaddr(void *rval, void *cb_ he.h_addrtype = AF_INET6; he.h_length = NS_IN6ADDRSZ; } - RES_SET_H_ERRNO(statp, NETDB_SUCCESS); if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } + RES_SET_H_ERRNO(statp, NETDB_SUCCESS); *((struct hostent **)rval) = hptr; return (NS_SUCCESS); } Modified: stable/8/lib/libc/net/gethostbyht.c ============================================================================== --- stable/8/lib/libc/net/gethostbyht.c Sat Aug 28 16:57:07 2010 (r211937) +++ stable/8/lib/libc/net/gethostbyht.c Sat Aug 28 17:06:22 2010 (r211938) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -192,8 +193,11 @@ gethostent_r(struct hostent *hptr, char } if (gethostent_p(&he, hed, statp->options & RES_USE_INET6, statp) != 0) return (-1); - if (__copy_hostent(&he, hptr, buffer, buflen) != 0) - return (-1); + if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); + *h_errnop = statp->res_h_errno; + return ((errno != 0) ? errno : -1); + } *result = hptr; return (0); } @@ -268,8 +272,10 @@ found: return (NS_NOTFOUND); } if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct hostent **)rval) = hptr; return (NS_SUCCESS); @@ -323,8 +329,10 @@ _ht_gethostbyaddr(void *rval, void *cb_d if (error != 0) return (NS_NOTFOUND); if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct hostent **)rval) = hptr; return (NS_SUCCESS); Modified: stable/8/lib/libc/net/gethostbynis.c ============================================================================== --- stable/8/lib/libc/net/gethostbynis.c Sat Aug 28 16:57:07 2010 (r211937) +++ stable/8/lib/libc/net/gethostbynis.c Sat Aug 28 17:06:22 2010 (r211938) @@ -288,8 +288,10 @@ _nis_gethostbyname(void *rval, void *cb_ return (NS_NOTFOUND); } if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct hostent **)rval) = hptr; return (NS_SUCCESS); @@ -336,8 +338,10 @@ _nis_gethostbyaddr(void *rval, void *cb_ return (NS_NOTFOUND); } if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct hostent **)rval) = hptr; return (NS_SUCCESS); Modified: stable/8/lib/libc/net/gethostnamadr.c ============================================================================== --- stable/8/lib/libc/net/gethostnamadr.c Sat Aug 28 16:57:07 2010 (r211937) +++ stable/8/lib/libc/net/gethostnamadr.c Sat Aug 28 17:06:22 2010 (r211938) @@ -480,8 +480,12 @@ fakeaddr(const char *name, int af, struc hed->h_addr_ptrs[0] = (char *)hed->host_addr; hed->h_addr_ptrs[1] = NULL; he.h_addr_list = hed->h_addr_ptrs; + if (__copy_hostent(&he, hp, buf, buflen) != 0) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); + return (-1); + } RES_SET_H_ERRNO(statp, NETDB_SUCCESS); - return (__copy_hostent(&he, hp, buf, buflen)); + return (0); } int @@ -528,7 +532,7 @@ gethostbyname_internal(const char *name, size_t buflen, struct hostent **result, int *h_errnop, res_state statp) { const char *cp; - int rval, ret_errno; + int rval, ret_errno = 0; char abuf[MAXDNAME]; #ifdef NS_CACHING @@ -576,7 +580,11 @@ gethostbyname_internal(const char *name, "gethostbyname2_r", default_src, name, af, hp, buf, buflen, &ret_errno, h_errnop); - return ((rval == NS_SUCCESS) ? 0 : -1); + if (rval != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } int @@ -586,7 +594,7 @@ gethostbyaddr_r(const void *addr, sockle const u_char *uaddr = (const u_char *)addr; const struct in6_addr *addr6; socklen_t size; - int rval, ret_errno; + int rval, ret_errno = 0; res_state statp; #ifdef NS_CACHING @@ -651,7 +659,11 @@ gethostbyaddr_r(const void *addr, sockle "gethostbyaddr_r", default_src, uaddr, len, af, hp, buf, buflen, &ret_errno, h_errnop); - return ((rval == NS_SUCCESS) ? 0 : -1); + if (rval != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } struct hostent * Modified: stable/8/lib/libc/net/getnetbydns.c ============================================================================== --- stable/8/lib/libc/net/getnetbydns.c Sat Aug 28 16:57:07 2010 (r211937) +++ stable/8/lib/libc/net/getnetbydns.c Sat Aug 28 17:06:22 2010 (r211938) @@ -355,8 +355,10 @@ _dns_getnetbyaddr(void *rval, void *cb_d net >>= 8; ne.n_net = net; if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct netent **)rval) = nptr; return (NS_SUCCESS); @@ -431,8 +433,10 @@ _dns_getnetbyname(void *rval, void *cb_d return (NS_NOTFOUND); } if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct netent **)rval) = nptr; return (NS_SUCCESS); Modified: stable/8/lib/libc/net/getnetbyht.c ============================================================================== --- stable/8/lib/libc/net/getnetbyht.c Sat Aug 28 16:57:07 2010 (r211937) +++ stable/8/lib/libc/net/getnetbyht.c Sat Aug 28 17:06:22 2010 (r211938) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -162,8 +163,11 @@ getnetent_r(struct netent *nptr, char *b } if (getnetent_p(&ne, ned) != 0) return (-1); - if (__copy_netent(&ne, nptr, buffer, buflen) != 0) - return (-1); + if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); + *h_errnop = statp->res_h_errno; + return ((errno != 0) ? errno : -1); + } *result = nptr; return (0); } @@ -226,8 +230,10 @@ found: return (NS_NOTFOUND); } if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct netent **)rval) = nptr; return (NS_SUCCESS); @@ -272,8 +278,10 @@ _ht_getnetbyaddr(void *rval, void *cb_da return (NS_NOTFOUND); } if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct netent **)rval) = nptr; return (NS_SUCCESS); Modified: stable/8/lib/libc/net/getnetbynis.c ============================================================================== --- stable/8/lib/libc/net/getnetbynis.c Sat Aug 28 16:57:07 2010 (r211937) +++ stable/8/lib/libc/net/getnetbynis.c Sat Aug 28 17:06:22 2010 (r211938) @@ -160,8 +160,10 @@ _nis_getnetbyname(void *rval, void *cb_d return (NS_NOTFOUND); } if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct netent **)rval) = nptr; return (NS_SUCCESS); @@ -244,8 +246,10 @@ _nis_getnetbyaddr(void *rval, void *cb_d return (NS_NOTFOUND); } if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct netent **)rval) = nptr; return (NS_SUCCESS); Modified: stable/8/lib/libc/net/getnetnamadr.c ============================================================================== --- stable/8/lib/libc/net/getnetnamadr.c Sat Aug 28 16:57:07 2010 (r211937) +++ stable/8/lib/libc/net/getnetnamadr.c Sat Aug 28 17:06:22 2010 (r211938) @@ -360,13 +360,17 @@ getnetbyname_r(const char *name, struct #endif { 0 } }; - int rval, ret_errno; + int rval, ret_errno = 0; rval = _nsdispatch((void *)result, dtab, NSDB_NETWORKS, "getnetbyname_r", default_src, name, ne, buffer, buflen, &ret_errno, h_errorp); - return ((rval == NS_SUCCESS) ? 0 : -1); + if (rval != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } int @@ -388,13 +392,17 @@ getnetbyaddr_r(uint32_t addr, int af, st #endif { 0 } }; - int rval, ret_errno; + int rval, ret_errno = 0; rval = _nsdispatch((void *)result, dtab, NSDB_NETWORKS, "getnetbyaddr_r", default_src, addr, af, ne, buffer, buflen, &ret_errno, h_errorp); - return ((rval == NS_SUCCESS) ? 0 : -1); + if (rval != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } struct netent * Modified: stable/8/lib/libc/net/getproto.c ============================================================================== --- stable/8/lib/libc/net/getproto.c Sat Aug 28 16:57:07 2010 (r211937) +++ stable/8/lib/libc/net/getproto.c Sat Aug 28 17:06:22 2010 (r211938) @@ -33,6 +33,7 @@ static char sccsid[] = "@(#)getproto.c 8 #include __FBSDID("$FreeBSD$"); +#include #include #include #include "netdb_private.h" @@ -72,7 +73,7 @@ files_getprotobynumber(void *retval, voi errnop = va_arg(ap, int *); if ((ped = __protoent_data_init()) == NULL) { - *errnop = -1; + *errnop = errno; return (NS_NOTFOUND); } @@ -83,12 +84,12 @@ files_getprotobynumber(void *retval, voi if (!ped->stayopen) __endprotoent_p(ped); if (error != 0) { - *errnop = -1; + *errnop = errno; return (NS_NOTFOUND); } if (__copy_protoent(&pe, pptr, buffer, buflen) != 0) { - *errnop = -1; - return (NS_NOTFOUND); + *errnop = errno; + return (NS_RETURN); } *((struct protoent **)retval) = pptr; @@ -120,10 +121,11 @@ getprotobynumber_r(int proto, struct pro rv = nsdispatch(result, dtab, NSDB_PROTOCOLS, "getprotobynumber_r", defaultsrc, proto, pptr, buffer, buflen, &ret_errno); - if (rv == NS_SUCCESS) - return (0); - else - return (ret_errno); + if (rv != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } struct protoent * Modified: stable/8/lib/libc/net/getprotoent.c ============================================================================== --- stable/8/lib/libc/net/getprotoent.c Sat Aug 28 16:57:07 2010 (r211937) +++ stable/8/lib/libc/net/getprotoent.c Sat Aug 28 17:06:22 2010 (r211938) @@ -424,8 +424,10 @@ files_getprotoent_r(void *retval, void * buflen = va_arg(ap, size_t); errnop = va_arg(ap, int *); - if ((ped = __protoent_data_init()) == NULL) - return (-1); + if ((ped = __protoent_data_init()) == NULL) { + *errnop = errno; + return (NS_NOTFOUND); + } if (__getprotoent_p(&pe, ped) != 0) { *errnop = errno; @@ -434,7 +436,7 @@ files_getprotoent_r(void *retval, void * if (__copy_protoent(&pe, pptr, buffer, buflen) != 0) { *errnop = errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct protoent **)retval) = pptr; @@ -490,10 +492,11 @@ getprotoent_r(struct protoent *pptr, cha rv = nsdispatch(result, dtab, NSDB_PROTOCOLS, "getprotoent_r", defaultsrc, pptr, buffer, buflen, &ret_errno); - if (rv == NS_SUCCESS) - return (0); - else - return (ret_errno); + if (rv != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } void Modified: stable/8/lib/libc/net/getprotoname.c ============================================================================== --- stable/8/lib/libc/net/getprotoname.c Sat Aug 28 16:57:07 2010 (r211937) +++ stable/8/lib/libc/net/getprotoname.c Sat Aug 28 17:06:22 2010 (r211938) @@ -33,6 +33,7 @@ static char sccsid[] = "@(#)getprotoname #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -75,7 +76,7 @@ files_getprotobyname(void *retval, void if ((ped = __protoent_data_init()) == NULL) { - *errnop = -1; + *errnop = errno; return (NS_NOTFOUND); } @@ -91,12 +92,12 @@ found: if (!ped->stayopen) __endprotoent_p(ped); if (error != 0) { - *errnop = -1; + *errnop = errno; return (NS_NOTFOUND); } if (__copy_protoent(&pe, pptr, buffer, buflen) != 0) { - *errnop = -1; - return (NS_NOTFOUND); + *errnop = errno; + return (NS_RETURN); } *((struct protoent **)retval) = pptr; @@ -128,10 +129,11 @@ getprotobyname_r(const char *name, struc rv = nsdispatch(result, dtab, NSDB_PROTOCOLS, "getprotobyname_r", defaultsrc, name, pptr, buffer, buflen, &ret_errno); - if (rv == NS_SUCCESS) - return (0); - else - return (ret_errno); + if (rv != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } struct protoent * From owner-svn-src-stable@FreeBSD.ORG Sat Aug 28 17:12:53 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EF1A1065670; Sat, 28 Aug 2010 17:12:53 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CC1B8FC21; Sat, 28 Aug 2010 17:12:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7SHCrXa037929; Sat, 28 Aug 2010 17:12:53 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7SHCqn2037917; Sat, 28 Aug 2010 17:12:52 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201008281712.o7SHCqn2037917@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 28 Aug 2010 17:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211939 - stable/7/lib/libc/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 17:12:53 -0000 Author: ume Date: Sat Aug 28 17:12:52 2010 New Revision: 211939 URL: http://svn.freebsd.org/changeset/base/211939 Log: MFC r211276: - When there is no room for returning the result, nss backend have to return ERANGE and terminate with NS_RETURN. - When gethostbyname_r(3) and the friends end with an error, set errno to the value nss backend returns, and return errno value. PR: kern/131623 Modified: stable/7/lib/libc/net/gethostbydns.c stable/7/lib/libc/net/gethostbyht.c stable/7/lib/libc/net/gethostbynis.c stable/7/lib/libc/net/gethostnamadr.c stable/7/lib/libc/net/getnetbydns.c stable/7/lib/libc/net/getnetbyht.c stable/7/lib/libc/net/getnetbynis.c stable/7/lib/libc/net/getnetnamadr.c stable/7/lib/libc/net/getproto.c stable/7/lib/libc/net/getprotoent.c stable/7/lib/libc/net/getprotoname.c Modified: stable/7/lib/libc/net/gethostbydns.c ============================================================================== --- stable/7/lib/libc/net/gethostbydns.c Sat Aug 28 17:06:22 2010 (r211938) +++ stable/7/lib/libc/net/gethostbydns.c Sat Aug 28 17:12:52 2010 (r211939) @@ -536,9 +536,12 @@ _dns_gethostbyname(void *rval, void *cb_ return (NS_NOTFOUND); } if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } + RES_SET_H_ERRNO(statp, NETDB_SUCCESS); *((struct hostent **)rval) = hptr; return (NS_SUCCESS); } @@ -683,11 +686,13 @@ _dns_gethostbyaddr(void *rval, void *cb_ he.h_addrtype = AF_INET6; he.h_length = NS_IN6ADDRSZ; } - RES_SET_H_ERRNO(statp, NETDB_SUCCESS); if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } + RES_SET_H_ERRNO(statp, NETDB_SUCCESS); *((struct hostent **)rval) = hptr; return (NS_SUCCESS); } Modified: stable/7/lib/libc/net/gethostbyht.c ============================================================================== --- stable/7/lib/libc/net/gethostbyht.c Sat Aug 28 17:06:22 2010 (r211938) +++ stable/7/lib/libc/net/gethostbyht.c Sat Aug 28 17:12:52 2010 (r211939) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -192,8 +193,11 @@ gethostent_r(struct hostent *hptr, char } if (gethostent_p(&he, hed, statp->options & RES_USE_INET6, statp) != 0) return (-1); - if (__copy_hostent(&he, hptr, buffer, buflen) != 0) - return (-1); + if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); + *h_errnop = statp->res_h_errno; + return ((errno != 0) ? errno : -1); + } *result = hptr; return (0); } @@ -268,8 +272,10 @@ found: return (NS_NOTFOUND); } if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct hostent **)rval) = hptr; return (NS_SUCCESS); @@ -323,8 +329,10 @@ _ht_gethostbyaddr(void *rval, void *cb_d if (error != 0) return (NS_NOTFOUND); if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct hostent **)rval) = hptr; return (NS_SUCCESS); Modified: stable/7/lib/libc/net/gethostbynis.c ============================================================================== --- stable/7/lib/libc/net/gethostbynis.c Sat Aug 28 17:06:22 2010 (r211938) +++ stable/7/lib/libc/net/gethostbynis.c Sat Aug 28 17:12:52 2010 (r211939) @@ -288,8 +288,10 @@ _nis_gethostbyname(void *rval, void *cb_ return (NS_NOTFOUND); } if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct hostent **)rval) = hptr; return (NS_SUCCESS); @@ -336,8 +338,10 @@ _nis_gethostbyaddr(void *rval, void *cb_ return (NS_NOTFOUND); } if (__copy_hostent(&he, hptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct hostent **)rval) = hptr; return (NS_SUCCESS); Modified: stable/7/lib/libc/net/gethostnamadr.c ============================================================================== --- stable/7/lib/libc/net/gethostnamadr.c Sat Aug 28 17:06:22 2010 (r211938) +++ stable/7/lib/libc/net/gethostnamadr.c Sat Aug 28 17:12:52 2010 (r211939) @@ -480,8 +480,12 @@ fakeaddr(const char *name, int af, struc hed->h_addr_ptrs[0] = (char *)hed->host_addr; hed->h_addr_ptrs[1] = NULL; he.h_addr_list = hed->h_addr_ptrs; + if (__copy_hostent(&he, hp, buf, buflen) != 0) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); + return (-1); + } RES_SET_H_ERRNO(statp, NETDB_SUCCESS); - return (__copy_hostent(&he, hp, buf, buflen)); + return (0); } int @@ -528,7 +532,7 @@ gethostbyname_internal(const char *name, size_t buflen, struct hostent **result, int *h_errnop, res_state statp) { const char *cp; - int rval, ret_errno; + int rval, ret_errno = 0; char abuf[MAXDNAME]; #ifdef NS_CACHING @@ -576,7 +580,11 @@ gethostbyname_internal(const char *name, "gethostbyname2_r", default_src, name, af, hp, buf, buflen, &ret_errno, h_errnop); - return ((rval == NS_SUCCESS) ? 0 : -1); + if (rval != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } int @@ -586,7 +594,7 @@ gethostbyaddr_r(const void *addr, sockle const u_char *uaddr = (const u_char *)addr; const struct in6_addr *addr6; socklen_t size; - int rval, ret_errno; + int rval, ret_errno = 0; res_state statp; #ifdef NS_CACHING @@ -651,7 +659,11 @@ gethostbyaddr_r(const void *addr, sockle "gethostbyaddr_r", default_src, uaddr, len, af, hp, buf, buflen, &ret_errno, h_errnop); - return ((rval == NS_SUCCESS) ? 0 : -1); + if (rval != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } struct hostent * Modified: stable/7/lib/libc/net/getnetbydns.c ============================================================================== --- stable/7/lib/libc/net/getnetbydns.c Sat Aug 28 17:06:22 2010 (r211938) +++ stable/7/lib/libc/net/getnetbydns.c Sat Aug 28 17:12:52 2010 (r211939) @@ -355,8 +355,10 @@ _dns_getnetbyaddr(void *rval, void *cb_d net >>= 8; ne.n_net = net; if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct netent **)rval) = nptr; return (NS_SUCCESS); @@ -431,8 +433,10 @@ _dns_getnetbyname(void *rval, void *cb_d return (NS_NOTFOUND); } if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct netent **)rval) = nptr; return (NS_SUCCESS); Modified: stable/7/lib/libc/net/getnetbyht.c ============================================================================== --- stable/7/lib/libc/net/getnetbyht.c Sat Aug 28 17:06:22 2010 (r211938) +++ stable/7/lib/libc/net/getnetbyht.c Sat Aug 28 17:12:52 2010 (r211939) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -162,8 +163,11 @@ getnetent_r(struct netent *nptr, char *b } if (getnetent_p(&ne, ned) != 0) return (-1); - if (__copy_netent(&ne, nptr, buffer, buflen) != 0) - return (-1); + if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); + *h_errnop = statp->res_h_errno; + return ((errno != 0) ? errno : -1); + } *result = nptr; return (0); } @@ -226,8 +230,10 @@ found: return (NS_NOTFOUND); } if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct netent **)rval) = nptr; return (NS_SUCCESS); @@ -272,8 +278,10 @@ _ht_getnetbyaddr(void *rval, void *cb_da return (NS_NOTFOUND); } if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct netent **)rval) = nptr; return (NS_SUCCESS); Modified: stable/7/lib/libc/net/getnetbynis.c ============================================================================== --- stable/7/lib/libc/net/getnetbynis.c Sat Aug 28 17:06:22 2010 (r211938) +++ stable/7/lib/libc/net/getnetbynis.c Sat Aug 28 17:12:52 2010 (r211939) @@ -160,8 +160,10 @@ _nis_getnetbyname(void *rval, void *cb_d return (NS_NOTFOUND); } if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct netent **)rval) = nptr; return (NS_SUCCESS); @@ -244,8 +246,10 @@ _nis_getnetbyaddr(void *rval, void *cb_d return (NS_NOTFOUND); } if (__copy_netent(&ne, nptr, buffer, buflen) != 0) { + *errnop = errno; + RES_SET_H_ERRNO(statp, NETDB_INTERNAL); *h_errnop = statp->res_h_errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct netent **)rval) = nptr; return (NS_SUCCESS); Modified: stable/7/lib/libc/net/getnetnamadr.c ============================================================================== --- stable/7/lib/libc/net/getnetnamadr.c Sat Aug 28 17:06:22 2010 (r211938) +++ stable/7/lib/libc/net/getnetnamadr.c Sat Aug 28 17:12:52 2010 (r211939) @@ -360,13 +360,17 @@ getnetbyname_r(const char *name, struct #endif { 0 } }; - int rval, ret_errno; + int rval, ret_errno = 0; rval = _nsdispatch((void *)result, dtab, NSDB_NETWORKS, "getnetbyname_r", default_src, name, ne, buffer, buflen, &ret_errno, h_errorp); - return ((rval == NS_SUCCESS) ? 0 : -1); + if (rval != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } int @@ -388,13 +392,17 @@ getnetbyaddr_r(uint32_t addr, int af, st #endif { 0 } }; - int rval, ret_errno; + int rval, ret_errno = 0; rval = _nsdispatch((void *)result, dtab, NSDB_NETWORKS, "getnetbyaddr_r", default_src, addr, af, ne, buffer, buflen, &ret_errno, h_errorp); - return ((rval == NS_SUCCESS) ? 0 : -1); + if (rval != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } struct netent * Modified: stable/7/lib/libc/net/getproto.c ============================================================================== --- stable/7/lib/libc/net/getproto.c Sat Aug 28 17:06:22 2010 (r211938) +++ stable/7/lib/libc/net/getproto.c Sat Aug 28 17:12:52 2010 (r211939) @@ -33,6 +33,7 @@ static char sccsid[] = "@(#)getproto.c 8 #include __FBSDID("$FreeBSD$"); +#include #include #include #include "netdb_private.h" @@ -72,7 +73,7 @@ files_getprotobynumber(void *retval, voi errnop = va_arg(ap, int *); if ((ped = __protoent_data_init()) == NULL) { - *errnop = -1; + *errnop = errno; return (NS_NOTFOUND); } @@ -83,12 +84,12 @@ files_getprotobynumber(void *retval, voi if (!ped->stayopen) __endprotoent_p(ped); if (error != 0) { - *errnop = -1; + *errnop = errno; return (NS_NOTFOUND); } if (__copy_protoent(&pe, pptr, buffer, buflen) != 0) { - *errnop = -1; - return (NS_NOTFOUND); + *errnop = errno; + return (NS_RETURN); } *((struct protoent **)retval) = pptr; @@ -120,10 +121,11 @@ getprotobynumber_r(int proto, struct pro rv = nsdispatch(result, dtab, NSDB_PROTOCOLS, "getprotobynumber_r", defaultsrc, proto, pptr, buffer, buflen, &ret_errno); - if (rv == NS_SUCCESS) - return (0); - else - return (ret_errno); + if (rv != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } struct protoent * Modified: stable/7/lib/libc/net/getprotoent.c ============================================================================== --- stable/7/lib/libc/net/getprotoent.c Sat Aug 28 17:06:22 2010 (r211938) +++ stable/7/lib/libc/net/getprotoent.c Sat Aug 28 17:12:52 2010 (r211939) @@ -424,8 +424,10 @@ files_getprotoent_r(void *retval, void * buflen = va_arg(ap, size_t); errnop = va_arg(ap, int *); - if ((ped = __protoent_data_init()) == NULL) - return (-1); + if ((ped = __protoent_data_init()) == NULL) { + *errnop = errno; + return (NS_NOTFOUND); + } if (__getprotoent_p(&pe, ped) != 0) { *errnop = errno; @@ -434,7 +436,7 @@ files_getprotoent_r(void *retval, void * if (__copy_protoent(&pe, pptr, buffer, buflen) != 0) { *errnop = errno; - return (NS_NOTFOUND); + return (NS_RETURN); } *((struct protoent **)retval) = pptr; @@ -490,10 +492,11 @@ getprotoent_r(struct protoent *pptr, cha rv = nsdispatch(result, dtab, NSDB_PROTOCOLS, "getprotoent_r", defaultsrc, pptr, buffer, buflen, &ret_errno); - if (rv == NS_SUCCESS) - return (0); - else - return (ret_errno); + if (rv != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } void Modified: stable/7/lib/libc/net/getprotoname.c ============================================================================== --- stable/7/lib/libc/net/getprotoname.c Sat Aug 28 17:06:22 2010 (r211938) +++ stable/7/lib/libc/net/getprotoname.c Sat Aug 28 17:12:52 2010 (r211939) @@ -33,6 +33,7 @@ static char sccsid[] = "@(#)getprotoname #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -75,7 +76,7 @@ files_getprotobyname(void *retval, void if ((ped = __protoent_data_init()) == NULL) { - *errnop = -1; + *errnop = errno; return (NS_NOTFOUND); } @@ -91,12 +92,12 @@ found: if (!ped->stayopen) __endprotoent_p(ped); if (error != 0) { - *errnop = -1; + *errnop = errno; return (NS_NOTFOUND); } if (__copy_protoent(&pe, pptr, buffer, buflen) != 0) { - *errnop = -1; - return (NS_NOTFOUND); + *errnop = errno; + return (NS_RETURN); } *((struct protoent **)retval) = pptr; @@ -128,10 +129,11 @@ getprotobyname_r(const char *name, struc rv = nsdispatch(result, dtab, NSDB_PROTOCOLS, "getprotobyname_r", defaultsrc, name, pptr, buffer, buflen, &ret_errno); - if (rv == NS_SUCCESS) - return (0); - else - return (ret_errno); + if (rv != NS_SUCCESS) { + errno = ret_errno; + return ((ret_errno != 0) ? ret_errno : -1); + } + return (0); } struct protoent * From owner-svn-src-stable@FreeBSD.ORG Sat Aug 28 17:52:53 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F170106566C; Sat, 28 Aug 2010 17:52:53 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73A548FC0A; Sat, 28 Aug 2010 17:52:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7SHqrt2038925; Sat, 28 Aug 2010 17:52:53 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7SHqrpm038924; Sat, 28 Aug 2010 17:52:53 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201008281752.o7SHqrpm038924@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 28 Aug 2010 17:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211942 - in stable/8/lib/libc: . locale stdtime sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 17:52:53 -0000 Author: ume Date: Sat Aug 28 17:52:53 2010 New Revision: 211942 URL: http://svn.freebsd.org/changeset/base/211942 Log: Record mergeinfo for r211276. Modified: Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Sat Aug 28 17:54:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0308D1065697; Sat, 28 Aug 2010 17:54:18 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC3CE8FC1E; Sat, 28 Aug 2010 17:54:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7SHsHes039001; Sat, 28 Aug 2010 17:54:17 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7SHsHKv039000; Sat, 28 Aug 2010 17:54:17 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201008281754.o7SHsHKv039000@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sat, 28 Aug 2010 17:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211943 - in stable/7/lib/libc: . stdtime X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2010 17:54:18 -0000 Author: ume Date: Sat Aug 28 17:54:17 2010 New Revision: 211943 URL: http://svn.freebsd.org/changeset/base/211943 Log: Record mergeinfo for r211276. Modified: Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed)