CVS commit: src/etc/etc.landisk
Module Name:src Committed By: nonaka Date: Mon Apr 27 08:06:03 UTC 2009 Modified Files: src/etc/etc.landisk: MAKEDEV.conf Log Message: Add sysmon for powerd. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/etc/etc.landisk/MAKEDEV.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.landisk/MAKEDEV.conf diff -u src/etc/etc.landisk/MAKEDEV.conf:1.2 src/etc/etc.landisk/MAKEDEV.conf:1.3 --- src/etc/etc.landisk/MAKEDEV.conf:1.2 Sat Sep 13 11:46:18 2008 +++ src/etc/etc.landisk/MAKEDEV.conf Mon Apr 27 08:06:02 2009 @@ -1,4 +1,4 @@ -# $NetBSD: MAKEDEV.conf,v 1.2 2008/09/13 11:46:18 tsutsui Exp $ +# $NetBSD: MAKEDEV.conf,v 1.3 2009/04/27 08:06:02 nonaka Exp $ init) makedev std wscons wd0 wd1 sd0 sd1 sd2 sd3 @@ -11,6 +11,7 @@ makedev usbs makedev pci0 makedev ipty + makedev sysmon makedev local ;;
CVS commit: [nick-hppapmap] src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Mon Apr 27 08:11:19 UTC 2009 Modified Files: src/sys/arch/hppa/hppa [nick-hppapmap]: pmap.c Log Message: Add a reference. To generate a diff of this commit: cvs rdiff -u -r1.43.8.50 -r1.43.8.51 src/sys/arch/hppa/hppa/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/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.43.8.50 src/sys/arch/hppa/hppa/pmap.c:1.43.8.51 --- src/sys/arch/hppa/hppa/pmap.c:1.43.8.50 Sat Apr 25 15:28:16 2009 +++ src/sys/arch/hppa/hppa/pmap.c Mon Apr 27 08:11:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.43.8.50 2009/04/25 15:28:16 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.43.8.51 2009/04/27 08:11:19 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -60,11 +60,12 @@ * References: * 1. PA7100LC ERS, Hewlett-Packard, March 30 1999, Public version 1.0 * 2. PA7300LC ERS, Hewlett-Packard, March 18 1996, Version 1.0 - * + * 3. PA-RISC 1.1 Architecture and Instruction Set Reference Manual, + *Hewlett-Packard, February 1994, Third Edition */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43.8.50 2009/04/25 15:28:16 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43.8.51 2009/04/27 08:11:19 skrll Exp $); #include sys/param.h #include sys/systm.h
CVS commit: [nick-hppapmap] src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Mon Apr 27 08:21:51 UTC 2009 Modified Files: src/sys/arch/hppa/hppa [nick-hppapmap]: pmap.c Log Message: Another comment update. To generate a diff of this commit: cvs rdiff -u -r1.43.8.52 -r1.43.8.53 src/sys/arch/hppa/hppa/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/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.43.8.52 src/sys/arch/hppa/hppa/pmap.c:1.43.8.53 --- src/sys/arch/hppa/hppa/pmap.c:1.43.8.52 Mon Apr 27 08:19:59 2009 +++ src/sys/arch/hppa/hppa/pmap.c Mon Apr 27 08:21:51 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.43.8.52 2009/04/27 08:19:59 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.43.8.53 2009/04/27 08:21:51 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43.8.52 2009/04/27 08:19:59 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43.8.53 2009/04/27 08:21:51 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -560,7 +560,7 @@ if (!nonequiv) { /* * Inherit uncacheable attribute if set as it means we already - * have non-equiv aliases + * have non-equiv aliases. */ if (ptep (attrs PVF_UNCACHEABLE) != 0) *ptep |= PTE_PROT(TLB_UNCACHEABLE);
CVS commit: [nick-hppapmap] src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Mon Apr 27 08:25:30 UTC 2009 Modified Files: src/sys/arch/hppa/hppa [nick-hppapmap]: pmap.c Log Message: Oops, typo in previous. To generate a diff of this commit: cvs rdiff -u -r1.43.8.53 -r1.43.8.54 src/sys/arch/hppa/hppa/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/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.43.8.53 src/sys/arch/hppa/hppa/pmap.c:1.43.8.54 --- src/sys/arch/hppa/hppa/pmap.c:1.43.8.53 Mon Apr 27 08:21:51 2009 +++ src/sys/arch/hppa/hppa/pmap.c Mon Apr 27 08:25:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.43.8.53 2009/04/27 08:21:51 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.43.8.54 2009/04/27 08:25:30 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43.8.53 2009/04/27 08:21:51 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43.8.54 2009/04/27 08:25:30 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -1811,7 +1811,7 @@ /* * If we're being told to unmap page zero, we can't call printf() at - * all as printf required page zero to be mapped. + * all as printf requires page zero to be mapped. */ if (va == 0) pmapdebug = 0;
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: joerg Date: Mon Apr 27 12:02:11 UTC 2009 Modified Files: src/sys/arch/amd64/conf: GENERIC Log Message: Add commented out h...@ichlpcib entry. To generate a diff of this commit: cvs rdiff -u -r1.242 -r1.243 src/sys/arch/amd64/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/amd64/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.242 src/sys/arch/amd64/conf/GENERIC:1.243 --- src/sys/arch/amd64/conf/GENERIC:1.242 Tue Apr 21 03:00:29 2009 +++ src/sys/arch/amd64/conf/GENERIC Mon Apr 27 12:02:10 2009 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.242 2009/04/21 03:00:29 nonaka Exp $ +# $NetBSD: GENERIC,v 1.243 2009/04/27 12:02:10 joerg Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.242 $ +#ident GENERIC-$Revision: 1.243 $ maxusers 64 # estimated number of users @@ -327,6 +327,7 @@ ichlpcib* at pci? dev ? function ? # Intel ICH PCI-ISA w/ timecounter, # watchdog and Speedstep support. +#hpet* at ichlpcib? aapic* at pci? dev ? function ? # AMD 8131 IO apic
CVS commit: src/sys/compat/linux32/common
Module Name:src Committed By: njoly Date: Mon Apr 27 13:24:18 UTC 2009 Modified Files: src/sys/compat/linux32/common: linux32_ipccall.c Log Message: Add IPC_64 support to all semctl(2) commands, following corresponding compat linux change. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/compat/linux32/common/linux32_ipccall.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/compat/linux32/common/linux32_ipccall.c diff -u src/sys/compat/linux32/common/linux32_ipccall.c:1.3 src/sys/compat/linux32/common/linux32_ipccall.c:1.4 --- src/sys/compat/linux32/common/linux32_ipccall.c:1.3 Wed Feb 18 14:40:14 2009 +++ src/sys/compat/linux32/common/linux32_ipccall.c Mon Apr 27 13:24:18 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ipccall.c,v 1.3 2009/02/18 14:40:14 njoly Exp $ */ +/* $NetBSD: linux32_ipccall.c,v 1.4 2009/04/27 13:24:18 njoly Exp $ */ /* * Copyright (c) 2008 Nicolas Joly @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: linux32_ipccall.c,v 1.3 2009/02/18 14:40:14 njoly Exp $); +__KERNEL_RCSID(0, $NetBSD: linux32_ipccall.c,v 1.4 2009/04/27 13:24:18 njoly Exp $); #if defined(_KERNEL_OPT) #include opt_sysv.h @@ -253,7 +253,7 @@ linux32_semctl(struct lwp *l, const struct linux32_sys_ipc_args *uap, register_t *retval) { - int cmd, error; + int lcmd, cmd, error; struct semid_ds bs; struct linux32_semid_ds ls; struct linux32_semid64_ds ls64; @@ -264,28 +264,28 @@ if ((error = copyin(SCARG_P32(uap, ptr), lsem, sizeof lsem))) return error; - switch (SCARG(uap, a3)) { + lcmd = SCARG(uap, a3); + + switch (lcmd ~LINUX32_IPC_64) { case LINUX32_IPC_RMID: cmd = IPC_RMID; break; case LINUX32_IPC_STAT: - case LINUX32_IPC_STAT|LINUX32_IPC_64: cmd = IPC_STAT; buf = bs; break; case LINUX32_IPC_SET: - error = copyin(NETBSD32PTR64(lsem.l_buf), ls, sizeof ls); - if (error) - return error; - linux32_to_bsd_semid_ds(ls, bs); - cmd = IPC_SET; - buf = bs; - break; - case LINUX32_IPC_SET|LINUX32_IPC_64: - error = copyin(NETBSD32PTR64(lsem.l_buf), ls64, sizeof ls64); + if (lcmd LINUX32_IPC_64) { + error = copyin(NETBSD32PTR64(lsem.l_buf), ls64, + sizeof ls64); + linux32_to_bsd_semid64_ds(ls64, bs); + } else { + error = copyin(NETBSD32PTR64(lsem.l_buf), ls, + sizeof ls); + linux32_to_bsd_semid_ds(ls, bs); + } if (error) return error; - linux32_to_bsd_semid64_ds(ls64, bs); cmd = IPC_SET; buf = bs; break; @@ -324,7 +324,7 @@ if (error) return error; - switch (SCARG(uap, a3)) { + switch (lcmd) { case LINUX32_IPC_STAT: bsd_to_linux32_semid_ds(bs, ls); error = copyout(ls, NETBSD32PTR64(lsem.l_buf), sizeof ls);
CVS commit: src
Module Name:src Committed By: njoly Date: Mon Apr 27 14:22:40 UTC 2009 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: md.alpha src/etc/mtree: NetBSD.dist Added Files: src/distrib/sets/lists/xcomp: md.alpha Log Message: Add some missing entries to fix MKDEBUG build on alpha. Looks good from tsutsui. To generate a diff of this commit: cvs rdiff -u -r1.805 -r1.806 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.55 -r1.56 src/distrib/sets/lists/comp/md.alpha cvs rdiff -u -r0 -r1.4 src/distrib/sets/lists/xcomp/md.alpha cvs rdiff -u -r1.397 -r1.398 src/etc/mtree/NetBSD.dist 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/base/mi diff -u src/distrib/sets/lists/base/mi:1.805 src/distrib/sets/lists/base/mi:1.806 --- src/distrib/sets/lists/base/mi:1.805 Sat Apr 25 05:54:50 2009 +++ src/distrib/sets/lists/base/mi Mon Apr 27 14:22:40 2009 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.805 2009/04/25 05:54:50 agc Exp $ +# $NetBSD: mi,v 1.806 2009/04/27 14:22:40 njoly Exp $ # # Note: Don't delete entries from here - mark them as obsolete instead, # unless otherwise stated below. @@ -1189,6 +1189,7 @@ ./usr/libdata/debug/usr/libexec/lpr base-sys-usr ./usr/libdata/debug/usr/libexec/postfix base-sys-usr ./usr/libdata/debug/usr/libexec/uucp base-obsolete obsolete +./usr/libdata/debug/usr/mdec base-sys-usr ./usr/libdata/debug/usr/sbin base-sys-usr ./usr/libdata/firmwarebase-sys-usr ./usr/libdata/ldscriptsbase-c-usr Index: src/distrib/sets/lists/comp/md.alpha diff -u src/distrib/sets/lists/comp/md.alpha:1.55 src/distrib/sets/lists/comp/md.alpha:1.56 --- src/distrib/sets/lists/comp/md.alpha:1.55 Fri Aug 22 13:42:19 2008 +++ src/distrib/sets/lists/comp/md.alpha Mon Apr 27 14:22:40 2009 @@ -1,4 +1,4 @@ -# $NetBSD: md.alpha,v 1.55 2008/08/22 13:42:19 lukem Exp $ +# $NetBSD: md.alpha,v 1.56 2009/04/27 14:22:40 njoly Exp $ ./usr/include/alphacomp-c-include ./usr/include/alpha/_G_config.h comp-obsolete obsolete ./usr/include/alpha/alpha_cpu.h comp-c-include @@ -75,4 +75,6 @@ ./usr/lib/libalpha_pic.a comp-c-piclib ./usr/libdata/lint/llib-lalpha.ln comp-c-lintlib lint ./usr/libdata/debug/usr/bin/fdformat.debug comp-util-debug debug +./usr/libdata/debug/usr/mdec/mkbootimage.debug comp-sysutil-debug debug +./usr/libdata/debug/usr/mdec/setnetbootinfo.debug comp-sysutil-debug debug ./usr/libdata/debug/usr/sbin/bad144.debug comp-sysutil-debug debug Index: src/etc/mtree/NetBSD.dist diff -u src/etc/mtree/NetBSD.dist:1.397 src/etc/mtree/NetBSD.dist:1.398 --- src/etc/mtree/NetBSD.dist:1.397 Mon Apr 20 03:56:59 2009 +++ src/etc/mtree/NetBSD.dist Mon Apr 27 14:22:40 2009 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist,v 1.397 2009/04/20 03:56:59 mrg Exp $ +# $NetBSD: NetBSD.dist,v 1.398 2009/04/27 14:22:40 njoly Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -532,6 +532,7 @@ ./usr/libdata/debug/usr/libexec/ching ./usr/libdata/debug/usr/libexec/lpr ./usr/libdata/debug/usr/libexec/postfix +./usr/libdata/debug/usr/mdec ./usr/libdata/debug/usr/sbin ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf Added files: Index: src/distrib/sets/lists/xcomp/md.alpha diff -u /dev/null src/distrib/sets/lists/xcomp/md.alpha:1.4 --- /dev/null Mon Apr 27 14:22:41 2009 +++ src/distrib/sets/lists/xcomp/md.alpha Mon Apr 27 14:22:40 2009 @@ -0,0 +1,4 @@ +# $NetBSD: md.alpha,v 1.4 2009/04/27 14:22:40 njoly Exp $ +./usr/libdata/debug/usr/X11R6/bin/XalphaNetBSD.debug -unknown- debug,x11 +./usr/libdata/debug/usr/X11R6/bin/XdecNetBSD.debug -unknown- debug,x11 +./usr/libdata/debug/usr/X11R6/bin/Xvfb.debug -unknown- debug,x11
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Mon Apr 27 14:28:58 UTC 2009 Modified Files: src/sys/rump/include/rump: rumpuser.h src/sys/rump/librump/rumpuser: rumpuser_pth.c src/sys/rump/librump/rumpvfs: rumpblk.c Log Message: * expand syncing logic into rumpuser, since it has more freedom on how to do it (e.g. fsync_range) * hash out O_DIRECT support. it's the fastest method of safely operating on a file, but we can't currently autodetect support, so it's not enabled by default * sprinkle more event counters To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/rump/include/rump/rumpuser.h cvs rdiff -u -r1.32 -r1.33 src/sys/rump/librump/rumpuser/rumpuser_pth.c cvs rdiff -u -r1.19 -r1.20 src/sys/rump/librump/rumpvfs/rumpblk.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/rump/include/rump/rumpuser.h diff -u src/sys/rump/include/rump/rumpuser.h:1.22 src/sys/rump/include/rump/rumpuser.h:1.23 --- src/sys/rump/include/rump/rumpuser.h:1.22 Sun Apr 26 21:39:10 2009 +++ src/sys/rump/include/rump/rumpuser.h Mon Apr 27 14:28:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.h,v 1.22 2009/04/26 21:39:10 pooka Exp $ */ +/* $NetBSD: rumpuser.h,v 1.23 2009/04/27 14:28:58 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -155,6 +155,9 @@ void *rua_bp; int rua_op; }; +#define RUA_OP_READ 0x01 +#define RUA_OP_WRITE 0x02 +#define RUA_OP_SYNC 0x04 #define N_AIOS 1024 extern struct rumpuser_mtx rumpuser_aio_mtx; Index: src/sys/rump/librump/rumpuser/rumpuser_pth.c diff -u src/sys/rump/librump/rumpuser/rumpuser_pth.c:1.32 src/sys/rump/librump/rumpuser/rumpuser_pth.c:1.33 --- src/sys/rump/librump/rumpuser/rumpuser_pth.c:1.32 Sun Apr 26 22:26:59 2009 +++ src/sys/rump/librump/rumpuser/rumpuser_pth.c Mon Apr 27 14:28:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_pth.c,v 1.32 2009/04/26 22:26:59 pooka Exp $ */ +/* $NetBSD: rumpuser_pth.c,v 1.33 2009/04/27 14:28:58 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ #include sys/cdefs.h #if !defined(lint) -__RCSID($NetBSD: rumpuser_pth.c,v 1.32 2009/04/26 22:26:59 pooka Exp $); +__RCSID($NetBSD: rumpuser_pth.c,v 1.33 2009/04/27 14:28:58 pooka Exp $); #endif /* !lint */ #ifdef __linux__ @@ -46,6 +46,7 @@ #include stdio.h #include string.h #include stdint.h +#include unistd.h #include rump/rumpuser.h @@ -129,6 +130,8 @@ { struct rumpuser_aio *rua; rump_biodone_fn biodone = arg; + ssize_t rv; + int error; NOFAIL_ERRNO(pthread_mutex_lock(rumpuser_aio_mtx.pthmtx)); for (;;) { @@ -141,12 +144,32 @@ assert(rua-rua_bp != NULL); pthread_mutex_unlock(rumpuser_aio_mtx.pthmtx); - if (rua-rua_op) - rumpuser_read_bio(rua-rua_fd, rua-rua_data, - rua-rua_dlen, rua-rua_off, biodone, rua-rua_bp); - else - rumpuser_write_bio(rua-rua_fd, rua-rua_data, - rua-rua_dlen, rua-rua_off, biodone, rua-rua_bp); + if (rua-rua_op RUA_OP_READ) { + error = 0; + rv = pread(rua-rua_fd, rua-rua_data, + rua-rua_dlen, rua-rua_off); + if (rv 0) { +rv = 0; +error = errno; + } + } else { + error = 0; + rv = pwrite(rua-rua_fd, rua-rua_data, + rua-rua_dlen, rua-rua_off); + if (rv 0) { +rv = 0; +error = errno; + } else if (rua-rua_op RUA_OP_SYNC) { +#ifdef __NetBSD__ +fsync_range(rua-rua_fd, FDATASYNC, +rua-rua_off, rua-rua_dlen); +#else +fsync(rua-rua_fd); +#endif + } + } + biodone(rua-rua_bp, rv, error); + rua-rua_bp = NULL; NOFAIL_ERRNO(pthread_mutex_lock(rumpuser_aio_mtx.pthmtx)); Index: src/sys/rump/librump/rumpvfs/rumpblk.c diff -u src/sys/rump/librump/rumpvfs/rumpblk.c:1.19 src/sys/rump/librump/rumpvfs/rumpblk.c:1.20 --- src/sys/rump/librump/rumpvfs/rumpblk.c:1.19 Fri Apr 17 12:29:08 2009 +++ src/sys/rump/librump/rumpvfs/rumpblk.c Mon Apr 27 14:28:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpblk.c,v 1.19 2009/04/17 12:29:08 pooka Exp $ */ +/* $NetBSD: rumpblk.c,v 1.20 2009/04/27 14:28:58 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -43,7 +43,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rumpblk.c,v 1.19 2009/04/17 12:29:08 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rumpblk.c,v 1.20 2009/04/27 14:28:58 pooka Exp $); #include sys/param.h #include sys/buf.h @@ -89,6 +89,9 @@ static struct rblkdev { char *rblk_path; int rblk_fd; +#ifdef HAS_ODIRECT + int rblk_dfd; +#endif /* for mmap */ int rblk_mmflags; @@ -103,9 +106,15 @@ struct disklabel rblk_dl; } minors[RUMPBLK_SIZE]; -static struct evcnt memblk_ev_reqs; -static struct evcnt memblk_ev_hits; -static struct evcnt memblk_ev_busy; +static struct evcnt ev_io_total; +static struct evcnt ev_io_async; + +static struct evcnt ev_memblk_hits; +static struct evcnt ev_memblk_busy; + +static struct evcnt ev_bwrite_total; +static struct
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: ginsbach Date: Mon Apr 27 15:08:10 UTC 2009 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: Print left and right type and not left type twice. (Hi Christos!) To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/usr.bin/xlint/lint1/tree.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.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.57 src/usr.bin/xlint/lint1/tree.c:1.58 --- src/usr.bin/xlint/lint1/tree.c:1.57 Wed Apr 15 01:20:57 2009 +++ src/usr.bin/xlint/lint1/tree.c Mon Apr 27 15:08:10 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.57 2009/04/15 01:20:57 christos Exp $ */ +/* $NetBSD: tree.c,v 1.58 2009/04/27 15:08:10 ginsbach Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include sys/cdefs.h #if defined(__RCSID) !defined(lint) -__RCSID($NetBSD: tree.c,v 1.57 2009/04/15 01:20:57 christos Exp $); +__RCSID($NetBSD: tree.c,v 1.58 2009/04/27 15:08:10 ginsbach Exp $); #endif #include stdlib.h @@ -1311,7 +1311,7 @@ (!lstp-t_volatile rstp-t_volatile))) { /* left side has not all qualifiers of right */ tyname(lbuf, sizeof(lbuf), lstp); - tyname(rbuf, sizeof(rbuf), lstp); + tyname(rbuf, sizeof(rbuf), rstp); switch (op) { case INIT: case RETURN:
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Mon Apr 27 18:36:43 UTC 2009 Modified Files: src/sys/rump/librump/rumpvfs: rumpblk.c Log Message: initialize async before use To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/rump/librump/rumpvfs/rumpblk.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/rump/librump/rumpvfs/rumpblk.c diff -u src/sys/rump/librump/rumpvfs/rumpblk.c:1.20 src/sys/rump/librump/rumpvfs/rumpblk.c:1.21 --- src/sys/rump/librump/rumpvfs/rumpblk.c:1.20 Mon Apr 27 14:28:58 2009 +++ src/sys/rump/librump/rumpvfs/rumpblk.c Mon Apr 27 18:36:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpblk.c,v 1.20 2009/04/27 14:28:58 pooka Exp $ */ +/* $NetBSD: rumpblk.c,v 1.21 2009/04/27 18:36:43 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -43,7 +43,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rumpblk.c,v 1.20 2009/04/27 14:28:58 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: rumpblk.c,v 1.21 2009/04/27 18:36:43 pooka Exp $); #include sys/param.h #include sys/buf.h @@ -488,7 +488,8 @@ { struct rblkdev *rblk = minors[minor(bp-b_dev)]; off_t off; - int async, error; + int async = bp-b_flags B_ASYNC; + int error; /* collect statistics */ ev_io_total.ev_count++; @@ -527,7 +528,6 @@ bp-b_bcount = sz; } - async = bp-b_flags B_ASYNC; DPRINTF((rumpblk_strategy: 0x%x bytes %s off 0x% PRIx64 (0x% PRIx64 - 0x% PRIx64 ), %ssync\n, bp-b_bcount, BUF_ISREAD(bp) ? READ : WRITE,
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: cegger Date: Mon Apr 27 20:02:30 UTC 2009 Modified Files: src/sys/arch/x86/x86: intr.c Log Message: sprintf - snprintf To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/arch/x86/x86/intr.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/x86/x86/intr.c diff -u src/sys/arch/x86/x86/intr.c:1.62 src/sys/arch/x86/x86/intr.c:1.63 --- src/sys/arch/x86/x86/intr.c:1.62 Wed Apr 22 21:20:52 2009 +++ src/sys/arch/x86/x86/intr.c Mon Apr 27 20:02:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.62 2009/04/22 21:20:52 ad Exp $ */ +/* $NetBSD: intr.c,v 1.63 2009/04/27 20:02:29 cegger Exp $ */ /*- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.62 2009/04/22 21:20:52 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.63 2009/04/27 20:02:29 cegger Exp $); #include opt_intrdebug.h #include opt_multiprocessor.h @@ -922,19 +922,20 @@ if (ih APIC_INT_VIA_APIC) { pic = ioapic_find(APIC_IRQ_APIC(ih)); if (pic != NULL) { - sprintf(irqstr, %s pin %d, + snprintf(irqstr, sizeof(irqstr), %s pin %d, device_xname(pic-sc_dev), APIC_IRQ_PIN(ih)); } else { - sprintf(irqstr, apic %d int %d (irq %d), + snprintf(irqstr, sizeof(irqstr), + apic %d int %d (irq %d), APIC_IRQ_APIC(ih), APIC_IRQ_PIN(ih), ih0xff); } } else - sprintf(irqstr, irq %d, ih0xff); + snprintf(irqstr, sizeof(irqstr), irq %d, ih0xff); #else - sprintf(irqstr, irq %d, ih0xff); + snprintf(irqstr, sizeof(irqstr), irq %d, ih0xff); #endif return (irqstr);
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Tue Apr 28 00:40:45 UTC 2009 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: libnetpgp.3 Log Message: Use .Ar properly To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 diff -u src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.1.1.1 src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.2 --- src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.1.1.1 Thu Apr 23 06:32:03 2009 +++ src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 Tue Apr 28 00:40:45 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: libnetpgp.3,v 1.1.1.1 2009/04/23 06:32:03 agc Exp $ +.\ $NetBSD: libnetpgp.3,v 1.2 2009/04/28 00:40:45 agc Exp $ .\ .\ Copyright (c) 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -111,16 +111,16 @@ .Fn netpgp_init function, which will set up the public and private keyrings, and set the user identity to the -.It userid +.Ar userid argument passed to the function. If no public key ring file is provided, initial values will be taken from those in the -.It .gnupg/pubring.gpg +.Ar .gnupg/pubring.gpg file in the user's home directory. Similarily, if no secret key ring file is provided, initial values will be taken from those in the -.It .gnupg/secring.gpg +.Ar .gnupg/secring.gpg file in the user's home directory. The .Fn netpgp_init @@ -188,7 +188,7 @@ The .Fn netpgp_get_info returns the information depending upon the -.It type +.Ar type argument. .Sh SEE ALSO .Xr netpgp 1 ,
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Tue Apr 28 00:41:40 UTC 2009 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: packet-parse.c reader.c Log Message: Clean up minor pieces of lint To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c \ src/crypto/external/bsd/netpgp/dist/src/lib/reader.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c:1.2 src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c:1.3 --- src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c:1.2 Sat Apr 25 01:29:15 2009 +++ src/crypto/external/bsd/netpgp/dist/src/lib/packet-parse.c Tue Apr 28 00:41:40 2009 @@ -467,7 +467,7 @@ unsignedn; assert(length = 4); - assert(/*CONSTCOND*/sizeof(*dest) = sizeof(uint32_t)); + assert(/*CONSTCOND*/sizeof(*dest) = 4); if (!limited_read(c, length, region, pinfo)) return 0; Index: src/crypto/external/bsd/netpgp/dist/src/lib/reader.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/reader.c:1.2 src/crypto/external/bsd/netpgp/dist/src/lib/reader.c:1.3 --- src/crypto/external/bsd/netpgp/dist/src/lib/reader.c:1.2 Sat Apr 25 01:29:15 2009 +++ src/crypto/external/bsd/netpgp/dist/src/lib/reader.c Tue Apr 28 00:41:40 2009 @@ -2098,9 +2098,9 @@ char *cmem = mem-mem; int n; - (void)errors; - n = MIN(length, (int)(mem-size - mem-offset)); + OPS_USED(errors); OPS_USED(cbinfo); + n = MIN(length, (int)(mem-size - mem-offset)); if (n 0) { (void) memcpy(dest, cmem[(int)mem-offset], (unsigned)n); mem-offset += n;
CVS commit: src/usr.bin/touch
Module Name:src Committed By: yamt Date: Tue Apr 28 02:47:12 UTC 2009 Modified Files: src/usr.bin/touch: touch.c Log Message: remove read-write code because it's dangerous. there's no point to try this hard anyway. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.bin/touch/touch.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.bin/touch/touch.c diff -u src/usr.bin/touch/touch.c:1.27 src/usr.bin/touch/touch.c:1.28 --- src/usr.bin/touch/touch.c:1.27 Mon Jul 21 14:19:27 2008 +++ src/usr.bin/touch/touch.c Tue Apr 28 02:47:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: touch.c,v 1.27 2008/07/21 14:19:27 lukem Exp $ */ +/* $NetBSD: touch.c,v 1.28 2009/04/28 02:47:12 yamt Exp $ */ /* * Copyright (c) 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)touch.c 8.2 (Berkeley) 4/28/95; #endif -__RCSID($NetBSD: touch.c,v 1.27 2008/07/21 14:19:27 lukem Exp $); +__RCSID($NetBSD: touch.c,v 1.28 2009/04/28 02:47:12 yamt Exp $); #endif /* not lint */ #include sys/types.h @@ -190,9 +190,8 @@ if (!(*change_file_times)(*argv, NULL)) continue; - /* Try reading/writing. */ - if (!S_ISLNK(sb.st_mode) rw(*argv, sb, fflag)) - rval = 1; + rval = 1; + warn(%s, *argv); } exit(rval); } @@ -314,58 +313,6 @@ TIMESPEC_TO_TIMEVAL(tvp[1], sb.st_mtimespec); } -int -rw(fname, sbp, force) - char *fname; - struct stat *sbp; - int force; -{ - int fd, needed_chmod, rval; - u_char byte; - - /* Try regular files and directories. */ - if (!S_ISREG(sbp-st_mode) !S_ISDIR(sbp-st_mode)) { - warnx(%s: %s, fname, strerror(EFTYPE)); - return (1); - } - - needed_chmod = rval = 0; - if ((fd = open(fname, O_RDWR, 0)) == -1) { - if (!force || chmod(fname, DEFFILEMODE)) - goto err; - if ((fd = open(fname, O_RDWR, 0)) == -1) - goto err; - needed_chmod = 1; - } - - if (sbp-st_size != 0) { - if (read(fd, byte, sizeof(byte)) != sizeof(byte)) - goto err; - if (lseek(fd, (off_t)0, SEEK_SET) == -1) - goto err; - if (write(fd, byte, sizeof(byte)) != sizeof(byte)) - goto err; - } else { - if (write(fd, byte, sizeof(byte)) != sizeof(byte)) { -err: rval = 1; - warn(%s, fname); - } else if (ftruncate(fd, (off_t)0)) { - rval = 1; - warn(%s: file modified, fname); - } - } - - if (fd = 0 close(fd) rval != 1) { - rval = 1; - warn(%s, fname); - } - if (needed_chmod chmod(fname, sbp-st_mode) rval != 1) { - rval = 1; - warn(%s: permissions modified, fname); - } - return (rval); -} - __dead void usage() {
CVS commit: src/share/man/man4
Module Name:src Committed By: reed Date: Tue Apr 28 02:59:05 UTC 2009 Modified Files: src/share/man/man4: fast_ipsec.4 Log Message: Fix Nm (document title). (Fast IPsec is not a manual page name as I mention on netbsd-docs.) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/fast_ipsec.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/fast_ipsec.4 diff -u src/share/man/man4/fast_ipsec.4:1.7 src/share/man/man4/fast_ipsec.4:1.8 --- src/share/man/man4/fast_ipsec.4:1.7 Sun May 25 20:08:12 2008 +++ src/share/man/man4/fast_ipsec.4 Tue Apr 28 02:59:05 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: fast_ipsec.4,v 1.7 2008/05/25 20:08:12 wiz Exp $ +.\ $NetBSD: fast_ipsec.4,v 1.8 2009/04/28 02:59:05 reed Exp $ .\ $FreeBSD: fast_ipsec.4,v 1.2 2003/03/03 11:51:30 ru Exp $ .\ .\ Copyright (c) 2004 @@ -32,8 +32,8 @@ .Dt FAST_IPSEC 4 .Os .Sh NAME -.Nm Fast IPsec -.Nd hardware-accelerated IP Security Protocols +.Nm fast_ipsec +.Nd Fast IPsec hardware-accelerated IP Security Protocols .Sh SYNOPSIS .Cd options FAST_IPSEC .Cd options IPSEC_NAT_T @@ -49,7 +49,7 @@ .Tn IPComp (for IP Payload Compression Protocol) that provide security services for IP datagrams. -.Nm +Fast IPsec is an implementation of these protocols that uses the .Xr opencrypto 9 subsystem to carry out cryptographic operations. @@ -57,7 +57,7 @@ employed whenever possible to optimize the performance of these protocols. .Pp In general, the -.Nm +Fast IPsec implementation is intended to be compatible with the .Tn KAME IPsec implementation. @@ -70,7 +70,7 @@ .Xr opencrypto 9 subsystem. When the -.Nm +Fast IPsec protocols are configured for use, all protocols are included in the system. To selectively enable/disable protocols, use .Xr sysctl 8 . @@ -93,7 +93,7 @@ .Tn IPsec protocols. The -.Nm +Fast IPsec protocols are based on code which appeared in .Fx 4.7 . The
CVS commit: src/sys/kern
Module Name:src Committed By: yamt Date: Tue Apr 28 03:01:15 UTC 2009 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: do_sys_utimes: fix a bug introduced by rev.1.367. VA_UTIMES_NULL is in va_vaflags, not va_flags. To generate a diff of this commit: cvs rdiff -u -r1.391 -r1.392 src/sys/kern/vfs_syscalls.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/kern/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.391 src/sys/kern/vfs_syscalls.c:1.392 --- src/sys/kern/vfs_syscalls.c:1.391 Fri Mar 13 11:05:26 2009 +++ src/sys/kern/vfs_syscalls.c Tue Apr 28 03:01:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.391 2009/03/13 11:05:26 yamt Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.392 2009/04/28 03:01:15 yamt Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.391 2009/03/13 11:05:26 yamt Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.392 2009/04/28 03:01:15 yamt Exp $); #ifdef _KERNEL_OPT #include opt_fileassoc.h @@ -3034,7 +3034,7 @@ if (setbirthtime) vattr.va_birthtime = ts[1]; if (vanull) - vattr.va_flags |= VA_UTIMES_NULL; + vattr.va_vaflags |= VA_UTIMES_NULL; error = VOP_SETATTR(vp, vattr, l-l_cred); VOP_UNLOCK(vp, 0);
CVS commit: src/etc
Module Name:src Committed By: reed Date: Tue Apr 28 03:03:52 UTC 2009 Modified Files: src/etc: rc.subr Log Message: Get rid of extra space in Usage statement. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/etc/rc.subr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.subr diff -u src/etc/rc.subr:1.74 src/etc/rc.subr:1.75 --- src/etc/rc.subr:1.74 Sat Dec 6 23:21:32 2008 +++ src/etc/rc.subr Tue Apr 28 03:03:52 2009 @@ -1,4 +1,4 @@ -# $NetBSD: rc.subr,v 1.74 2008/12/06 23:21:32 salo Exp $ +# $NetBSD: rc.subr,v 1.75 2009/04/28 03:03:52 reed Exp $ # # Copyright (c) 1997-2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -424,7 +424,10 @@ ;; esac - _keywords=start stop restart rcvar $extra_commands + _keywords=start stop restart rcvar + if [ -n $extra_commands ]; then + _keywords=${_keywords} ${extra_commands} + fi rc_pid= _pidcmd= _procname=${procname:-${command}}
CVS commit: src/gnu/usr.bin/groff/tmac
Module Name:src Committed By: reed Date: Tue Apr 28 03:07:53 UTC 2009 Modified Files: src/gnu/usr.bin/groff/tmac: mdoc.local Log Message: Fix librefuse macro to show -lrefuse (not -lfuse). That will fix man refuse Library details. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/gnu/usr.bin/groff/tmac/mdoc.local Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/usr.bin/groff/tmac/mdoc.local diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.48 src/gnu/usr.bin/groff/tmac/mdoc.local:1.49 --- src/gnu/usr.bin/groff/tmac/mdoc.local:1.48 Wed Mar 11 14:29:06 2009 +++ src/gnu/usr.bin/groff/tmac/mdoc.local Tue Apr 28 03:07:53 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: mdoc.local,v 1.48 2009/03/11 14:29:06 joerg Exp $ +.\ $NetBSD: mdoc.local,v 1.49 2009/04/28 03:07:53 reed Exp $ .\ .\ Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -76,7 +76,7 @@ .ds doc-str-Lb-libopenpgpsdkOpenpgp signing, verification, encryption and decryption (libopenpgpsdk, \-lopenpgpsdk) .ds doc-str-Lb-libprop Property Container Object Library (libprop, \-lprop) .ds doc-str-Lb-libpuffs puffs Convenience Library (libpuffs, \-lpuffs) -.ds doc-str-Lb-librefuseFile System in Userspace Convenience Library (librefuse, \-lfuse) +.ds doc-str-Lb-librefuseFile System in Userspace Convenience Library (librefuse, \-lrefuse) .ds doc-str-Lb-libsdp Bluetooth Service Discovery Protocol library (libsdp, \-libsdp) .ds doc-str-Lb-libssp Buffer Overflow Protection Library (libssp, \-lssp) .ds doc-str-Lb-libfetch File Transfer Library for URLs (libfetch, \-lfetch)
CVS commit: src/lib/libevent
Module Name:src Committed By: reed Date: Tue Apr 28 03:11:45 UTC 2009 Modified Files: src/lib/libevent: evdns.3 Log Message: Add some mdoc macros and spell out an abbreviation. (I shared some of my fixes upstream a few days ago.) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libevent/evdns.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libevent/evdns.3 diff -u src/lib/libevent/evdns.3:1.3 src/lib/libevent/evdns.3:1.4 --- src/lib/libevent/evdns.3:1.3 Sat Apr 11 16:55:04 2009 +++ src/lib/libevent/evdns.3 Tue Apr 28 03:11:45 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: evdns.3,v 1.3 2009/04/11 16:55:04 wiz Exp $ +.\ $NetBSD: evdns.3,v 1.4 2009/04/28 03:11:45 reed Exp $ .\ .\ Copyright (c) 2006 Niels Provos pro...@citi.umich.edu .\ All rights reserved. @@ -91,7 +91,9 @@ (see http://www.imperialviolet.org/page25.html#e498). Otherwise, please continue. .Pp -This code is based on libevent and you must call event_init before +This code is based on libevent and you must call +.Fn event_init +before any of the APIs in this file. You must also seed the OpenSSL random source if you are using OpenSSL for ids (see below). @@ -99,8 +101,11 @@ This library is designed to be included and shipped with your source code. You statically link with it. -You should also test for the existence of strtok_r and define -HAVE_STRTOK_R if you have it. +You should also test for the existence of +.Dv strtok_r +and define +.Dv HAVE_STRTOK_R +if you have it. .Pp The DNS protocol requires a good source of id numbers and these numbers should be unpredictable for spoofing reasons. @@ -109,16 +114,17 @@ In increasing order of preference: .Pp .Bl -tag -width DNS_USE_GETTIMEOFDAY_FOR_ID -compact -offset indent -.It DNS_USE_GETTIMEOFDAY_FOR_ID +.It Dv DNS_USE_GETTIMEOFDAY_FOR_ID Using the bottom 16 bits of the usec result from gettimeofday. This is a pretty poor solution but should work anywhere. -.It DNS_USE_CPU_CLOCK_FOR_ID +.It Dv DNS_USE_CPU_CLOCK_FOR_ID Using the bottom 16 bits of the nsec result from the CPU's time counter. This is better, but may not work everywhere. Requires POSIX realtime support and you'll need to link against --lrt on glibc systems at least. -.It DNS_USE_OPENSSL_FOR_ID +.Lb librt +on glibc systems at least. +.It Dv DNS_USE_OPENSSL_FOR_ID Uses the OpenSSL RAND_bytes call to generate the data. You must have seeded the pool before making any calls to this library. @@ -140,11 +146,14 @@ .Pp When the lookup is complete the callback function is called. The first argument will be one of the DNS_ERR_* defines in evdns.h. -Hopefully it will be DNS_ERR_NONE, in which case type will be -DNS_IPv4_A, count will be the number of IP addresses, ttl is the time +Hopefully it will be +.Dv DNS_ERR_NONE , +in which case type will be +.Dv DNS_IPv4_A , +count will be the number of IP addresses, ttl is the time which the data can be cached for (in seconds), addresses will point to an array of uint32_t's and arg will be whatever you passed to -evdns_resolve. +.Fn evdns_resolve . .Pp Searching: .Pp @@ -157,7 +166,7 @@ .Pp Searching appears to be a single lookup from the point of view of the API, although many DNS queries may be generated from a single call to -evdns_resolve. +.Fn evdns_resolve . Searching can also drastically slow down the resolution of names. .Pp To disable searching: @@ -174,27 +183,34 @@ If you do call .Fn evdns_resolv_conf_parse then don't pass -.Va DNS_OPTION_SEARCH +.Dv DNS_OPTION_SEARCH (or -.Va DNS_OPTIONS_ALL , +.Dv DNS_OPTIONS_ALL , which implies it). .It When calling .Fn evdns_resolve , pass the -.Va DNS_QUERY_NO_SEARCH +.Dv DNS_QUERY_NO_SEARCH flag. .El .Pp The order of searches depends on the number of dots in the name. -If the number is greater than the ndots setting then the names is -first tried globally. +If the number is greater than the +.Sy ndots +setting then the names is first tried globally. Otherwise each search domain is appended in turn. .Pp -The ndots setting can either be set from a resolv.conf, or by calling -evdns_search_ndots_set. -.Pp -For example, with ndots set to 1 (the default) and a search domain list of +The +.Sy ndots +setting can either be set from a +.Pa resolv.conf , +or by calling +.Fn evdns_search_ndots_set . +.Pp +For example, with +.Sy ndots +set to 1 (the default) and a search domain list of [myhome.net]: Query: www Order: www.myhome.net, www. @@ -208,7 +224,9 @@ .Fn evdns_resolv_conf_parse . .It Ft int Fn evdns_nameserver_add unsigned long int address Add a nameserver. -The address should be an IP address in network byte order. +The +.Ar address +should be an IP address in network byte order. The type of address is chosen so that it matches in_addr.s_addr. Returns non-zero on error. .It Ft int Fn evdns_nameserver_ip_add const char *ip_as_string @@ -217,14 +235,22 @@ Returns
CVS commit: src/sys/arch/xen/xenbus
Module Name:src Committed By: cegger Date: Tue Apr 28 05:44:43 UTC 2009 Modified Files: src/sys/arch/xen/xenbus: xenbus_client.c xenbus_xs.c Log Message: sprintf - snprintf To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/xen/xenbus/xenbus_client.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/xen/xenbus/xenbus_xs.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/xen/xenbus/xenbus_client.c diff -u src/sys/arch/xen/xenbus/xenbus_client.c:1.9 src/sys/arch/xen/xenbus/xenbus_client.c:1.10 --- src/sys/arch/xen/xenbus/xenbus_client.c:1.9 Fri Sep 5 13:37:24 2008 +++ src/sys/arch/xen/xenbus/xenbus_client.c Tue Apr 28 05:44:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: xenbus_client.c,v 1.9 2008/09/05 13:37:24 tron Exp $ */ +/* $NetBSD: xenbus_client.c,v 1.10 2009/04/28 05:44:43 cegger Exp $ */ /** * Client-facing interface for the Xenbus driver. In other words, the * interface between the Xenbus and the device-specific code, be it the @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xenbus_client.c,v 1.9 2008/09/05 13:37:24 tron Exp $); +__KERNEL_RCSID(0, $NetBSD: xenbus_client.c,v 1.10 2009/04/28 05:44:43 cegger Exp $); #if 0 #define DPRINTK(fmt, args...) \ @@ -170,7 +170,7 @@ if (printf_buffer == NULL) goto fail; - len = sprintf(printf_buffer, %i , -err); + len = snprintf(printf_buffer, PRINTF_BUFFER_SIZE, %i , -err); ret = vsnprintf(printf_buffer+len, PRINTF_BUFFER_SIZE-len, fmt, ap); KASSERT(len + ret PRINTF_BUFFER_SIZE); Index: src/sys/arch/xen/xenbus/xenbus_xs.c diff -u src/sys/arch/xen/xenbus/xenbus_xs.c:1.17 src/sys/arch/xen/xenbus/xenbus_xs.c:1.18 --- src/sys/arch/xen/xenbus/xenbus_xs.c:1.17 Wed Oct 29 13:53:15 2008 +++ src/sys/arch/xen/xenbus/xenbus_xs.c Tue Apr 28 05:44:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: xenbus_xs.c,v 1.17 2008/10/29 13:53:15 cegger Exp $ */ +/* $NetBSD: xenbus_xs.c,v 1.18 2009/04/28 05:44:43 cegger Exp $ */ /** * xenbus_xs.c * @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xenbus_xs.c,v 1.17 2008/10/29 13:53:15 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: xenbus_xs.c,v 1.18 2009/04/28 05:44:43 cegger Exp $); #if 0 #define DPRINTK(fmt, args...) \ @@ -651,7 +651,7 @@ int err; int s; - sprintf(token, %lX, (long)watch); + snprintf(token, sizeof(token), %lX, (long)watch); s = spltty(); @@ -681,7 +681,7 @@ char token[sizeof(watch) * 2 + 1]; int err, s; - sprintf(token, %lX, (long)watch); + snprintf(token, sizeof(token), %lX, (long)watch); s = spltty(); @@ -725,7 +725,7 @@ char token[sizeof(watch) * 2 + 1]; /* No need for watches_lock: the suspend_mutex is sufficient. */ SLIST_FOREACH(watch, watches, watch_next) { - sprintf(token, %lX, (long)watch); + snprintf(token, sizeof(token), %lX, (long)watch); xs_watch(watch-node, token); }