CVS commit: src/sys/arch/powerpc/ibm4xx
Module Name:src Committed By: matt Date: Mon Feb 7 07:02:24 UTC 2011 Modified Files: src/sys/arch/powerpc/ibm4xx: pmap.c Log Message: Use EVCNT_ATTACH_STATIC To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/powerpc/ibm4xx/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/ibm4xx/pmap.c diff -u src/sys/arch/powerpc/ibm4xx/pmap.c:1.65 src/sys/arch/powerpc/ibm4xx/pmap.c:1.66 --- src/sys/arch/powerpc/ibm4xx/pmap.c:1.65 Fri Jan 14 02:06:29 2011 +++ src/sys/arch/powerpc/ibm4xx/pmap.c Mon Feb 7 07:02:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.65 2011/01/14 02:06:29 rmind Exp $ */ +/* $NetBSD: pmap.c,v 1.66 2011/02/07 07:02:24 matt Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.65 2011/01/14 02:06:29 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.66 2011/02/07 07:02:24 matt Exp $"); #include #include @@ -126,6 +126,10 @@ NULL, "cpu", "tlbflush"); struct evcnt tlbenter_ev = EVCNT_INITIALIZER(EVCNT_TYPE_TRAP, NULL, "cpu", "tlbenter"); +EVCNT_ATTACH_STATIC(tlbmiss_ev); +EVCNT_ATTACH_STATIC(tlbhit_ev); +EVCNT_ATTACH_STATIC(tlbflush_ev); +EVCNT_ATTACH_STATIC(tlbenter_ev); struct pmap kernel_pmap_; struct pmap *const kernel_pmap_ptr = &kernel_pmap_; @@ -412,11 +416,6 @@ pmap_kernel()->pm_ctx = KERNEL_PID; nextavail = avail->start; - evcnt_attach_static(&tlbmiss_ev); - evcnt_attach_static(&tlbhit_ev); - evcnt_attach_static(&tlbflush_ev); - evcnt_attach_static(&tlbenter_ev); - pmap_bootstrap_done = 1; }
CVS commit: src/sys/arch/powerpc/booke
Module Name:src Committed By: matt Date: Mon Feb 7 06:41:08 UTC 2011 Modified Files: src/sys/arch/powerpc/booke: trap.c Log Message: Fix inverted test. cpu_setmcontext should return success. :) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/booke/trap.c diff -u src/sys/arch/powerpc/booke/trap.c:1.2 src/sys/arch/powerpc/booke/trap.c:1.3 --- src/sys/arch/powerpc/booke/trap.c:1.2 Tue Jan 18 01:02:52 2011 +++ src/sys/arch/powerpc/booke/trap.c Mon Feb 7 06:41:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.2 2011/01/18 01:02:52 matt Exp $ */ +/* $NetBSD: trap.c,v 1.3 2011/02/07 06:41:08 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -39,7 +39,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.2 2011/01/18 01:02:52 matt Exp $"); +__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.3 2011/02/07 06:41:08 matt Exp $"); #include #include @@ -847,7 +847,7 @@ struct lwp * const l = curlwp; int error = cpu_setmcontext(l, &uc->uc_mcontext, uc->uc_flags); - KASSERT(error); + KASSERT(error == 0); (void)error; kmem_free(uc, sizeof(ucontext_t)); upcallret(l);
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Mon Feb 7 06:37:01 UTC 2011 Modified Files: src/sys/arch/powerpc/include: asm.h Log Message: binutils is automagically doing securecrt so make sure plt calls are emitted with the secureplt magic as well. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/powerpc/include/asm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/include/asm.h diff -u src/sys/arch/powerpc/include/asm.h:1.35 src/sys/arch/powerpc/include/asm.h:1.36 --- src/sys/arch/powerpc/include/asm.h:1.35 Sun Jan 23 15:51:07 2011 +++ src/sys/arch/powerpc/include/asm.h Mon Feb 7 06:37:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.35 2011/01/23 15:51:07 matt Exp $ */ +/* $NetBSD: asm.h,v 1.36 2011/02/07 06:37:01 matt Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -45,7 +45,7 @@ #ifdef PIC #define PIC_PROLOGUE XXX #define PIC_EPILOGUE XXX -#define PIC_PLT(x) x@plt +#define PIC_PLT(x) x+32768@plt #ifdef __STDC__ #define PIC_TOCNAME(name) .LCTOC_##name #else
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: jmcneill Date: Mon Feb 7 04:05:49 UTC 2011 Modified Files: src/sys/arch/i386/conf: GENERIC Log Message: options SPLASHSCREEN_PROGRESS is no more To generate a diff of this commit: cvs rdiff -u -r1.1009 -r1.1010 src/sys/arch/i386/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1009 src/sys/arch/i386/conf/GENERIC:1.1010 --- src/sys/arch/i386/conf/GENERIC:1.1009 Wed Jan 26 18:48:12 2011 +++ src/sys/arch/i386/conf/GENERIC Mon Feb 7 04:05:49 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1009 2011/01/26 18:48:12 bouyer Exp $ +# $NetBSD: GENERIC,v 1.1010 2011/02/07 04:05:49 jmcneill Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.1009 $" +#ident "GENERIC-$Revision: 1.1010 $" maxusers 64 # estimated number of users @@ -304,7 +304,6 @@ #options VGA_RASTERCONSOLE # enable splash screen support; requires genfb or radeonfb #options SPLASHSCREEN -#options SPLASHSCREEN_PROGRESS # Keylock support #options KEYLOCK
CVS commit: src/sys
Module Name:src Committed By: chs Date: Mon Feb 7 03:54:46 UTC 2011 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c src/sys/arch/amd64/include: segments.h src/sys/compat/linux32/arch/amd64: linux32_machdep.c Log Message: move macros for validating fs/gs to segments.h and use them in the linux32 code as well. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/arch/amd64/amd64/netbsd32_machdep.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amd64/include/segments.h cvs rdiff -u -r1.27 -r1.28 \ src/sys/compat/linux32/arch/amd64/linux32_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.69 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.70 --- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.69 Wed Jan 26 21:44:31 2011 +++ src/sys/arch/amd64/amd64/netbsd32_machdep.c Mon Feb 7 03:54:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.69 2011/01/26 21:44:31 njoly Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.70 2011/02/07 03:54:45 chs Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.69 2011/01/26 21:44:31 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.70 2011/02/07 03:54:45 chs Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -953,11 +953,6 @@ * These functions perform the needed checks. */ -#define VALID_FS32(s) \ -(((s) & 0x) == GSEL(GUFS_SEL, SEL_UPL)) -#define VALID_GS32(s) \ -(((s) & 0x) == GSEL(GUGS_SEL, SEL_UPL)) - static int check_sigcontext32(struct lwp *l, const struct netbsd32_sigcontext *scp) { @@ -971,10 +966,10 @@ !VALID_USER_CSEL32(scp->sc_cs)) return EINVAL; if (scp->sc_fs != 0 && !VALID_USER_DSEL32(scp->sc_fs) && - !(VALID_FS32(scp->sc_fs) && pcb->pcb_fs != 0)) + !(VALID_USER_FSEL32(scp->sc_fs) && pcb->pcb_fs != 0)) return EINVAL; if (scp->sc_gs != 0 && !VALID_USER_DSEL32(scp->sc_gs) && - !(VALID_GS32(scp->sc_gs) && pcb->pcb_gs != 0)) + !(VALID_USER_GSEL32(scp->sc_gs) && pcb->pcb_gs != 0)) return EINVAL; if (scp->sc_es != 0 && !VALID_USER_DSEL32(scp->sc_es)) return EINVAL; @@ -1000,10 +995,10 @@ !VALID_USER_CSEL32(gr[_REG32_CS])) return EINVAL; if (gr[_REG32_FS] != 0 && !VALID_USER_DSEL32(gr[_REG32_FS]) && - !(VALID_FS32(gr[_REG32_FS]) && pcb->pcb_fs != 0)) + !(VALID_USER_FSEL32(gr[_REG32_FS]) && pcb->pcb_fs != 0)) return EINVAL; if (gr[_REG32_GS] != 0 && !VALID_USER_DSEL32(gr[_REG32_GS]) && - !(VALID_GS32(gr[_REG32_GS]) && pcb->pcb_gs != 0)) + !(VALID_USER_GSEL32(gr[_REG32_GS]) && pcb->pcb_gs != 0)) return EINVAL; if (gr[_REG32_ES] != 0 && !VALID_USER_DSEL32(gr[_REG32_ES])) return EINVAL; Index: src/sys/arch/amd64/include/segments.h diff -u src/sys/arch/amd64/include/segments.h:1.21 src/sys/arch/amd64/include/segments.h:1.22 --- src/sys/arch/amd64/include/segments.h:1.21 Sun Sep 5 20:14:40 2010 +++ src/sys/arch/amd64/include/segments.h Mon Feb 7 03:54:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: segments.h,v 1.21 2010/09/05 20:14:40 chs Exp $ */ +/* $NetBSD: segments.h,v 1.22 2011/02/07 03:54:45 chs Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -397,6 +397,10 @@ ((s) & 0x) == LSEL(LUDATA32_SEL, SEL_UPL)) #define VALID_USER_CSEL32(s) \ ((s) == GSEL(GUCODE32_SEL, SEL_UPL) || (s) == LSEL(LUCODE32_SEL, SEL_UPL)) +#define VALID_USER_FSEL32(s) \ +(((s) & 0x) == GSEL(GUFS_SEL, SEL_UPL)) +#define VALID_USER_GSEL32(s) \ +(((s) & 0x) == GSEL(GUGS_SEL, SEL_UPL)) #define VALID_USER_CSEL(s) \ ((s) == GSEL(GUCODE_SEL, SEL_UPL) || (s) == LSEL(LUCODE_SEL, SEL_UPL)) Index: src/sys/compat/linux32/arch/amd64/linux32_machdep.c diff -u src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.27 src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.28 --- src/sys/compat/linux32/arch/amd64/linux32_machdep.c:1.27 Tue Nov 2 18:14:06 2010 +++ src/sys/compat/linux32/arch/amd64/linux32_machdep.c Mon Feb 7 03:54:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_machdep.c,v 1.27 2010/11/02 18:14:06 chs Exp $ */ +/* $NetBSD: linux32_machdep.c,v 1.28 2011/02/07 03:54:45 chs Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -31,7 +31,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.27 2010/11/02 18:14:06 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.28 2011/02/07 03:54:45 chs Exp $"); #include #include @@ -433,11 +433,11 @@ return EINVAL; if (scp->sc_fs != 0 && !VALID_USER_DSEL32(scp->sc_fs) && - !(scp->sc_fs == GSEL(GUFS_SEL, SEL_UPL) && pcb->pcb_fs != 0)) + !(VALID_USER_FSEL32(scp->sc_fs) && pcb->pcb_fs != 0)) return EINVAL;
CVS commit: src/sys/dev/pud
Module Name:src Committed By: jakllsch Date: Mon Feb 7 03:14:28 UTC 2011 Modified Files: src/sys/dev/pud: pud.c Log Message: Third argument of MODULE() is typically a string literal. Moreover it (at least sometimes) didn't build otherwise. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pud/pud.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pud/pud.c diff -u src/sys/dev/pud/pud.c:1.9 src/sys/dev/pud/pud.c:1.10 --- src/sys/dev/pud/pud.c:1.9 Fri Jan 28 23:54:28 2011 +++ src/sys/dev/pud/pud.c Mon Feb 7 03:14:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pud.c,v 1.9 2011/01/28 23:54:28 haad Exp $ */ +/* $NetBSD: pud.c,v 1.10 2011/02/07 03:14:28 jakllsch Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pud.c,v 1.9 2011/01/28 23:54:28 haad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pud.c,v 1.10 2011/02/07 03:14:28 jakllsch Exp $"); #include #include @@ -383,7 +383,7 @@ mutex_init(&pud_mtx, MUTEX_DEFAULT, IPL_NONE); } -MODULE(MODULE_CLASS_DRIVER, pud, putter); +MODULE(MODULE_CLASS_DRIVER, pud, "putter"); static int pud_modcmd(modcmd_t cmd, void *arg)
CVS commit: src/sys/fs/hfs
Module Name:src Committed By: jakllsch Date: Mon Feb 7 03:03:16 UTC 2011 Modified Files: src/sys/fs/hfs: hfs_vnops.c Log Message: Make this build. Also, the previous commit contanined "unintended" functional changes I'm going to ignore. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/fs/hfs/hfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/hfs/hfs_vnops.c diff -u src/sys/fs/hfs/hfs_vnops.c:1.19 src/sys/fs/hfs/hfs_vnops.c:1.20 --- src/sys/fs/hfs/hfs_vnops.c:1.19 Mon Feb 7 02:06:20 2011 +++ src/sys/fs/hfs/hfs_vnops.c Mon Feb 7 03:03:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hfs_vnops.c,v 1.19 2011/02/07 02:06:20 christos Exp $ */ +/* $NetBSD: hfs_vnops.c,v 1.20 2011/02/07 03:03:16 jakllsch Exp $ */ /*- * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hfs_vnops.c,v 1.19 2011/02/07 02:06:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hfs_vnops.c,v 1.20 2011/02/07 03:03:16 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_ipsec.h" @@ -993,8 +993,10 @@ free(childnames, M_TEMP); } - if (error) + if (error) { DPRINTF(("ERROR = %i\n", error)); + } + return error; }
CVS commit: src/sys/dev/splash
Module Name:src Committed By: jmcneill Date: Mon Feb 7 02:57:49 UTC 2011 Modified Files: src/sys/dev/splash: splash.c Log Message: %d -> %zd for size_t printf format To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/splash/splash.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/splash/splash.c diff -u src/sys/dev/splash/splash.c:1.9 src/sys/dev/splash/splash.c:1.10 --- src/sys/dev/splash/splash.c:1.9 Sun Feb 6 23:25:18 2011 +++ src/sys/dev/splash/splash.c Mon Feb 7 02:57:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: splash.c,v 1.9 2011/02/06 23:25:18 jmcneill Exp $ */ +/* $NetBSD: splash.c,v 1.10 2011/02/07 02:57:49 jmcneill Exp $ */ /*- * Copyright (c) 2006 Jared D. McNeill @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: splash.c,v 1.9 2011/02/06 23:25:18 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: splash.c,v 1.10 2011/02/07 02:57:49 jmcneill Exp $"); #include "opt_splash.h" @@ -151,7 +151,7 @@ return EBUSY; } - aprint_verbose("%s: splash image @ %p, %d bytes\n", + aprint_verbose("%s: splash image @ %p, %zd bytes\n", __func__, imgdata, imgdatalen); splash_image.data = imgdata; splash_image.datalen = imgdatalen;
CVS commit: src/sys/fs/hfs
Module Name:src Committed By: christos Date: Mon Feb 7 02:06:21 UTC 2011 Modified Files: src/sys/fs/hfs: hfs_vnops.c Log Message: KNF, no functional changes intended. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/fs/hfs/hfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/hfs/hfs_vnops.c diff -u src/sys/fs/hfs/hfs_vnops.c:1.18 src/sys/fs/hfs/hfs_vnops.c:1.19 --- src/sys/fs/hfs/hfs_vnops.c:1.18 Thu Jun 24 09:03:09 2010 +++ src/sys/fs/hfs/hfs_vnops.c Sun Feb 6 21:06:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hfs_vnops.c,v 1.18 2010/06/24 13:03:09 hannken Exp $ */ +/* $NetBSD: hfs_vnops.c,v 1.19 2011/02/07 02:06:20 christos Exp $ */ /*- * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hfs_vnops.c,v 1.18 2010/06/24 13:03:09 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hfs_vnops.c,v 1.19 2011/02/07 02:06:20 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_ipsec.h" @@ -131,18 +131,24 @@ #include -int hfs_vop_lookup (void *); -int hfs_vop_open (void *); -int hfs_vop_close (void *); -int hfs_vop_access (void *); -int hfs_vop_getattr (void *); -int hfs_vop_setattr (void *); -int hfs_vop_bmap (void *); -int hfs_vop_read (void *); -int hfs_vop_readdir (void *); -int hfs_vop_readlink (void *); -int hfs_vop_reclaim (void *); -int hfs_vop_print (void *); +int hfs_vop_lookup(void *); +int hfs_vop_open(void *); +int hfs_vop_close(void *); +int hfs_vop_access(void *); +int hfs_vop_getattr(void *); +int hfs_vop_setattr(void *); +int hfs_vop_bmap(void *); +int hfs_vop_read(void *); +int hfs_vop_readdir(void *); +int hfs_vop_readlink(void *); +int hfs_vop_reclaim(void *); +int hfs_vop_print(void *); + +#ifdef HFS_DEBUG +#define DPRINTF(a) printf a +#else +#define DPRINTF(a) +#endif int (**hfs_vnodeop_p) (void *); @@ -155,8 +161,8 @@ { &vop_open_desc, hfs_vop_open }, /* open */ { &vop_close_desc, hfs_vop_close }, /* close */ { &vop_access_desc, hfs_vop_access }, /* access */ - { &vop_getattr_desc, hfs_vop_getattr }, /* getattr */ - { &vop_setattr_desc, hfs_vop_setattr }, /* setattr */ + { &vop_getattr_desc, hfs_vop_getattr }, /* getattr */ + { &vop_setattr_desc, hfs_vop_setattr }, /* setattr */ { &vop_read_desc, hfs_vop_read }, /* read */ { &vop_write_desc, genfs_eopnotsupp }, /* write */ { &vop_ioctl_desc, genfs_eopnotsupp }, /* ioctl */ @@ -173,11 +179,11 @@ { &vop_mkdir_desc, genfs_eopnotsupp }, /* mkdir */ { &vop_rmdir_desc, genfs_eopnotsupp }, /* rmdir */ { &vop_symlink_desc, genfs_eopnotsupp }, /* symlink */ - { &vop_readdir_desc, hfs_vop_readdir }, /* readdir */ + { &vop_readdir_desc, hfs_vop_readdir }, /* readdir */ { &vop_readlink_desc, hfs_vop_readlink }, /* readlink */ { &vop_abortop_desc, genfs_abortop }, /* abortop */ { &vop_inactive_desc, genfs_eopnotsupp }, /* inactive */ - { &vop_reclaim_desc, hfs_vop_reclaim }, /* reclaim */ + { &vop_reclaim_desc, hfs_vop_reclaim }, /* reclaim */ { &vop_lock_desc, genfs_lock }, /* lock */ { &vop_unlock_desc, genfs_unlock }, /* unlock */ { &vop_bmap_desc, hfs_vop_bmap }, /* bmap */ @@ -209,8 +215,8 @@ { &vop_open_desc, spec_open }, /* open */ { &vop_close_desc, spec_close }, /* close */ { &vop_access_desc, hfs_vop_access }, /* access */ - { &vop_getattr_desc, hfs_vop_getattr }, /* getattr */ - { &vop_setattr_desc, hfs_vop_setattr }, /* setattr */ + { &vop_getattr_desc, hfs_vop_getattr }, /* getattr */ + { &vop_setattr_desc, hfs_vop_setattr }, /* setattr */ { &vop_read_desc, spec_read }, /* read */ { &vop_write_desc, spec_write }, /* write */ { &vop_ioctl_desc, spec_ioctl }, /* ioctl */ @@ -231,7 +237,7 @@ { &vop_readlink_desc, spec_readlink }, /* readlink */ { &vop_abortop_desc, spec_abortop }, /* abortop */ { &vop_inactive_desc, genfs_eopnotsupp }, /* inactive */ - { &vop_reclaim_desc, hfs_vop_reclaim }, /* reclaim */ + { &vop_reclaim_desc, hfs_vop_reclaim }, /* reclaim */ { &vop_lock_desc, genfs_lock }, /* lock */ { &vop_unlock_desc, genfs_unlock }, /* unlock */ { &vop_bmap_desc, spec_bmap }, /* bmap */ @@ -333,11 +339,9 @@ const char *pname; int error; int flags; - int result;/* result of libhfs operations */ + int result; /* result of libhfs operations */ -#ifdef HFS_DEBUG - printf("VOP = hfs_vop_lookup()\n"); -#endif /* HFS_DEBUG */ + DPRINTF(("VOP = hfs_vop_lookup()\n")); bp = NULL; cnp = ap->a_cnp; @@ -372,28 +376,34 @@ * we are looking for is known already. */ /* XXX Cache disabled until we can make sure it works. */ -/* if ((error = cache_lookup(vdp, vpp, cnp)) >= 0) - return error; */ +#if 0 + if ((error = cache_lookup(vdp, vpp, cnp)) >= 0) + return error; +#endif -/* if (cnp->cn_namelen == 1 && *pname == '.') { +#if 0 + if (cnp->cn_namelen == 1 && *pname == '.') { *vpp = vdp; vref(vdp); -
CVS commit: src/usr.sbin/fwctl
Module Name:src Committed By: dholland Date: Mon Feb 7 01:37:12 UTC 2011 Modified Files: src/usr.sbin/fwctl: fwdv.c Log Message: Fix typo, from Henning Petersen in PR 44513. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/fwctl/fwdv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/fwctl/fwdv.c diff -u src/usr.sbin/fwctl/fwdv.c:1.6 src/usr.sbin/fwctl/fwdv.c:1.7 --- src/usr.sbin/fwctl/fwdv.c:1.6 Tue Jan 4 20:45:13 2011 +++ src/usr.sbin/fwctl/fwdv.c Mon Feb 7 01:37:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: fwdv.c,v 1.6 2011/01/04 20:45:13 christos Exp $ */ +/* $NetBSD: fwdv.c,v 1.7 2011/02/07 01:37:12 dholland Exp $ */ /* * Copyright (C) 2003 * Hidetoshi Shimokawa. All rights reserved. @@ -149,7 +149,7 @@ continue; } else err(EXIT_FAILURE, "%s: read failed", - __fnc__); + __func__); } tlen += len; if ((RBUFSIZE - tlen) < PSIZE)
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: christos Date: Mon Feb 7 00:26:27 UTC 2011 Modified Files: src/usr.bin/xlint/lint1: mkops Log Message: provide __arraycount() if not there. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/lint1/mkops Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/mkops diff -u src/usr.bin/xlint/lint1/mkops:1.6 src/usr.bin/xlint/lint1/mkops:1.7 --- src/usr.bin/xlint/lint1/mkops:1.6 Sun Feb 6 18:03:02 2011 +++ src/usr.bin/xlint/lint1/mkops Sun Feb 6 19:26:27 2011 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: mkops,v 1.6 2011/02/06 23:03:02 pooka Exp $ +# $NetBSD: mkops,v 1.7 2011/02/07 00:26:27 christos Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -67,6 +67,9 @@ printf("#include \n"); printf("#include \"op.h\"\n"); printf("#include \"param.h\"\n"); + printf("#ifndef __arraycount\n"); + printf("#define __arraycount(a) (sizeof(a) / sizeof(a[0]))\n"); + printf("#endif /* __arraycount */\n"); printf("mod_t modtab[NOPS];\n"); printf("static const struct {\n"); printf("\tmod_t\tm;\n");
CVS commit: src/sys
Module Name:src Committed By: jmcneill Date: Sun Feb 6 23:25:18 UTC 2011 Modified Files: src/sys/arch/amd64/conf: GENERIC src/sys/arch/evbarm/conf: MPCSA_GENERIC src/sys/arch/evbppc/conf: VIRTEX_DFC src/sys/arch/evbppc/virtex/dev: tft.c tftvar.h src/sys/arch/x86/x86: x86_machdep.c src/sys/dev/pci: radeonfb.c radeonfbvar.h src/sys/dev/splash: files.splash splash.c splash.h src/sys/dev/wsfb: genfb.c src/sys/kern: subr_autoconf.c Removed Files: src/sys/dev/splash/images: bikeshed.h netbsd-small.h netbsd.h Log Message: - add support for using compressed images as splash images - retire SPLASHSCREEN_PROGRESS and SPLASHSCREEN_IMAGE options To generate a diff of this commit: cvs rdiff -u -r1.300 -r1.301 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/MPCSA_GENERIC cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbppc/conf/VIRTEX_DFC cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbppc/virtex/dev/tft.c \ src/sys/arch/evbppc/virtex/dev/tftvar.h cvs rdiff -u -r1.44 -r1.45 src/sys/arch/x86/x86/x86_machdep.c cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/radeonfb.c cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/radeonfbvar.h cvs rdiff -u -r1.2 -r1.3 src/sys/dev/splash/files.splash cvs rdiff -u -r1.8 -r1.9 src/sys/dev/splash/splash.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/splash/splash.h cvs rdiff -u -r1.1 -r0 src/sys/dev/splash/images/bikeshed.h \ src/sys/dev/splash/images/netbsd-small.h \ src/sys/dev/splash/images/netbsd.h cvs rdiff -u -r1.32 -r1.33 src/sys/dev/wsfb/genfb.c cvs rdiff -u -r1.212 -r1.213 src/sys/kern/subr_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.300 src/sys/arch/amd64/conf/GENERIC:1.301 --- src/sys/arch/amd64/conf/GENERIC:1.300 Wed Jan 26 00:25:55 2011 +++ src/sys/arch/amd64/conf/GENERIC Sun Feb 6 23:25:16 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.300 2011/01/26 00:25:55 pooka Exp $ +# $NetBSD: GENERIC,v 1.301 2011/02/06 23:25:16 jmcneill Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.300 $" +#ident "GENERIC-$Revision: 1.301 $" maxusers 64 # estimated number of users @@ -245,7 +245,6 @@ #options VGA_RASTERCONSOLE # enable splash screen support; requires genfb or radeonfb #optionsSPLASHSCREEN -#optionsSPLASHSCREEN_PROGRESS # Kernel root file system and dump configuration. config netbsd root on ? type ? Index: src/sys/arch/evbarm/conf/MPCSA_GENERIC diff -u src/sys/arch/evbarm/conf/MPCSA_GENERIC:1.17 src/sys/arch/evbarm/conf/MPCSA_GENERIC:1.18 --- src/sys/arch/evbarm/conf/MPCSA_GENERIC:1.17 Tue Nov 23 11:13:56 2010 +++ src/sys/arch/evbarm/conf/MPCSA_GENERIC Sun Feb 6 23:25:16 2011 @@ -1,4 +1,4 @@ -# $NetBSD: MPCSA_GENERIC,v 1.17 2010/11/23 11:13:56 hannken Exp $ +# $NetBSD: MPCSA_GENERIC,v 1.18 2011/02/06 23:25:16 jmcneill Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.17 $" +#ident "GENERIC-$Revision: 1.18 $" maxusers 32 # estimated number of users @@ -250,7 +250,6 @@ #options VGA_RASTERCONSOLE # enable splash screen support; requires hw driver support #options SPLASHSCREEN -#options SPLASHSCREEN_PROGRESS # Kernel root file system and dump configuration. #config netbsd root on sd0c type ffs Index: src/sys/arch/evbppc/conf/VIRTEX_DFC diff -u src/sys/arch/evbppc/conf/VIRTEX_DFC:1.11 src/sys/arch/evbppc/conf/VIRTEX_DFC:1.12 --- src/sys/arch/evbppc/conf/VIRTEX_DFC:1.11 Tue Nov 23 11:13:57 2010 +++ src/sys/arch/evbppc/conf/VIRTEX_DFC Sun Feb 6 23:25:17 2011 @@ -1,4 +1,4 @@ -# $NetBSD: VIRTEX_DFC,v 1.11 2010/11/23 11:13:57 hannken Exp $ +# $NetBSD: VIRTEX_DFC,v 1.12 2011/02/06 23:25:17 jmcneill Exp $ # # VIRTEX_DFC # @@ -145,8 +145,6 @@ #options WSDISPLAY_DEFAULTSCREENS=4 options FONT_VT220L8x16 #options SPLASHSCREEN -#options SPLASHSCREEN_PROGRESS -#options SPLASHSCREEN_IMAGE="\"dev/splash/images/netbsd-small.h\"" # Kernel root file system and dump configuration. #config netbsd root on ? type ? Index: src/sys/arch/evbppc/virtex/dev/tft.c diff -u src/sys/arch/evbppc/virtex/dev/tft.c:1.2 src/sys/arch/evbppc/virtex/dev/tft.c:1.3 --- src/sys/arch/evbppc/virtex/dev/tft.c:1.2 Sun Mar 4 05:59:46 2007 +++ src/sys/arch/evbppc/virtex/dev/tft.c Sun Feb 6 23:25:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tft.c,v 1.2 2007/03/04 05:59:46 christos Exp $ */ +/* $NetBSD: tft.c,v 1.3 2011/02/06 23:25:17 jmcneill Exp $ */ /* * Copyright (c) 2006 Jachym Holecek @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tft.c,v 1.2 2007/03/04 05:59:46 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tft.c,v 1.
CVS commit: src/sys/arch/i386/stand
Module Name:src Committed By: jmcneill Date: Sun Feb 6 23:16:05 UTC 2011 Modified Files: src/sys/arch/i386/stand/boot: boot2.c version src/sys/arch/i386/stand/lib: bootmod.h exec.c libi386.h Log Message: add support for passing image files to the kernel with the 'splash' keyword: vesa on;splash /netbsd.jpg;boot -z To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/i386/stand/boot/boot2.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/stand/boot/version cvs rdiff -u -r1.3 -r1.4 src/sys/arch/i386/stand/lib/bootmod.h cvs rdiff -u -r1.45 -r1.46 src/sys/arch/i386/stand/lib/exec.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/i386/stand/lib/libi386.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/boot/boot2.c diff -u src/sys/arch/i386/stand/boot/boot2.c:1.51 src/sys/arch/i386/stand/boot/boot2.c:1.52 --- src/sys/arch/i386/stand/boot/boot2.c:1.51 Wed Jan 5 23:13:01 2011 +++ src/sys/arch/i386/stand/boot/boot2.c Sun Feb 6 23:16:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: boot2.c,v 1.51 2011/01/05 23:13:01 jakllsch Exp $ */ +/* $NetBSD: boot2.c,v 1.52 2011/02/06 23:16:05 jmcneill Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -135,6 +135,7 @@ { "load", module_add }, { "multiboot", command_multiboot }, { "vesa", command_vesa }, + { "splash", splash_add }, { NULL, NULL }, }; Index: src/sys/arch/i386/stand/boot/version diff -u src/sys/arch/i386/stand/boot/version:1.13 src/sys/arch/i386/stand/boot/version:1.14 --- src/sys/arch/i386/stand/boot/version:1.13 Wed Jan 5 23:13:01 2011 +++ src/sys/arch/i386/stand/boot/version Sun Feb 6 23:16:05 2011 @@ -1,4 +1,4 @@ -$NetBSD: version,v 1.13 2011/01/05 23:13:01 jakllsch Exp $ +$NetBSD: version,v 1.14 2011/02/06 23:16:05 jmcneill Exp $ NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this file is important - make sure the entries are appended on end, last item @@ -45,3 +45,4 @@ 5.5: Adjust stack and heap areas to not overlap. 5.6: GUID Partition Table support. 5.7: Recognize 64-bit LBA from bootxx. +5.8: Support for splash images. Index: src/sys/arch/i386/stand/lib/bootmod.h diff -u src/sys/arch/i386/stand/lib/bootmod.h:1.3 src/sys/arch/i386/stand/lib/bootmod.h:1.4 --- src/sys/arch/i386/stand/lib/bootmod.h:1.3 Mon May 5 00:12:49 2008 +++ src/sys/arch/i386/stand/lib/bootmod.h Sun Feb 6 23:16:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bootmod.h,v 1.3 2008/05/05 00:12:49 jmcneill Exp $ */ +/* $NetBSD: bootmod.h,v 1.4 2011/02/06 23:16:05 jmcneill Exp $ */ /*- * Copyright (c) 2008 Jared D. McNeill @@ -32,6 +32,9 @@ typedef struct boot_module { char *bm_path; ssize_t bm_len; + uint8_t bm_type; +#define BM_TYPE_KMOD 0x00 +#define BM_TYPE_IMAGE 0x01 struct boot_module *bm_next; } boot_module_t; Index: src/sys/arch/i386/stand/lib/exec.c diff -u src/sys/arch/i386/stand/lib/exec.c:1.45 src/sys/arch/i386/stand/lib/exec.c:1.46 --- src/sys/arch/i386/stand/lib/exec.c:1.45 Sat Oct 30 08:12:43 2010 +++ src/sys/arch/i386/stand/lib/exec.c Sun Feb 6 23:16:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: exec.c,v 1.45 2010/10/30 08:12:43 jnemeth Exp $ */ +/* $NetBSD: exec.c,v 1.46 2011/02/06 23:16:05 jmcneill Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -135,6 +135,7 @@ static int howto; static void module_init(const char *); +static void module_add_common(char *, uint8_t); void framebuffer_configure(struct btinfo_framebuffer *fb) @@ -150,6 +151,18 @@ void module_add(char *name) { + return module_add_common(name, BM_TYPE_KMOD); +} + +void +splash_add(char *name) +{ + return module_add_common(name, BM_TYPE_IMAGE); +} + +static void +module_add_common(char *name, uint8_t type) +{ boot_module_t *bm, *bmp; size_t len; char *str; @@ -167,6 +180,7 @@ memcpy(str, name, len); bm->bm_path = str; bm->bm_next = NULL; + bm->bm_type = type; if (boot_modules == NULL) boot_modules = bm; else { @@ -509,7 +523,8 @@ strncpy(bi->path, bm->bm_path, sizeof(bi->path) - 1); bi->base = image_end; bi->len = len; - bi->type = BI_MODULE_ELF; + bi->type = bm->bm_type == BM_TYPE_KMOD ? + BI_MODULE_ELF : BI_MODULE_IMAGE; if ((howto & AB_SILENT) == 0) printf(" \n"); } Index: src/sys/arch/i386/stand/lib/libi386.h diff -u src/sys/arch/i386/stand/lib/libi386.h:1.33 src/sys/arch/i386/stand/lib/libi386.h:1.34 --- src/sys/arch/i386/stand/lib/libi386.h:1.33 Fri Jun 25 15:35:08 2010 +++ src/sys/arch/i386/stand/lib/libi386.h Sun Feb 6 23:16:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: libi386.h,v 1.33 2010/06/25 15:35:08 tsutsui Exp $ */ +/* $NetBSD: libi386.h,v 1.34 2011/02/06 23:16:05 jmcneill Exp $ */ /* * Copyright (c) 1996 @@ -137,6 +137,7 @@ extern int doserrno; /* in dos_file.S */ void module_add(char *); +void splash_add(char *); struct btinfo_framebuffer; void framebuffer_configure(struct btinfo_fr
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: jmcneill Date: Sun Feb 6 23:14:04 UTC 2011 Modified Files: src/sys/arch/x86/include: bootinfo.h Log Message: add BI_MODULE_IMAGE boot module type To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x86/include/bootinfo.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/bootinfo.h diff -u src/sys/arch/x86/include/bootinfo.h:1.16 src/sys/arch/x86/include/bootinfo.h:1.17 --- src/sys/arch/x86/include/bootinfo.h:1.16 Mon Aug 24 02:15:46 2009 +++ src/sys/arch/x86/include/bootinfo.h Sun Feb 6 23:14:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.h,v 1.16 2009/08/24 02:15:46 jmcneill Exp $ */ +/* $NetBSD: bootinfo.h,v 1.17 2011/02/06 23:14:04 jmcneill Exp $ */ /* * Copyright (c) 1997 @@ -173,6 +173,7 @@ }; #define BI_MODULE_NONE 0x00 #define BI_MODULE_ELF 0x01 +#define BI_MODULE_IMAGE 0x02 struct btinfo_modulelist { struct btinfo_common common;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: njoly Date: Sun Feb 6 23:11:54 UTC 2011 Modified Files: src/sys/dev/usb: usbdevs.h usbdevs_data.h Log Message: Regen for MPMan. To generate a diff of this commit: cvs rdiff -u -r1.570 -r1.571 src/sys/dev/usb/usbdevs.h cvs rdiff -u -r1.571 -r1.572 src/sys/dev/usb/usbdevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbdevs.h diff -u src/sys/dev/usb/usbdevs.h:1.570 src/sys/dev/usb/usbdevs.h:1.571 --- src/sys/dev/usb/usbdevs.h:1.570 Sat Jan 29 14:18:24 2011 +++ src/sys/dev/usb/usbdevs.h Sun Feb 6 23:11:54 2011 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs.h,v 1.570 2011/01/29 14:18:24 tsutsui Exp $ */ +/* $NetBSD: usbdevs.h,v 1.571 2011/02/06 23:11:54 njoly Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.577 2011/01/29 14:17:44 tsutsui Exp + * NetBSD: usbdevs,v 1.578 2011/02/06 23:11:11 njoly Exp */ /* @@ -516,6 +516,7 @@ #define USB_VENDOR_QUALCOMMINC 0x19d2 /* Qualcomm, Incorporated */ #define USB_VENDOR_QUANTA 0x1a32 /* Quanta */ #define USB_VENDOR_WINCHIPHEAD2 0x1a86 /* QinHeng Electronics */ +#define USB_VENDOR_MPMAN 0x1cae /* MPMan */ #define USB_VENDOR_PEGATRON 0x1d4d /* Pegatron */ #define USB_VENDOR_AIRTIES 0x1eda /* AirTies */ #define USB_VENDOR_DLINK 0x2001 /* D-Link */ Index: src/sys/dev/usb/usbdevs_data.h diff -u src/sys/dev/usb/usbdevs_data.h:1.571 src/sys/dev/usb/usbdevs_data.h:1.572 --- src/sys/dev/usb/usbdevs_data.h:1.571 Sat Jan 29 14:18:24 2011 +++ src/sys/dev/usb/usbdevs_data.h Sun Feb 6 23:11:54 2011 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs_data.h,v 1.571 2011/01/29 14:18:24 tsutsui Exp $ */ +/* $NetBSD: usbdevs_data.h,v 1.572 2011/02/06 23:11:54 njoly Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.577 2011/01/29 14:17:44 tsutsui Exp + * NetBSD: usbdevs,v 1.578 2011/02/06 23:11:11 njoly Exp */ /* @@ -1843,6 +1843,10 @@ "QinHeng Electronics", }, { + USB_VENDOR_MPMAN, + "MPMan", + }, + { USB_VENDOR_PEGATRON, "Pegatron", }, @@ -1999,7 +2003,7 @@ "GNU Radio USRP", }, }; -const int usb_nvendors = 490; +const int usb_nvendors = 491; const struct usb_product usb_products[] = { {
CVS commit: src/sys/dev/usb
Module Name:src Committed By: njoly Date: Sun Feb 6 23:11:11 UTC 2011 Modified Files: src/sys/dev/usb: usbdevs Log Message: Add MPMan to the vendor list. To generate a diff of this commit: cvs rdiff -u -r1.577 -r1.578 src/sys/dev/usb/usbdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.577 src/sys/dev/usb/usbdevs:1.578 --- src/sys/dev/usb/usbdevs:1.577 Sat Jan 29 14:17:44 2011 +++ src/sys/dev/usb/usbdevs Sun Feb 6 23:11:11 2011 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.577 2011/01/29 14:17:44 tsutsui Exp $ +$NetBSD: usbdevs,v 1.578 2011/02/06 23:11:11 njoly Exp $ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -509,6 +509,7 @@ vendor QUALCOMMINC 0x19d2 Qualcomm, Incorporated vendor QUANTA 0x1a32 Quanta vendor WINCHIPHEAD2 0x1a86 QinHeng Electronics +vendor MPMAN 0x1cae MPMan vendor PEGATRON 0x1d4d Pegatron vendor AIRTIES 0x1eda AirTies vendor DLINK 0x2001 D-Link
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: pooka Date: Sun Feb 6 23:03:02 UTC 2011 Modified Files: src/usr.bin/xlint/lint1: mkops Log Message: don't use __arraycount in tools To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/xlint/lint1/mkops Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/mkops diff -u src/usr.bin/xlint/lint1/mkops:1.5 src/usr.bin/xlint/lint1/mkops:1.6 --- src/usr.bin/xlint/lint1/mkops:1.5 Sun Feb 6 18:28:22 2011 +++ src/usr.bin/xlint/lint1/mkops Sun Feb 6 23:03:02 2011 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: mkops,v 1.5 2011/02/06 18:28:22 christos Exp $ +# $NetBSD: mkops,v 1.6 2011/02/06 23:03:02 pooka Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -119,7 +119,7 @@ printf("{\n"); printf("\tsize_t i;\n"); printf("\n"); - printf("\tfor (i = 0; i < __arraycount(imods); i++)\n"); + printf("\tfor (i=0; i
CVS commit: [bouyer-quota2] src/usr.sbin/edquota
Module Name:src Committed By: bouyer Date: Sun Feb 6 22:18:38 UTC 2011 Modified Files: src/usr.sbin/edquota [bouyer-quota2]: edquota.8 edquota.c Log Message: Fix usage(). Document new behavior and options. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.12.50.1 src/usr.sbin/edquota/edquota.8 cvs rdiff -u -r1.29.16.8 -r1.29.16.9 src/usr.sbin/edquota/edquota.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/edquota/edquota.8 diff -u src/usr.sbin/edquota/edquota.8:1.12 src/usr.sbin/edquota/edquota.8:1.12.50.1 --- src/usr.sbin/edquota/edquota.8:1.12 Thu Aug 7 11:25:20 2003 +++ src/usr.sbin/edquota/edquota.8 Sun Feb 6 22:18:38 2011 @@ -29,9 +29,9 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)edquota.8 8.2 (Berkeley) 4/27/95 -.\" $NetBSD: edquota.8,v 1.12 2003/08/07 11:25:20 agc Exp $ +.\" $NetBSD: edquota.8,v 1.12.50.1 2011/02/06 22:18:38 bouyer Exp $ .\" -.Dd December 4, 2002 +.Dd February 6, 2011 .Dt EDQUOTA 8 .Os .Sh NAME @@ -39,35 +39,41 @@ .Nd edit user quotas .Sh SYNOPSIS .Nm +.Op Fl D +.Op Fl H .Op Fl u .Op Fl f Ar filesystem .Op Fl p Ar proto-username +.Ar -d | .Ar username ... .Nm +.Op Fl D +.Op Fl H .Fl g .Op Fl f Ar filesystem .Op Fl p Ar proto-groupname +.Ar -d | .Ar groupname ... .Nm +.Op Fl D +.Op Fl H .Op Fl u .Op Fl f Ar filesystem .Op Fl h Ar block#/inode# .Op Fl s Ar block#/inode# +.Op Fl t Ar block grace time/inode grace time +.Ar -d | .Ar username ... .Nm +.Op Fl D +.Op Fl H .Fl g .Op Fl f Ar filesystem .Op Fl h Ar block#/inode# .Op Fl s Ar block#/inode# +.Op Fl t Ar block grace time/inode grace time +.Ar -d | .Ar groupname ... -.Nm -.Op Fl u -.Op Fl f Ar filesystem -.Fl t -.Nm -.Fl g -.Op Fl f Ar filesystem -.Fl t .Sh DESCRIPTION .Nm is a quota editor. @@ -76,13 +82,12 @@ flag is specified, one or more users may be specified on the command line. Unless -.Fl h -or +.Fl h, .Fl s +or +.Fl t are used, a temporary file is created for each user with an ASCII -representation of the current disk quotas for that user. -The list of filesystems with user quotas is determined from -.Pa /etc/fstab . +representation of the current disk quotas and grace time for that user. By default, quota for all quota-enabled filesystems are edited; the .Fl f option can be used to restrict it to a single filesystem. @@ -94,21 +99,35 @@ specifies otherwise. .Pp The quotas may then be modified, new quotas added, etc. -Setting a quota to zero indicates that no quota should be imposed. -Setting a hard limit to one indicates that no allocations should -be permitted. -Setting a soft limit to one with a hard limit of zero -indicates that allocations should be permitted on -only a temporary basis (see -.Fl t -below). +Setting a quota to - or unlimited indicates that no quota should be imposed. +Setting a quota to zero indicates that no allocation is permited. +Setting a soft limit to zero with a unlimited hard limit +indicates that allocations should be permitted on only a temporary basis. The current usage information in the file is for informational purposes; -only the hard and soft limits can be changed. +only the hard and soft limits, and grace time can be changed. +.Pp +Users are permitted to exceed their soft limits +for a grace period that may be specified per user (or per-filesystem +for quota version 1). +Once the grace period has expired, +the soft limit is enforced as a hard limit. +The default grace period is one week. +.Pp +By default, disk quotas are in KB, grace time in seconds. +Disk and inodes quota can be entered with a +.Xr humanize_number 9 +suffix (K for kilo, M for mega, G for giga, T for tera). +Time can be entered with Y (year), W (week), D (day), H (hour) and M (minute) +suffixes. Suffixes can be mixed (see EXAMPLES below). +If the +.Fl H +option if used, current quota, disk usage and time are displayed in +a human-readable format. .Pp On leaving the editor, .Nm -reads the temporary file and modifies the binary -quota files to reflect the changes made. +reads the temporary file and modifies the on-disk quotas +to reflect the changes made. .Pp If the .Fl p @@ -116,15 +135,17 @@ .Nm will duplicate the quotas of the prototypical user specified for each user specified. -This is the normal mechanism used to initialize quotas for groups of users. .Pp The -.Fl h -and +.Fl h , .Fl s -flags can be used to change quota limits (hard and soft, respectively) -without user interaction, for usage in e.g. batch scripts. -The arguments are the new block and inode number limit, separated by a slash. +and +.Fl t +flags can be used to change quota limits (hard, soft and grace time, +respectively) without user interaction, for usage in e.g. batch scripts. +The arguments are the new block and inode number limit or grace time, +separated by a slash. Units suffix may be used, as in the editor +above. .Pp If the .Fl g @@ -132,54 +15
CVS commit: src/sbin/wsconsctl
Module Name:src Committed By: pooka Date: Sun Feb 6 21:38:10 UTC 2011 Modified Files: src/sbin/wsconsctl: util.c Log Message: update macro names to match new ones (i don't know why they changed, just fixing the build) To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sbin/wsconsctl/util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/wsconsctl/util.c diff -u src/sbin/wsconsctl/util.c:1.28 src/sbin/wsconsctl/util.c:1.29 --- src/sbin/wsconsctl/util.c:1.28 Mon Apr 6 12:35:20 2009 +++ src/sbin/wsconsctl/util.c Sun Feb 6 21:38:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.28 2009/04/06 12:35:20 lukem Exp $ */ +/* $NetBSD: util.c,v 1.29 2011/02/06 21:38:09 pooka Exp $ */ /*- * Copyright (c) 1998, 2006 The NetBSD Foundation, Inc. @@ -118,12 +118,12 @@ { WSDISPLAY_TYPE_SB_P9100, "sparcbook-p9100" }, { WSDISPLAY_TYPE_EGA, "ega" }, { WSDISPLAY_TYPE_DCPVR, "dreamcast-pvr" }, - { WSDISPLAY_TYPE_GATOR, "hp-gator" }, + { WSDISPLAY_TYPE_GBOX, "hp-gator" }, { WSDISPLAY_TYPE_TOPCAT, "hp-topcat" }, - { WSDISPLAY_TYPE_RENAISSANCE, "hp-renaissance" }, + { WSDISPLAY_TYPE_RBOX, "hp-renaissance" }, { WSDISPLAY_TYPE_CATSEYE, "hp-catseye" }, - { WSDISPLAY_TYPE_DAVINCI, "hp-davinci" }, - { WSDISPLAY_TYPE_TIGER, "hp-tiger" }, + { WSDISPLAY_TYPE_DVBOX, "hp-davinci" }, + { WSDISPLAY_TYPE_TVRX, "hp-tiger" }, { WSDISPLAY_TYPE_HYPERION, "hp-hyperion" }, { WSDISPLAY_TYPE_AMIGACC, "amiga-cc" }, { WSDISPLAY_TYPE_SUN24, "sun24" },
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Sun Feb 6 21:05:53 UTC 2011 Modified Files: src/lib/librumpuser: rumpuser.c Log Message: Support query of the partition size in case underlying device is a wedge. This still lacks the proplibistic query of the sector size and just assumes 512. It's good that we make asking a file's size as simple as requiring one stat(), one open() and three (3) different ioctls plus some proplist mumbojumbo. I'm surprised it's available at all by means other than #wish. code mostly from Taylor R Campbell, rant from me. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/librumpuser/rumpuser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.14 src/lib/librumpuser/rumpuser.c:1.15 --- src/lib/librumpuser/rumpuser.c:1.14 Sat Jan 22 14:22:10 2011 +++ src/lib/librumpuser/rumpuser.c Sun Feb 6 21:05:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.14 2011/01/22 14:22:10 pooka Exp $ */ +/* $NetBSD: rumpuser.c,v 1.15 2011/02/06 21:05:53 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: rumpuser.c,v 1.14 2011/01/22 14:22:10 pooka Exp $"); +__RCSID("$NetBSD: rumpuser.c,v 1.15 2011/02/06 21:05:53 pooka Exp $"); #endif /* !lint */ /* thank the maker for this */ @@ -45,7 +45,9 @@ #include #ifdef __NetBSD__ +#include #include +#include #include #endif @@ -147,6 +149,7 @@ #else struct disklabel lab; struct partition *parta; + struct dkwedge_info dkw; fd = open(path, O_RDONLY); if (fd == -1) { @@ -155,14 +158,26 @@ goto out; } - if (ioctl(fd, DIOCGDINFO, &lab) == -1) { - seterror(errno); - rv = -1; + if (ioctl(fd, DIOCGDINFO, &lab) == 0) { + parta = &lab.d_partitions[DISKPART(sb.st_rdev)]; + size = (uint64_t)lab.d_secsize * parta->p_size; goto out; } - parta = &lab.d_partitions[DISKPART(sb.st_rdev)]; - size = (uint64_t)lab.d_secsize * parta->p_size; + if (ioctl(fd, DIOCGWEDGEINFO, &dkw) == 0) { + /* + * XXX: should use DIOCGDISKINFO to query + * sector size, but that requires proplib, + * so just don't bother for now. it's nice + * that something as difficult as figuring out + * a partition's size has been made so easy. + */ + size = dkw.dkw_size << DEV_BSHIFT; + goto out; + } + + seterror(errno); + rv = -1; #endif /* __NetBSD__ */ }
CVS commit: src/share/mk
Module Name:src Committed By: jmmv Date: Sun Feb 6 19:38:48 UTC 2011 Modified Files: src/share/mk: bsd.test.mk Log Message: Fix the 'test' target to force atf to use its own files from DESTDIR instead of the installed ones. This is achieved by overriding all ATF_* environment variables and making them point inside DESTDIR. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/share/mk/bsd.test.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.test.mk diff -u src/share/mk/bsd.test.mk:1.13 src/share/mk/bsd.test.mk:1.14 --- src/share/mk/bsd.test.mk:1.13 Mon Aug 23 16:03:03 2010 +++ src/share/mk/bsd.test.mk Sun Feb 6 19:38:48 2011 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.test.mk,v 1.13 2010/08/23 16:03:03 joerg Exp $ +# $NetBSD: bsd.test.mk,v 1.14 2011/02/06 19:38:48 jmmv Exp $ # .include @@ -99,6 +99,15 @@ TESTS_PATH += ${DESTDIR}/bin ${DESTDIR}/sbin ${DESTDIR}/usr/bin ${DESTDIR}/usr/sbin TESTS_LD_LIBRARY_PATH += ${DESTDIR}/lib ${DESTDIR}/usr/lib +TESTS_ENV += ATF_BUILD_CC=${DESTDIR}/usr/bin/cc +TESTS_ENV += ATF_BUILD_CPP=${DESTDIR}/usr/bin/cpp +TESTS_ENV += ATF_BUILD_CXX=${DESTDIR}/usr/bin/c++ +TESTS_ENV += ATF_CONFDIR=${DESTDIR}/etc +TESTS_ENV += ATF_INCLUDEDIR=${DESTDIR}/usr/include +TESTS_ENV += ATF_LIBDIR=${DESTDIR}/usr/lib +TESTS_ENV += ATF_LIBEXECDIR=${DESTDIR}/usr/libexec +TESTS_ENV += ATF_PKGDATADIR=${DESTDIR}/usr/share/atf +TESTS_ENV += ATF_SHELL=${DESTDIR}/bin/sh TESTS_ENV += LD_LIBRARY_PATH=${TESTS_LD_LIBRARY_PATH:tW:S/ /:/g} TESTS_ENV += PATH=${TESTS_PATH:tW:S/ /:/g}
CVS commit: src/external/bsd/atf/lib/libatf-c++
Module Name:src Committed By: jmmv Date: Sun Feb 6 19:34:20 UTC 2011 Modified Files: src/external/bsd/atf/lib/libatf-c++: Makefile Log Message: Add missing DPADD on libatf-c.a. Spotted by Garrett Cooper. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/atf/lib/libatf-c++/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/atf/lib/libatf-c++/Makefile diff -u src/external/bsd/atf/lib/libatf-c++/Makefile:1.6 src/external/bsd/atf/lib/libatf-c++/Makefile:1.7 --- src/external/bsd/atf/lib/libatf-c++/Makefile:1.6 Sun Nov 7 17:46:46 2010 +++ src/external/bsd/atf/lib/libatf-c++/Makefile Sun Feb 6 19:34:20 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2010/11/07 17:46:46 jmmv Exp $ +# $NetBSD: Makefile,v 1.7 2011/02/06 19:34:20 jmmv Exp $ NOLINT= # defined @@ -6,6 +6,7 @@ LIB= atf-c++ LDADD= -L${.OBJDIR}/../libatf-c -latf-c +DPADD= libatf-c.a NOPIC= # defined; interface is still too unstable SRCDIR= ${NETBSDSRCDIR}/external/bsd/atf/dist
CVS commit: [bouyer-quota2] src/usr.sbin/edquota
Module Name:src Committed By: bouyer Date: Sun Feb 6 19:24:20 UTC 2011 Modified Files: src/usr.sbin/edquota [bouyer-quota2]: edquota.c Log Message: Change format to print the quota version for each filesystem in editor. For version 1, have '-d' edit the filesystem's grace times. To generate a diff of this commit: cvs rdiff -u -r1.29.16.7 -r1.29.16.8 src/usr.sbin/edquota/edquota.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/edquota/edquota.c diff -u src/usr.sbin/edquota/edquota.c:1.29.16.7 src/usr.sbin/edquota/edquota.c:1.29.16.8 --- src/usr.sbin/edquota/edquota.c:1.29.16.7 Thu Feb 3 15:53:25 2011 +++ src/usr.sbin/edquota/edquota.c Sun Feb 6 19:24:20 2011 @@ -1,5 +1,4 @@ -/* $NetBSD: edquota.c,v 1.29.16.7 2011/02/03 15:53:25 bouyer Exp $ */ - +/* $NetBSD: edquota.c,v 1.29.16.8 2011/02/06 19:24:20 bouyer Exp $ */ /* * Copyright (c) 1980, 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -42,7 +41,7 @@ #if 0 static char sccsid[] = "from: @(#)edquota.c 8.3 (Berkeley) 4/27/95"; #else -__RCSID("$NetBSD: edquota.c,v 1.29.16.7 2011/02/03 15:53:25 bouyer Exp $"); +__RCSID("$NetBSD: edquota.c,v 1.29.16.8 2011/02/06 19:24:20 bouyer Exp $"); #endif #endif /* not lint */ @@ -110,8 +109,6 @@ int readprivs(struct quotause *, int); int writetimes(struct quotause *, int, int); int readtimes(struct quotause *, int); -char * cvtstoa(time_t); -int cvtatos(time_t, char *, time_t *); void freeq(struct quotause *); void freeprivs(struct quotause *); int alldigits(const char *); @@ -288,17 +285,6 @@ } tmpfd = mkstemp(tmpfil); fchown(tmpfd, getuid(), getgid()); - if (0 /* XXX */) { - if (soft || hard) - usage(); - protoprivs = getprivs(0, quotatype, fs, 0); - if (writetimes(protoprivs, tmpfd, quotatype) == 0) - exit(1); - if (editit(tmpfil) && readtimes(protoprivs, tmpfd)) - putprivs(0, quotatype, protoprivs); - freeprivs(protoprivs); - exit(0); - } if (dflag) { curprivs = getprivs(0, quotatype, fs, 1); if (writeprivs(curprivs, tmpfd, NULL, quotatype) && @@ -696,30 +682,44 @@ qfextension[quotatype], name); } for (qup = quplist; qup; qup = qup->next) { - fprintf(fd, "%s: %s %s, limits (soft = %s, hard = %s", - qup->fsname, "blocks in use:", - intprt(qup->q2e.q2e_val[QL_BLOCK].q2v_cur, - HN_NOSPACE | HN_B, Hflag, 20), - intprt(qup->q2e.q2e_val[QL_BLOCK].q2v_softlimit, - HN_NOSPACE | HN_B, Hflag, 20), - intprt(qup->q2e.q2e_val[QL_BLOCK].q2v_hardlimit, - HN_NOSPACE | HN_B, Hflag, 20)); + fprintf(fd, "%s (version %d):\n", + qup->fsname, (qup->flags & QUOTA2) ? 2 : 1); + if ((qup->flags & DEFAULT) == 0 || (qup->flags & QUOTA2) != 0) { + fprintf(fd, "\tblocks in use: %s, " + "limits (soft = %s, hard = %s", + intprt(qup->q2e.q2e_val[QL_BLOCK].q2v_cur, +HN_NOSPACE | HN_B, Hflag, 20), + intprt(qup->q2e.q2e_val[QL_BLOCK].q2v_softlimit, +HN_NOSPACE | HN_B, Hflag, 20), + intprt(qup->q2e.q2e_val[QL_BLOCK].q2v_hardlimit, +HN_NOSPACE | HN_B, Hflag, 20)); + if (qup->flags & QUOTA2) +fprintf(fd, ", "); + } else + fprintf(fd, "\tblocks: ("); + if (qup->flags & (QUOTA2|DEFAULT)) { - fprintf(fd, ", grace = %s", + fprintf(fd, "grace = %s", timepprt(qup->q2e.q2e_val[QL_BLOCK].q2v_grace, Hflag, 20)); } fprintf(fd, ")\n"); - fprintf(fd, "%s %s, limits (soft = %s, hard = %s", - "\tinodes in use:", - intprt(qup->q2e.q2e_val[QL_FILE].q2v_cur, - HN_NOSPACE, Hflag, 20), - intprt(qup->q2e.q2e_val[QL_FILE].q2v_softlimit, - HN_NOSPACE, Hflag, 20), - intprt(qup->q2e.q2e_val[QL_FILE].q2v_hardlimit, - HN_NOSPACE, Hflag, 20)); + if ((qup->flags & DEFAULT) == 0 || (qup->flags & QUOTA2) != 0) { + fprintf(fd, "\tinodes in use: %s, " + "limits (soft = %s, hard = %s", + intprt(qup->q2e.q2e_val[QL_FILE].q2v_cur, +HN_NOSPACE, Hflag, 20), + intprt(qup->q2e.q2e_val[QL_FILE].q2v_softlimit, +HN_NOSPACE, Hflag, 20), + intprt(qup->q2e.q2e_val[QL_FILE].q2v_hardlimit, + HN_NOSPACE, Hflag, 20)); + if (qup->flags & QUOTA2) +fprintf(fd, ", "); + } else + fprintf(fd, "\tinodes: ("); + if (qup->flags & (QUOTA2|DEFAULT)) { - fprintf(fd, ", grace = %s", + fprintf(fd, "grace = %s", timepprt(qup->q2e.q2e_val[QL_FILE].q2v_grace, Hflag, 20)); } @@ -740,13 +740,13 @@ struct quotause *qup; FILE *fd; int cnt; - char *cp; - char *fsp; - static char line1[BUFSIZ], line2[BUFSIZ]; + char fsp[BUFSIZ]; + static char line0[BUFSIZ], line1[BUFSIZ], line2[BUFSIZ]; static char scurb[BUFSIZ], scuri[BUFSIZ], ssoft[BUFSIZ], shard[BUFSIZ]; static char stime[BUFSIZ]; uint64_t softb, hardb, softi, hardi; time_t graceb = -1, gracei = -1; + int version; (void)lseek(infd, (off_t)0, SEEK_SET); fd = fdopen(dup(infd), "r"); @@ -758,111 +758,159 @@
CVS commit: src/sys/netinet6
Module Name:src Committed By: dyoung Date: Sun Feb 6 19:12:55 UTC 2011 Modified Files: src/sys/netinet6: in6.c Log Message: Delete unnecessary casts to void *. No functional change intended. Same assembly generated before and after this change. To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/sys/netinet6/in6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/in6.c diff -u src/sys/netinet6/in6.c:1.156 src/sys/netinet6/in6.c:1.157 --- src/sys/netinet6/in6.c:1.156 Thu Apr 22 20:05:15 2010 +++ src/sys/netinet6/in6.c Sun Feb 6 19:12:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.156 2010/04/22 20:05:15 dyoung Exp $ */ +/* $NetBSD: in6.c,v 1.157 2011/02/06 19:12:55 dyoung Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.156 2010/04/22 20:05:15 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.157 2011/02/06 19:12:55 dyoung Exp $"); #include "opt_inet.h" #include "opt_pfil_hooks.h" @@ -965,7 +965,7 @@ M_NOWAIT); if (ia == NULL) return ENOBUFS; - memset((void *)ia, 0, sizeof(*ia)); + memset(ia, 0, sizeof(*ia)); LIST_INIT(&ia->ia6_memberships); /* Initialize the address and masks, and put time stamp */ ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr; @@ -1607,7 +1607,7 @@ ifra.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME; ifra.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; ifra.ifra_flags = iflr->flags & ~IFLR_PREFIX; - return in6_control(so, SIOCAIFADDR_IN6, (void *)&ifra, ifp, l); + return in6_control(so, SIOCAIFADDR_IN6, &ifra, ifp, l); } case SIOCGLIFADDR: case SIOCDLIFADDR: @@ -1718,8 +1718,7 @@ ia->ia_prefixmask.sin6_len); ifra.ifra_flags = ia->ia6_flags; - return in6_control(so, SIOCDIFADDR_IN6, (void *)&ifra, - ifp, l); + return in6_control(so, SIOCDIFADDR_IN6, &ifra, ifp, l); } } }
CVS commit: src/libexec/httpd
Module Name:src Committed By: pooka Date: Sun Feb 6 19:00:54 UTC 2011 Modified Files: src/libexec/httpd: daemon-bozo.c Log Message: Call daemon() later to make sure there is a listening socket by the time the foreground process exits. discussed with mrg. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/libexec/httpd/daemon-bozo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/daemon-bozo.c diff -u src/libexec/httpd/daemon-bozo.c:1.11 src/libexec/httpd/daemon-bozo.c:1.12 --- src/libexec/httpd/daemon-bozo.c:1.11 Tue Jun 22 05:24:12 2010 +++ src/libexec/httpd/daemon-bozo.c Sun Feb 6 19:00:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: daemon-bozo.c,v 1.11 2010/06/22 05:24:12 mrg Exp $ */ +/* $NetBSD: daemon-bozo.c,v 1.12 2011/02/06 19:00:53 pooka Exp $ */ /* $eterna: daemon-bozo.c,v 1.22 2010/06/21 06:45:45 mrg Exp $ */ @@ -79,12 +79,7 @@ if (!httpd->background) return; - if (httpd->foreground == 0) - daemon(1, 0); - portnum = (httpd->bindport) ? httpd->bindport : "http"; - bozo_warn(httpd, "started in daemon mode as `%s' port `%s' root `%s'", - httpd->virthostname, portnum, httpd->slashdir); memset(&h, 0, sizeof(h)); h.ai_family = PF_UNSPEC; @@ -121,6 +116,12 @@ httpd->nsock = i; freeaddrinfo(r0); + if (httpd->foreground == 0) + daemon(1, 0); + + bozo_warn(httpd, "started in daemon mode as `%s' port `%s' root `%s'", + httpd->virthostname, portnum, httpd->slashdir); + signal(SIGCHLD, sigchild); }
CVS commit: src/sys/netbt
Module Name:src Committed By: plunky Date: Sun Feb 6 18:51:00 UTC 2011 Modified Files: src/sys/netbt: l2cap.h l2cap_signal.c Log Message: respond to L2CAP Information requests To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/netbt/l2cap.h cvs rdiff -u -r1.11 -r1.12 src/sys/netbt/l2cap_signal.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netbt/l2cap.h diff -u src/sys/netbt/l2cap.h:1.9 src/sys/netbt/l2cap.h:1.10 --- src/sys/netbt/l2cap.h:1.9 Sun Sep 13 18:45:11 2009 +++ src/sys/netbt/l2cap.h Sun Feb 6 18:50:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: l2cap.h,v 1.9 2009/09/13 18:45:11 pooka Exp $ */ +/* $NetBSD: l2cap.h,v 1.10 2011/02/06 18:50:59 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -54,7 +54,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: l2cap.h,v 1.9 2009/09/13 18:45:11 pooka Exp $ + * $Id: l2cap.h,v 1.10 2011/02/06 18:50:59 plunky Exp $ * $FreeBSD: src/sys/netgraph/bluetooth/include/l2cap.h,v 1.4 2005/08/31 18:13:23 emax Exp $ */ @@ -166,7 +166,8 @@ /* L2CAP Information request type codes */ #define L2CAP_CONNLESS_MTU 0x0001 #define L2CAP_EXTENDED_FEATURES 0x0002 -/* 0x0003 - 0x - reserved for future use */ +#define L2CAP_FIXED_CHANNELS 0x0003 +/* 0x0004 - 0x - reserved for future use */ /* L2CAP Information response codes */ #define L2CAP_NOT_SUPPORTED 0x0001 @@ -320,17 +321,9 @@ uint16_t type; /* requested information type */ uint16_t result; /* 0x00 - success */ /* uint8_t info[] -- info data (depends on type) - * - * L2CAP_CONNLESS_MTU - 2 bytes connectionless MTU */ } __packed l2cap_info_rsp_cp; -typedef union { - /* L2CAP_CONNLESS_MTU */ - struct { - uint16_t mtu; - } __packed mtu; -} l2cap_info_rsp_data_t; /** ** Index: src/sys/netbt/l2cap_signal.c diff -u src/sys/netbt/l2cap_signal.c:1.11 src/sys/netbt/l2cap_signal.c:1.12 --- src/sys/netbt/l2cap_signal.c:1.11 Wed Nov 17 20:19:25 2010 +++ src/sys/netbt/l2cap_signal.c Sun Feb 6 18:51:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: l2cap_signal.c,v 1.11 2010/11/17 20:19:25 plunky Exp $ */ +/* $NetBSD: l2cap_signal.c,v 1.12 2011/02/06 18:51:00 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: l2cap_signal.c,v 1.11 2010/11/17 20:19:25 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: l2cap_signal.c,v 1.12 2011/02/06 18:51:00 plunky Exp $"); #include #include @@ -857,15 +857,14 @@ } /* - * Process Received Info Request. We must respond but alas dont - * support anything as yet so thats easy. + * Process Received Info Request. */ static void l2cap_recv_info_req(struct mbuf *m, struct hci_link *link) { l2cap_cmd_hdr_t cmd; l2cap_info_req_cp cp; - l2cap_info_rsp_cp rp; + uint8_t rsp[12]; m_copydata(m, 0, sizeof(cmd), &cmd); m_adj(m, sizeof(cmd)); @@ -873,15 +872,51 @@ m_copydata(m, 0, sizeof(cp), &cp); m_adj(m, sizeof(cp)); - switch(le16toh(cp.type)) { - case L2CAP_CONNLESS_MTU: + cp.type = le16toh(cp.type); + switch(cp.type) { case L2CAP_EXTENDED_FEATURES: - default: - rp.type = cp.type; - rp.result = htole16(L2CAP_NOT_SUPPORTED); + /* + * 32-bit data field, unused bits set to zero + * + * octet bit feature + * 0 0 Flow control mode + * 0 1 Retransmission mode + * 0 2 Bi-directional QoS + * 0 3 Enhanced retransmission mode + * 0 4 Streaming mode + * 0 5 FCS option + * 0 6 Extended flow specification for BR/EDR + * 0 7 Fixed channels (SET) + * 1 0 Extended window size + * 1 1 Unicast connectionless data reception + */ + le16enc(rsp + 0, cp.type); + le16enc(rsp + 2, L2CAP_SUCCESS); + le32enc(rsp + 4, 0x0080); + l2cap_send_signal(link, L2CAP_INFO_RSP, cmd.ident, 8, rsp); + break; - l2cap_send_signal(link, L2CAP_INFO_RSP, cmd.ident, - sizeof(rp), &rp); + case L2CAP_FIXED_CHANNELS: + /* + * 64-bit data field, unused bits set to zero + * + * octet bit channel + * 0 0 0x Null + * 0 1 0x0001 L2CAP Signalling Channel (SET) + * 0 2 0x0002 Connectionless Reception + * 0 3 0x0003 AMP Manager Protocol Channel + */ + le16enc(rsp + 0, cp.type); + le16enc(rsp + 2, L2CAP_SUCCESS); + le64enc(rsp + 4, 0x0002); + l2cap_send_signal(link, L2CAP_INFO_RSP, cmd.ident, 12, rsp); + break; + + case L2CAP_CONNLESS_MTU: + default: + le16enc(rsp + 0, cp.type); + le16enc(rsp + 2, L2CAP_NOT_SUPPORTED); + l2cap_send_signal(link, L2CAP_INFO_RSP, cmd.ident, 4, rsp); break; } }
CVS commit: src
Module Name:src Committed By: pooka Date: Sun Feb 6 18:47:56 UTC 2011 Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.tests Log Message: librumphijack build infra To generate a diff of this commit: cvs rdiff -u -r1.242 -r1.243 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.24 -r1.25 src/etc/mtree/NetBSD.dist.tests Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.242 src/distrib/sets/lists/tests/mi:1.243 --- src/distrib/sets/lists/tests/mi:1.242 Thu Feb 3 15:39:50 2011 +++ src/distrib/sets/lists/tests/mi Sun Feb 6 18:47:55 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.242 2011/02/03 15:39:50 pooka Exp $ +# $NetBSD: mi,v 1.243 2011/02/06 18:47:55 pooka Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -469,6 +469,8 @@ ./usr/libdata/debug/usr/tests/lib/libpthread/t_status.debug tests-lib-tests debug,atf ./usr/libdata/debug/usr/tests/lib/librt tests-lib-debug ./usr/libdata/debug/usr/tests/lib/librt/t_sem.debug tests-lib-debug debug,atf +./usr/libdata/debug/usr/tests/lib/librumphijack tests-lib-debug +./usr/libdata/debug/usr/tests/lib/librumphijack/h_netget.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libskeytests-lib-debug ./usr/libdata/debug/usr/tests/lib/libskey/t_algorithms.debug tests-lib-debug debug,atf,skey ./usr/libdata/debug/usr/tests/lib/libutiltests-lib-debug @@ -1892,6 +1894,12 @@ ./usr/tests/lib/librttests-lib-tests atf ./usr/tests/lib/librt/Atffile tests-lib-tests atf ./usr/tests/lib/librt/t_sem tests-lib-tests atf +./usr/tests/lib/librumphijack tests-lib-tests atf +./usr/tests/lib/librumphijack/Atffile tests-lib-tests atf +./usr/tests/lib/librumphijack/h_netget tests-lib-tests atf +./usr/tests/lib/librumphijack/index.html tests-lib-tests atf +./usr/tests/lib/librumphijack/netstat.expout tests-lib-tests atf +./usr/tests/lib/librumphijack/t_tcpip tests-lib-tests atf ./usr/tests/lib/libskeytests-lib-tests atf ./usr/tests/lib/libskey/Atffile tests-lib-tests atf,skey ./usr/tests/lib/libskey/t_algorithms tests-lib-tests atf,skey Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.24 src/etc/mtree/NetBSD.dist.tests:1.25 --- src/etc/mtree/NetBSD.dist.tests:1.24 Thu Feb 3 15:39:50 2011 +++ src/etc/mtree/NetBSD.dist.tests Sun Feb 6 18:47:55 2011 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.24 2011/02/03 15:39:50 pooka Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.25 2011/02/06 18:47:55 pooka Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -75,6 +75,7 @@ ./usr/libdata/debug/usr/tests/lib/libprop ./usr/libdata/debug/usr/tests/lib/libpthread ./usr/libdata/debug/usr/tests/lib/librt +./usr/libdata/debug/usr/tests/lib/librumphijack ./usr/libdata/debug/usr/tests/lib/libskey ./usr/libdata/debug/usr/tests/lib/libutil ./usr/libdata/debug/usr/tests/libexec @@ -186,6 +187,7 @@ ./usr/tests/lib/libprop ./usr/tests/lib/libpthread ./usr/tests/lib/librt +./usr/tests/lib/librumphijack ./usr/tests/lib/libskey ./usr/tests/lib/libutil ./usr/tests/libexec
CVS commit: src/tests/lib
Module Name:src Committed By: pooka Date: Sun Feb 6 18:44:30 UTC 2011 Modified Files: src/tests/lib: Makefile Added Files: src/tests/lib/librumphijack: Atffile Makefile h_netget.c index.html netstat.expout t_tcpip.sh Log Message: Add a simple test for the purpose of making sure rumphijack works on -current in addition to 5.x. The test serves a simple index.html on a hijacked bozohttpd and checks the file can be retrieved. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/lib/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/librumphijack/Atffile \ src/tests/lib/librumphijack/Makefile \ src/tests/lib/librumphijack/h_netget.c \ src/tests/lib/librumphijack/index.html \ src/tests/lib/librumphijack/netstat.expout \ src/tests/lib/librumphijack/t_tcpip.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/Makefile diff -u src/tests/lib/Makefile:1.10 src/tests/lib/Makefile:1.11 --- src/tests/lib/Makefile:1.10 Mon Dec 20 23:47:23 2010 +++ src/tests/lib/Makefile Sun Feb 6 18:44:29 2011 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.10 2010/12/20 23:47:23 pgoyette Exp $ +# $NetBSD: Makefile,v 1.11 2011/02/06 18:44:29 pooka Exp $ .include TESTS_SUBDIRS= csu libc libm libevent libobjc libposix libprop librt \ - libpthread libutil semaphore + libpthread librumphijack libutil semaphore .if ${MKCRYPTO} != "no" TESTS_SUBDIRS+= libdes Added files: Index: src/tests/lib/librumphijack/Atffile diff -u /dev/null src/tests/lib/librumphijack/Atffile:1.1 --- /dev/null Sun Feb 6 18:44:30 2011 +++ src/tests/lib/librumphijack/Atffile Sun Feb 6 18:44:29 2011 @@ -0,0 +1,6 @@ +Content-Type: application/X-atf-atffile; version="1" +X-NetBSD-Id: "$NetBSD: Atffile,v 1.1 2011/02/06 18:44:29 pooka Exp $" + +prop: test-suite = "NetBSD" + +tp-glob: t_* Index: src/tests/lib/librumphijack/Makefile diff -u /dev/null src/tests/lib/librumphijack/Makefile:1.1 --- /dev/null Sun Feb 6 18:44:30 2011 +++ src/tests/lib/librumphijack/Makefile Sun Feb 6 18:44:29 2011 @@ -0,0 +1,16 @@ +# $NetBSD: Makefile,v 1.1 2011/02/06 18:44:29 pooka Exp $ +# + +.include + +TESTSDIR= ${TESTSBASE}/lib/librumphijack + +TESTS_SH= t_tcpip +TESTS_C= h_netget + +FILES= netstat.expout index.html +FILESDIR= ${TESTSDIR} + +ATFFILE= yes + +.include Index: src/tests/lib/librumphijack/h_netget.c diff -u /dev/null src/tests/lib/librumphijack/h_netget.c:1.1 --- /dev/null Sun Feb 6 18:44:30 2011 +++ src/tests/lib/librumphijack/h_netget.c Sun Feb 6 18:44:29 2011 @@ -0,0 +1,101 @@ +/* $NetBSD: h_netget.c,v 1.1 2011/02/06 18:44:29 pooka Exp $ */ + +/*- + * Copyright (c) 2011 Antti Kantee. 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 ``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. + */ + +/* + * simple utility to fetch a webpage. we wouldn't need this + * if we had something like netcat in base + */ + +#include +__RCSID("$NetBSD: h_netget.c,v 1.1 2011/02/06 18:44:29 pooka Exp $"); + +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include + +#define GETSTR "GET / HTTP/1.0\n\n" + +int +main(int argc, char *argv[]) +{ + char buf[8192]; + struct sockaddr_in sin; + ssize_t n; + int s, fd; + + setprogname(argv[0]); + if (argc != 4) { + fprintf(stderr, "usage: %s address port savefile\n", + getprogname()); + exit(1); + } + + s = socket(PF_INET, SOCK_STREAM, 0); + if (s == -1) + err(1, "socket"); + + memset(&sin, 0, sizeof(sin)); + sin.sin_len = sizeof(sin); + sin.sin_family = AF_INET; + sin.sin_port = htons(atoi(argv[2])); + sin.sin_addr.s_addr = inet_addr(argv[1]); + + fd = open(argv[3], O_CREAT | O_RDWR, 0644); + if (fd == -
CVS commit: src/sys/arch/hp300/conf
Module Name:src Committed By: tsutsui Date: Sun Feb 6 18:40:55 UTC 2011 Modified Files: src/sys/arch/hp300/conf: GENERIC Log Message: Switch NetBSD/hp300 to wscons with rasops. Simply ported from OpenBSD/hp300. - Only A1416 Kathmandu (topcat) framebuffer on 425t is tested, but all other variants (TigerShark, Hyperion, DaVinci, GatorBox, Renaissance) should also work if they are working on OpenBSD/hp300. - sti(4) and SGC bus support are not pulled because I don't have 425e and I can't confirm that 362 and 382 actually have SGC bus. (I'll commit a DIO based dumb driver for 362 and 382 framebuffers later) - Xorg server with wsfb driver will also be integrated soon once after keycode with NoSymbol problem is addressed. (We have to re-think what code should be used on WSDISPLAY_COMPAT_RAWKBD) - MI HIL keyboard and mouse drivers are working fine though cngetc via hilkbd has some problem (still we can input commands). - No old HP-UX like HIL ioctl compatibility (we removed COMPAT_HPUX anyway). grfinfo(8) and hilinfo(8) will be removed shortly. Demonstrated on NetBSD booth at Open Source Conference 2011 Kagawa. To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/sys/arch/hp300/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp300/conf/GENERIC diff -u src/sys/arch/hp300/conf/GENERIC:1.160 src/sys/arch/hp300/conf/GENERIC:1.161 --- src/sys/arch/hp300/conf/GENERIC:1.160 Sun Feb 6 06:47:15 2011 +++ src/sys/arch/hp300/conf/GENERIC Sun Feb 6 18:40:55 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.160 2011/02/06 06:47:15 tsutsui Exp $ +# $NetBSD: GENERIC,v 1.161 2011/02/06 18:40:55 tsutsui Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.160 $" +#ident "GENERIC-$Revision: 1.161 $" maxusers 32 # estimated number of users @@ -175,6 +175,15 @@ #options SCSIVERBOSE # Verbose SCSI errors options DIOVERBOSE # recognize "unknown" DIO devices +# workstation console options +options WSEMUL_VT100# VT100 / VT220 emulation +options WSDISPLAY_COMPAT_RAWKBD +options WS_KERNEL_FG=WSCOL_GREEN +#options WS_KERNEL_BG=WSCOL_BLACK + +options FONT_GALLANT12x22 +#options FONT_VT220ISO8x16 + config netbsd root on ? type ? # @@ -186,40 +195,46 @@ intio0 at mainbus0 # internal i/o space dio0 at mainbus0 # DIO/DIO-II bus +# Human Interface Loop devices +hil0 at intio? # HIL controller +hilkbd* at hil? # keyboards +wskbd* at hilkbd? mux 1 +hilms* at hil? # mice, buttons and tablets +wsmouse* at hilms? mux 0 +hilid* at hil? # ID module + rtc* at intio? # real-time clock (not optional) dma* at intio? # DMA controller -hil* at intio? # Human Interface Loop -options UK_KEYBOARD # include United Kingdom HIL keymap -options SE_KEYBOARD # include Swedish HIL keymap frodo* at intio? # Frodo utility chip found on 382, 4xx nhpib* at intio? # slow internal HP-IB # 8250-like serial ports found on Frodo ASIC #dnkbd0 at frodo? offset 0x0 # Domain keyboard flavor +#wskbd* at dnkbd? mux 1 +#wsmouse* at dnkbd? mux 0 com* at frodo? offset ? # tty flavor dvbox* at intio? # Davinci framebuffer dvbox* at dio? scode ? +wsdisplay* at dvbox? gbox* at intio? # Gatorbox framebuffer gbox* at dio? scode ? +wsdisplay* at gbox? hyper* at dio? scode ? # Hyperion framebuffer +wsdisplay* at hyper? rbox* at intio? # Renaissance framebuffer rbox* at dio? scode ? +wsdisplay* at rbox? topcat* at intio? # Topcat/catseye framebuffers topcat* at dio? scode ? +wsdisplay* at topcat? -# Framebuffer abstraction -grf* at dvbox? -grf* at gbox? -grf* at hyper? -grf* at rbox? -grf* at topcat? - -ite* at grf? # Internal Terminal Emulator +tvrx* at dio? scode ? # TurboVRX framebuffer +wsdisplay* at tvrx? com0 at dio0 scode 9 # DCA serial interfaces com* at dio? scode ? @@ -308,6 +323,10 @@ #pseudo-device pflog # PF log if pseudo-device putter # for puffs and pud +# wscons pseudo-devices +pseudo-device wsmux # mouse & keyboard multiplexor +pseudo-device wsfont + # Veriexec # # a pseudo device needed for veriexec
CVS commit: src/doc
Module Name:src Committed By: tsutsui Date: Sun Feb 6 18:38:01 UTC 2011 Modified Files: src/doc: CHANGES Log Message: Note NetBSD/hp300 wscons. To generate a diff of this commit: cvs rdiff -u -r1.1500 -r1.1501 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1500 src/doc/CHANGES:1.1501 --- src/doc/CHANGES:1.1500 Fri Feb 4 15:11:12 2011 +++ src/doc/CHANGES Sun Feb 6 18:38:01 2011 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1500 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1501 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -841,3 +841,5 @@ available via sysctl. [matt 20110129] route: make routing socket interface 64-bit clean. [matt 20110131] dhcpcd(8): Import dhcpcd-5.2.11. [roy 20110204] + hp300: Switch NetBSD/hp300 to wscons with rasops. + Simply ported from OpenBSD/hp300. [tsutsui 20110206]
CVS commit: src/sys/dev/hil
Module Name:src Committed By: tsutsui Date: Sun Feb 6 18:34:52 UTC 2011 Added Files: src/sys/dev/hil: hildevs_data.h Log Message: Initially generate hildevs_data.h from hildevs. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/dev/hil/hildevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/dev/hil/hildevs_data.h diff -u /dev/null src/sys/dev/hil/hildevs_data.h:1.1 --- /dev/null Sun Feb 6 18:34:52 2011 +++ src/sys/dev/hil/hildevs_data.h Sun Feb 6 18:34:52 2011 @@ -0,0 +1,60 @@ +/* $NetBSD: hildevs_data.h,v 1.1 2011/02/06 18:34:52 tsutsui Exp $ */ + +/* + * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. + * + * generated from: + * NetBSD: hildevs,v 1.2 2011/02/06 18:32:55 tsutsui Exp + */ +/* OpenBSD: hildevs,v 1.3 2006/08/10 23:44:16 miod Exp */ +/* + * Copyright (c) 2003, Miodrag Vallat. + * 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 ``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 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. + * + */ + +const struct hildevice hildevs[] = { + { 0x00, 0x1f, HIL_DEVICE_BUTTONBOX, "Keypad" }, + { 0x2f, 0x2f, HIL_DEVICE_BUTTONBOX, "LPFK Button box" }, + { 0x30, 0x33, HIL_DEVICE_BUTTONBOX, "Button box" }, /* 31-33 rumored not to exist */ + { 0x34, 0x34, HIL_DEVICE_IDMODULE, "ID module" }, + { 0x35, 0x3f, HIL_DEVICE_BUTTONBOX, "Button box" }, + { 0x5c, 0x5f, HIL_DEVICE_BUTTONBOX, "Barcode reader" }, + { 0x60, 0x60, HIL_DEVICE_MOUSE, "Single knob" }, + { 0x61, 0x61, HIL_DEVICE_MOUSE, "Nine knob" }, /* can also be quadrature */ + { 0x62, 0x67, HIL_DEVICE_MOUSE, "Quadrature" }, + { 0x68, 0x6b, HIL_DEVICE_MOUSE, "Mouse" }, + { 0x6c, 0x6f, HIL_DEVICE_MOUSE, "Trackball" }, + { 0x70, 0x70, HIL_DEVICE_MOUSE, "Knob box" }, + { 0x71, 0x71, HIL_DEVICE_MOUSE, "Spaceball" }, + { 0x88, 0x8b, HIL_DEVICE_MOUSE, "Touchpad" }, + { 0x8c, 0x8f, HIL_DEVICE_MOUSE, "Touchscreen" }, + { 0x90, 0x97, HIL_DEVICE_MOUSE, "Tablet" }, + { 0x98, 0x98, HIL_DEVICE_MOUSE, "MMII 1812 Tablet" }, + { 0x99, 0x99, HIL_DEVICE_MOUSE, "MMII 1201 Tablet" }, + { 0xa0, 0xbf, HIL_DEVICE_KEYBOARD, "93-key keyboard" }, + { 0xc0, 0xdf, HIL_DEVICE_KEYBOARD, "109-key keyboard" }, + { 0xe0, 0xff, HIL_DEVICE_KEYBOARD, "87-key keyboard" }, + { -1, -1, -1, NULL } +};
CVS commit: src/sys/dev/hil
Module Name:src Committed By: tsutsui Date: Sun Feb 6 18:32:56 UTC 2011 Modified Files: src/sys/dev/hil: hildevs Log Message: Add NetBSD's RCS Id. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/hil/hildevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/hil/hildevs diff -u src/sys/dev/hil/hildevs:1.1 src/sys/dev/hil/hildevs:1.2 --- src/sys/dev/hil/hildevs:1.1 Sun Feb 6 18:26:54 2011 +++ src/sys/dev/hil/hildevs Sun Feb 6 18:32:55 2011 @@ -1,4 +1,5 @@ -$OpenBSD: hildevs,v 1.3 2006/08/10 23:44:16 miod Exp $ +$NetBSD: hildevs,v 1.2 2011/02/06 18:32:55 tsutsui Exp $ +/* OpenBSD: hildevs,v 1.3 2006/08/10 23:44:16 miod Exp */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: christos Date: Sun Feb 6 18:28:22 UTC 2011 Modified Files: src/usr.bin/xlint/lint1: mkops Log Message: use unsigned char instead of uint8_t, easier for portability To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.bin/xlint/lint1/mkops Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/mkops diff -u src/usr.bin/xlint/lint1/mkops:1.4 src/usr.bin/xlint/lint1/mkops:1.5 --- src/usr.bin/xlint/lint1/mkops:1.4 Sat Feb 5 14:10:40 2011 +++ src/usr.bin/xlint/lint1/mkops Sun Feb 6 13:28:22 2011 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: mkops,v 1.4 2011/02/05 19:10:40 christos Exp $ +# $NetBSD: mkops,v 1.5 2011/02/06 18:28:22 christos Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -70,7 +70,7 @@ printf("mod_t modtab[NOPS];\n"); printf("static const struct {\n"); printf("\tmod_t\tm;\n"); - printf("\tuint8_t\tok;\n"); + printf("\tunsigned char\tok;\n"); printf("} imods[] = {\n"); } }
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Sun Feb 6 18:25:49 UTC 2011 Modified Files: src/lib/librumpuser: rumpuser_sp.c Log Message: Fix a race condition in the worker thread caching logic: if we got two or more syscall requests before any worker thread ran, we might not have enough threads to handle the requests. In some scenarios this could lead to a deadlock. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/lib/librumpuser/rumpuser_sp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser_sp.c diff -u src/lib/librumpuser/rumpuser_sp.c:1.38 src/lib/librumpuser/rumpuser_sp.c:1.39 --- src/lib/librumpuser/rumpuser_sp.c:1.38 Fri Jan 28 19:21:28 2011 +++ src/lib/librumpuser/rumpuser_sp.c Sun Feb 6 18:25:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_sp.c,v 1.38 2011/01/28 19:21:28 pooka Exp $ */ +/* $NetBSD: rumpuser_sp.c,v 1.39 2011/02/06 18:25:48 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -35,7 +35,7 @@ */ #include -__RCSID("$NetBSD: rumpuser_sp.c,v 1.38 2011/01/28 19:21:28 pooka Exp $"); +__RCSID("$NetBSD: rumpuser_sp.c,v 1.39 2011/02/06 18:25:48 pooka Exp $"); #include #include @@ -615,19 +615,18 @@ for (;;) { pthread_mutex_lock(&sbamtx); - if (idleworker >= rumpsp_idleworker) { + if (__predict_false(idleworker >= rumpsp_idleworker)) { nworker--; pthread_mutex_unlock(&sbamtx); break; } - idleworker++; - while (TAILQ_EMPTY(&syslist)) { + if (TAILQ_EMPTY(&syslist)) + idleworker++; + while (TAILQ_EMPTY(&syslist)) pthread_cond_wait(&sbacv, &sbamtx); - } sba = TAILQ_FIRST(&syslist); TAILQ_REMOVE(&syslist, sba, sba_entries); - idleworker--; pthread_mutex_unlock(&sbamtx); serv_handlesyscall(sba->sba_spc, @@ -952,6 +951,7 @@ if (idleworker > 0) { /* do we have a daemon's tool (i.e. idle threads)? */ pthread_cond_signal(&sbacv); + idleworker--; } else if (nworker < rumpsp_maxworker) { /* * Else, need to create one @@ -959,8 +959,9 @@ * worker to pick up the syscall) */ if (pthread_create(&pt, &pattr_detached, - serv_syscallbouncer, NULL) == 0) + serv_syscallbouncer, NULL) == 0) { nworker++; + } } pthread_mutex_unlock(&sbamtx); }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: bouyer Date: Sun Feb 6 16:23:01 UTC 2011 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm_gmii_reset(): restore generic reset delays to what they were before rev 1.186. This makes the following hardware find its PHY again, and I can't see how these larger delays could be a problem for other hardware: wm0 at pci6 dev 7 function 0: Intel i82541GI 1000BASE-T Ethernet, rev. 5 wm0: interrupting at ioapic2 pin 0, event channel 5 wm0: 32-bit 66MHz PCI bus wm0: 65536 word (16 address bits) SPI EEPROM wm0: Ethernet address 00:13:72:54:ee:13 igphy0 at wm0 phy 1: Intel IGP01E1000 Gigabit PHY, rev. 0 igphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto To generate a diff of this commit: cvs rdiff -u -r1.218 -r1.219 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.218 src/sys/dev/pci/if_wm.c:1.219 --- src/sys/dev/pci/if_wm.c:1.218 Wed Jan 26 00:25:34 2011 +++ src/sys/dev/pci/if_wm.c Sun Feb 6 16:23:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.218 2011/01/26 00:25:34 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.219 2011/02/06 16:23:00 bouyer Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.218 2011/01/26 00:25:34 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.219 2011/02/06 16:23:00 bouyer Exp $"); #include "rnd.h" @@ -5442,9 +5442,9 @@ case WM_T_80003: /* generic reset */ CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl | CTRL_PHY_RESET); - delay((sc->sc_type >= WM_T_82571) ? 100 : 10*1000); + delay(2); CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl); - delay(150); + delay(2); if ((sc->sc_type == WM_T_82541) || (sc->sc_type == WM_T_82541_2)
CVS commit: src/lib/librumphijack
Module Name:src Committed By: pooka Date: Sun Feb 6 15:48:20 UTC 2011 Modified Files: src/lib/librumphijack: hijack.c Log Message: make it possible to specify client connection retry model in RUMPHIJACK_RETRY To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/lib/librumphijack/hijack.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumphijack/hijack.c diff -u src/lib/librumphijack/hijack.c:1.27 src/lib/librumphijack/hijack.c:1.28 --- src/lib/librumphijack/hijack.c:1.27 Sun Feb 6 13:05:19 2011 +++ src/lib/librumphijack/hijack.c Sun Feb 6 15:48:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hijack.c,v 1.27 2011/02/06 13:05:19 pooka Exp $ */ +/* $NetBSD: hijack.c,v 1.28 2011/02/06 15:48:20 pooka Exp $ */ /*- * Copyright (c) 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__RCSID("$NetBSD: hijack.c,v 1.27 2011/02/06 13:05:19 pooka Exp $"); +__RCSID("$NetBSD: hijack.c,v 1.28 2011/02/06 15:48:20 pooka Exp $"); #define __ssp_weak_name(fun) _hijack_ ## fun @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -185,6 +186,7 @@ static void __attribute__((constructor)) rcinit(void) { + char buf[64]; extern void *(*rumpclient_dlsym)(void *, const char *); unsigned i, j; @@ -223,7 +225,30 @@ if (rumpclient_init() == -1) err(1, "rumpclient init"); - rumpclient_setconnretry(RUMPCLIENT_RETRYCONN_INFTIME); + + /* set client persistence level */ + if (getenv_r("RUMPHIJACK_RETRY", buf, sizeof(buf)) == -1) { + if (errno == ERANGE) + err(1, "invalid RUMPHIJACK_RETRY"); + rumpclient_setconnretry(RUMPCLIENT_RETRYCONN_INFTIME); + } else { + if (strcmp(buf, "die") == 0) + rumpclient_setconnretry(RUMPCLIENT_RETRYCONN_DIE); + else if (strcmp(buf, "inftime") == 0) + rumpclient_setconnretry(RUMPCLIENT_RETRYCONN_INFTIME); + else if (strcmp(buf, "once") == 0) + rumpclient_setconnretry(RUMPCLIENT_RETRYCONN_ONCE); + else { + time_t timeout; + + timeout = (time_t)strtoll(buf, NULL, 10); + if (timeout <= 0) +errx(1, "RUMPHIJACK_RETRY must be keyword " +"or a positive integer, got: %s", buf); + + rumpclient_setconnretry(timeout); + } + } } /* XXX: need runtime selection. low for now due to FD_SETSIZE */
CVS commit: src/lib/librumpclient
Module Name:src Committed By: pooka Date: Sun Feb 6 15:43:20 UTC 2011 Modified Files: src/lib/librumpclient: rumpclient.c rumpclient.h Log Message: Add another connection retry model which simply does exit(1) if the connection is severed. (mostly for tests so that everything can be hooked to rump_server's exit) To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/librumpclient/rumpclient.c cvs rdiff -u -r1.3 -r1.4 src/lib/librumpclient/rumpclient.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpclient/rumpclient.c diff -u src/lib/librumpclient/rumpclient.c:1.23 src/lib/librumpclient/rumpclient.c:1.24 --- src/lib/librumpclient/rumpclient.c:1.23 Sun Feb 6 15:41:37 2011 +++ src/lib/librumpclient/rumpclient.c Sun Feb 6 15:43:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpclient.c,v 1.23 2011/02/06 15:41:37 pooka Exp $ */ +/* $NetBSD: rumpclient.c,v 1.24 2011/02/06 15:43:20 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -101,6 +101,8 @@ /* no persistent connections */ if (retrytimo == 0) break; + if (retrytimo == RUMPCLIENT_RETRYCONN_DIE) +exit(1); if (!prevreconmsg) { prevreconmsg = time(NULL); @@ -805,7 +807,7 @@ rumpclient_setconnretry(time_t timeout) { - if (timeout < RUMPCLIENT_RETRYCONN_ONCE) + if (timeout < RUMPCLIENT_RETRYCONN_DIE) return; /* gigo */ retrytimo = timeout; Index: src/lib/librumpclient/rumpclient.h diff -u src/lib/librumpclient/rumpclient.h:1.3 src/lib/librumpclient/rumpclient.h:1.4 --- src/lib/librumpclient/rumpclient.h:1.3 Thu Jan 27 18:04:05 2011 +++ src/lib/librumpclient/rumpclient.h Sun Feb 6 15:43:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpclient.h,v 1.3 2011/01/27 18:04:05 pooka Exp $ */ +/* $NetBSD: rumpclient.h,v 1.4 2011/02/06 15:43:20 pooka Exp $ */ /*- * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -39,6 +39,7 @@ #define RUMPCLIENT_RETRYCONN_INFTIME ((time_t)-1) #define RUMPCLIENT_RETRYCONN_ONCE ((time_t)-2) +#define RUMPCLIENT_RETRYCONN_DIE ((time_t)-3) void rumpclient_setconnretry(time_t); __END_DECLS
CVS commit: src/lib/librumpclient
Module Name:src Committed By: pooka Date: Sun Feb 6 15:41:38 UTC 2011 Modified Files: src/lib/librumpclient: rumpclient.c Log Message: Make sure to close parent's server communication socket after fork. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/librumpclient/rumpclient.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpclient/rumpclient.c diff -u src/lib/librumpclient/rumpclient.c:1.22 src/lib/librumpclient/rumpclient.c:1.23 --- src/lib/librumpclient/rumpclient.c:1.22 Sat Feb 5 12:38:19 2011 +++ src/lib/librumpclient/rumpclient.c Sun Feb 6 15:41:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpclient.c,v 1.22 2011/02/05 12:38:19 pooka Exp $ */ +/* $NetBSD: rumpclient.c,v 1.23 2011/02/06 15:41:37 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -777,10 +777,13 @@ rumpclient_fork_init(struct rumpclient_fork *rpf) { int error; + int osock; + osock = clispc.spc_fd; memset(&clispc, 0, sizeof(clispc)); - clispc.spc_fd = -1; - kq = -1; + clispc.spc_fd = osock; + + kq = -1; /* kqueue descriptor is not copied over fork() */ if (doinit() == -1) return -1;
CVS commit: src/sys/dev/putter
Module Name:src Committed By: haad Date: Sun Feb 6 14:29:25 UTC 2011 Modified Files: src/sys/dev/putter: putter.c Log Message: Revert my fix. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/putter/putter.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/putter/putter.c diff -u src/sys/dev/putter/putter.c:1.30 src/sys/dev/putter/putter.c:1.31 --- src/sys/dev/putter/putter.c:1.30 Sun Feb 6 01:28:16 2011 +++ src/sys/dev/putter/putter.c Sun Feb 6 14:29:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: putter.c,v 1.30 2011/02/06 01:28:16 haad Exp $ */ +/* $NetBSD: putter.c,v 1.31 2011/02/06 14:29:25 haad Exp $ */ /* * Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: putter.c,v 1.30 2011/02/06 01:28:16 haad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: putter.c,v 1.31 2011/02/06 14:29:25 haad Exp $"); #include #include @@ -644,7 +644,7 @@ return i; } -MODULE(MODULE_CLASS_DRIVER, putter, "puffs"); +MODULE(MODULE_CLASS_DRIVER, putter, NULL); static int putter_modcmd(modcmd_t cmd, void *arg)
CVS commit: src/sys/arch/hp300/hp300
Module Name:src Committed By: tsutsui Date: Sun Feb 6 14:26:10 UTC 2011 Modified Files: src/sys/arch/hp300/hp300: trap.c Log Message: Remove trailing TABs. To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/sys/arch/hp300/hp300/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp300/hp300/trap.c diff -u src/sys/arch/hp300/hp300/trap.c:1.146 src/sys/arch/hp300/hp300/trap.c:1.147 --- src/sys/arch/hp300/hp300/trap.c:1.146 Mon Jan 17 14:53:42 2011 +++ src/sys/arch/hp300/hp300/trap.c Sun Feb 6 14:26:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.146 2011/01/17 14:53:42 tsutsui Exp $ */ +/* $NetBSD: trap.c,v 1.147 2011/02/06 14:26:09 tsutsui Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.146 2011/01/17 14:53:42 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.147 2011/02/06 14:26:09 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -367,7 +367,7 @@ fp->f_stackadj = exframesize[fp->f_format]; fp->f_format = fp->f_vector = 0; fp->f_pc = (int)onfault; - fp->f_regs[D0] = rv; + fp->f_regs[D0] = rv; return; case T_BUSERR|T_USER: /* bus error */
CVS commit: src/lib/librumphijack
Module Name:src Committed By: pooka Date: Sun Feb 6 13:05:20 UTC 2011 Modified Files: src/lib/librumphijack: hijack.c Log Message: be kinder about kqueue() (but paradoxically omit the surprise) To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/librumphijack/hijack.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumphijack/hijack.c diff -u src/lib/librumphijack/hijack.c:1.26 src/lib/librumphijack/hijack.c:1.27 --- src/lib/librumphijack/hijack.c:1.26 Sat Feb 5 16:59:24 2011 +++ src/lib/librumphijack/hijack.c Sun Feb 6 13:05:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hijack.c,v 1.26 2011/02/05 16:59:24 pooka Exp $ */ +/* $NetBSD: hijack.c,v 1.27 2011/02/06 13:05:19 pooka Exp $ */ /*- * Copyright (c) 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__RCSID("$NetBSD: hijack.c,v 1.26 2011/02/05 16:59:24 pooka Exp $"); +__RCSID("$NetBSD: hijack.c,v 1.27 2011/02/06 13:05:19 pooka Exp $"); #define __ssp_weak_name(fun) _hijack_ ## fun @@ -780,9 +780,11 @@ kqueue(void) { - fprintf(stderr, "kqueue unsupported"); - abort(); - /*NOTREACHED*/ + if (!ISDUP2D(STDERR_FILENO) && isatty(STDERR_FILENO)) { + fprintf(stderr, "rumphijack: kqueue currently unsupported\n"); + } + errno = ENOSYS; + return -1; } /*ARGSUSED*/ @@ -792,7 +794,7 @@ const struct timespec *timeout) { - fprintf(stderr, "kqueue unsupported"); + fprintf(stderr, "kevent impossible\n"); abort(); /*NOTREACHED*/ }
CVS commit: src/bin/cp
Module Name:src Committed By: wiz Date: Sun Feb 6 12:49:33 UTC 2011 Modified Files: src/bin/cp: cp.1 Log Message: Put -l compatibility note in STANDARDS section. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/bin/cp/cp.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/cp/cp.1 diff -u src/bin/cp/cp.1:1.36 src/bin/cp/cp.1:1.37 --- src/bin/cp/cp.1:1.36 Sun Feb 6 12:37:48 2011 +++ src/bin/cp/cp.1 Sun Feb 6 12:49:32 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: cp.1,v 1.36 2011/02/06 12:37:48 darcy Exp $ +.\" $NetBSD: cp.1,v 1.37 2011/02/06 12:49:32 wiz Exp $ .\" .\" Copyright (c) 1989, 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -106,7 +106,6 @@ option is specified, all symbolic links are followed. .It Fl l Create hard links to regular files in a hierarchy instead of copying. -The -l option is expected to behave similar to cp(1) in GNU coreutils. .It Fl N When used with .Fl p , @@ -226,8 +225,10 @@ .Pp The .Fl a -is a non-standard extension. -It is intended to be compatible with the same option which +and +.Fl l +flags are non-standard extensions. +They are intended to be compatible with the same options which other implementations, namely GNU coreutils and .Fx , of this utility have.
CVS commit: src/bin/cp
Module Name:src Committed By: darcy Date: Sun Feb 6 12:37:49 UTC 2011 Modified Files: src/bin/cp: cp.1 cp.c extern.h utils.c Log Message: Add -l option to copy a tree as links. Non-standard option similar to Gnutools cp(1) Approved by core. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/bin/cp/cp.1 cvs rdiff -u -r1.54 -r1.55 src/bin/cp/cp.c cvs rdiff -u -r1.15 -r1.16 src/bin/cp/extern.h cvs rdiff -u -r1.38 -r1.39 src/bin/cp/utils.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/cp/cp.1 diff -u src/bin/cp/cp.1:1.35 src/bin/cp/cp.1:1.36 --- src/bin/cp/cp.1:1.35 Mon Jan 24 07:22:57 2011 +++ src/bin/cp/cp.1 Sun Feb 6 12:37:48 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: cp.1,v 1.35 2011/01/24 07:22:57 wiz Exp $ +.\" $NetBSD: cp.1,v 1.36 2011/02/06 12:37:48 darcy Exp $ .\" .\" Copyright (c) 1989, 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\" .\" @(#)cp.1 8.3 (Berkeley) 4/18/94 .\" -.Dd December 21, 2010 +.Dd February 6, 2010 .Dt CP 1 .Os .Sh NAME @@ -45,7 +45,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i -.Op Fl aNpv +.Op Fl alNpv .Ar source_file target_file .Nm cp .Oo @@ -53,7 +53,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i -.Op Fl aNpv +.Op Fl alNpv .Ar source_file ... target_directory .Sh DESCRIPTION In the first synopsis form, the @@ -104,6 +104,9 @@ If the .Fl R option is specified, all symbolic links are followed. +.It Fl l +Create hard links to regular files in a hierarchy instead of copying. +The -l option is expected to behave similar to cp(1) in GNU coreutils. .It Fl N When used with .Fl p , Index: src/bin/cp/cp.c diff -u src/bin/cp/cp.c:1.54 src/bin/cp/cp.c:1.55 --- src/bin/cp/cp.c:1.54 Tue Dec 21 20:56:01 2010 +++ src/bin/cp/cp.c Sun Feb 6 12:37:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cp.c,v 1.54 2010/12/21 20:56:01 christos Exp $ */ +/* $NetBSD: cp.c,v 1.55 2011/02/06 12:37:49 darcy Exp $ */ /* * Copyright (c) 1988, 1993, 1994 @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)cp.c 8.5 (Berkeley) 4/29/95"; #else -__RCSID("$NetBSD: cp.c,v 1.54 2010/12/21 20:56:01 christos Exp $"); +__RCSID("$NetBSD: cp.c,v 1.55 2011/02/06 12:37:49 darcy Exp $"); #endif #endif /* not lint */ @@ -86,7 +86,7 @@ PATH_T to = { .p_end = to.p_path, .target_end = empty }; uid_t myuid; -int Hflag, Lflag, Rflag, Pflag, fflag, iflag, pflag, rflag, vflag, Nflag; +int Hflag, Lflag, Rflag, Pflag, fflag, iflag, lflag, pflag, rflag, vflag, Nflag; mode_t myumask; enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; @@ -106,7 +106,7 @@ (void)setlocale(LC_ALL, ""); Hflag = Lflag = Pflag = Rflag = 0; - while ((ch = getopt(argc, argv, "HLNPRfaiprv")) != -1) + while ((ch = getopt(argc, argv, "HLNPRfailprv")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -140,6 +140,9 @@ iflag = isatty(fileno(stdin)); fflag = 0; break; + case 'l': + lflag = 1; + break; case 'p': pflag = 1; break; Index: src/bin/cp/extern.h diff -u src/bin/cp/extern.h:1.15 src/bin/cp/extern.h:1.16 --- src/bin/cp/extern.h:1.15 Sun Jul 16 16:22:24 2006 +++ src/bin/cp/extern.h Sun Feb 6 12:37:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.15 2006/07/16 16:22:24 jschauma Exp $ */ +/* $NetBSD: extern.h,v 1.16 2011/02/06 12:37:49 darcy Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -42,7 +42,7 @@ extern PATH_T to; extern uid_t myuid; -extern int Rflag, rflag, Hflag, Lflag, Pflag, fflag, iflag, pflag, Nflag; +extern int Rflag, rflag, Hflag, Lflag, Pflag, fflag, iflag, lflag, pflag, Nflag; extern mode_t myumask; #include Index: src/bin/cp/utils.c diff -u src/bin/cp/utils.c:1.38 src/bin/cp/utils.c:1.39 --- src/bin/cp/utils.c:1.38 Tue Jan 4 10:35:10 2011 +++ src/bin/cp/utils.c Sun Feb 6 12:37:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: utils.c,v 1.38 2011/01/04 10:35:10 wiz Exp $ */ +/* $NetBSD: utils.c,v 1.39 2011/02/06 12:37:49 darcy Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)utils.c 8.3 (Berkeley) 4/1/94"; #else -__RCSID("$NetBSD: utils.c,v 1.38 2011/01/04 10:35:10 wiz Exp $"); +__RCSID("$NetBSD: utils.c,v 1.39 2011/02/06 12:37:49 darcy Exp $"); #endif #endif /* not lint */ @@ -145,11 +145,23 @@ rval = 0; + /* if hard linking then simply close the open fds, link and return */ + if (lflag) { + (void)close(from_fd); + (void)close(to_fd); + (void)unlink(to.p_path); + if (link(entp->fts_path, to.p_path)) { + warn("%s", to.p_path); + return (1); + } + return (0); + } + /* NOTREACHED */ + /* * There's no reason to do anything other than close the file * now if it's empty, so let's not bother. */ - if (fs->st_size > 0) { /* * Mmap and write if less than 8M (the limit is so @@ -215,8 +227,9 @@ } } + (void)close(from_fd); + if (rval == 1) { - (void)close(from_fd); (void)c
CVS commit: src/sbin/fsck_ffs
Module Name:src Committed By: njoly Date: Sun Feb 6 12:02:59 UTC 2011 Modified Files: src/sbin/fsck_ffs: main.c Log Message: Do Skip device checks, which ends up parsing fstab, when working on a filesystem image with -F option set. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sbin/fsck_ffs/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_ffs/main.c diff -u src/sbin/fsck_ffs/main.c:1.76 src/sbin/fsck_ffs/main.c:1.77 --- src/sbin/fsck_ffs/main.c:1.76 Sun Apr 11 08:23:51 2010 +++ src/sbin/fsck_ffs/main.c Sun Feb 6 12:02:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.76 2010/04/11 08:23:51 hannken Exp $ */ +/* $NetBSD: main.c,v 1.77 2011/02/06 12:02:59 njoly Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95"; #else -__RCSID("$NetBSD: main.c,v 1.76 2010/04/11 08:23:51 hannken Exp $"); +__RCSID("$NetBSD: main.c,v 1.77 2011/02/06 12:02:59 njoly Exp $"); #endif #endif /* not lint */ @@ -216,7 +216,12 @@ while (argc-- > 0) { int nret; - char *path = strdup(blockcheck(*argv)); + char *path; + + if (!forceimage) + path = strdup(blockcheck(*argv)); + else + path = strdup(*argv); if (path == NULL) pfatal("Can't check %s\n", *argv);