CVS commit: [tls-maxphys] src/sys
Module Name:src Committed By: tls Date: Sun Dec 2 05:46:40 UTC 2012 Modified Files: src/sys/arch/hp300/dev [tls-maxphys]: rd.c src/sys/arch/vax/mba [tls-maxphys]: hp.c src/sys/arch/vax/vsa [tls-maxphys]: hdc9224.c src/sys/dev [tls-maxphys]: ccd.c ccdvar.h fss.c src/sys/dev/dkwedge [tls-maxphys]: dk.c src/sys/dev/gpib [tls-maxphys]: rd.c src/sys/kern [tls-maxphys]: subr_disk.c Log Message: Don't pass NULL struct dkdriver to disk_init. That's seriously bogus. To generate a diff of this commit: cvs rdiff -u -r1.92.6.1 -r1.92.6.2 src/sys/arch/hp300/dev/rd.c cvs rdiff -u -r1.48 -r1.48.18.1 src/sys/arch/vax/mba/hp.c cvs rdiff -u -r1.51 -r1.51.18.1 src/sys/arch/vax/vsa/hdc9224.c cvs rdiff -u -r1.143 -r1.143.10.1 src/sys/dev/ccd.c cvs rdiff -u -r1.32 -r1.32.14.1 src/sys/dev/ccdvar.h cvs rdiff -u -r1.83 -r1.83.2.1 src/sys/dev/fss.c cvs rdiff -u -r1.64.2.1 -r1.64.2.2 src/sys/dev/dkwedge/dk.c cvs rdiff -u -r1.30.6.1 -r1.30.6.2 src/sys/dev/gpib/rd.c cvs rdiff -u -r1.100.18.1 -r1.100.18.2 src/sys/kern/subr_disk.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/dev/rd.c diff -u src/sys/arch/hp300/dev/rd.c:1.92.6.1 src/sys/arch/hp300/dev/rd.c:1.92.6.2 --- src/sys/arch/hp300/dev/rd.c:1.92.6.1 Tue Nov 20 03:01:21 2012 +++ src/sys/arch/hp300/dev/rd.c Sun Dec 2 05:46:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rd.c,v 1.92.6.1 2012/11/20 03:01:21 tls Exp $ */ +/* $NetBSD: rd.c,v 1.92.6.2 2012/12/02 05:46:39 tls Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.92.6.1 2012/11/20 03:01:21 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.92.6.2 2012/12/02 05:46:39 tls Exp $"); #include "opt_useleds.h" @@ -290,6 +290,19 @@ const struct cdevsw rd_cdevsw = { nostop, notty, nopoll, nommap, nokqfilter, D_DISK }; +static void +rdminphys(struct buf *bp) +{ +struct rd_softc *sc = device_lookup_private(&rd_cd, rdunit(bp->b_dev)); + +long xmax; +xmax = sc->sc_dev->dv_maxphys; +if (bp->b_bcount > xmax) + bp->b_bcount = xmax; +} + +const struct dkdriver rd_dkdriver = { rdstrategy, rdminphys }; + static int rdmatch(device_t parent, cfdata_t cf, void *aux) { @@ -334,7 +347,7 @@ rdattach(device_t parent, device_t self, * Initialize and attach the disk structure. */ memset(&sc->sc_dkdev, 0, sizeof(sc->sc_dkdev)); - disk_init(&sc->sc_dkdev, device_xname(sc->sc_dev), NULL); + disk_init(&sc->sc_dkdev, device_xname(sc->sc_dev), &rd_dkdriver); disk_attach(&sc->sc_dkdev); sc->sc_slave = ha->ha_slave; Index: src/sys/arch/vax/mba/hp.c diff -u src/sys/arch/vax/mba/hp.c:1.48 src/sys/arch/vax/mba/hp.c:1.48.18.1 --- src/sys/arch/vax/mba/hp.c:1.48 Tue Dec 14 23:38:30 2010 +++ src/sys/arch/vax/mba/hp.c Sun Dec 2 05:46:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: hp.c,v 1.48 2010/12/14 23:38:30 matt Exp $ */ +/* $NetBSD: hp.c,v 1.48.18.1 2012/12/02 05:46:39 tls Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hp.c,v 1.48 2010/12/14 23:38:30 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hp.c,v 1.48.18.1 2012/12/02 05:46:39 tls Exp $"); #include #include @@ -118,6 +118,8 @@ const struct cdevsw hp_cdevsw = { .d_flag = D_DISK }; +const struct dkdriver hp_dkdriver = { hpstrategy, minphys }; + #define HP_WCSR(reg, val) \ bus_space_write_4(sc->sc_iot, sc->sc_ioh, (reg), (val)) #define HP_RCSR(reg) \ @@ -174,7 +176,7 @@ hpattach(device_t parent, device_t self, /* * Init and attach the disk structure. */ - disk_init(&sc->sc_disk, device_xname(sc->sc_dev), NULL); + disk_init(&sc->sc_disk, device_xname(sc->sc_dev), &hp_dkdriver); disk_attach(&sc->sc_disk); /* Index: src/sys/arch/vax/vsa/hdc9224.c diff -u src/sys/arch/vax/vsa/hdc9224.c:1.51 src/sys/arch/vax/vsa/hdc9224.c:1.51.18.1 --- src/sys/arch/vax/vsa/hdc9224.c:1.51 Tue Dec 14 23:31:16 2010 +++ src/sys/arch/vax/vsa/hdc9224.c Sun Dec 2 05:46:39 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: hdc9224.c,v 1.51 2010/12/14 23:31:16 matt Exp $ */ +/* $NetBSD: hdc9224.c,v 1.51.18.1 2012/12/02 05:46:39 tls Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -51,7 +51,7 @@ #undef RDDEBUG #include -__KERNEL_RCSID(0, "$NetBSD: hdc9224.c,v 1.51 2010/12/14 23:31:16 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdc9224.c,v 1.51.18.1 2012/12/02 05:46:39 tls Exp $"); #include #include @@ -228,6 +228,14 @@ static volatile int u; #define HDC_WCMD(x) *(volatile char *)(sc->sc_regs + 4) = (x) #define HDC_RSTAT *(volatile char *)(sc->sc_regs + 4) +static void +rdminphys(struct buf *bp) +{ + if (bp->b_bcount > rd_dmasize) + bp->b_bcount = rd_dmasize; +} + +const struct dkdriver rd_dkdriver = { rdstrategy, rdminphys }; /* * new-config's hdcmatc
CVS commit: [tls-maxphys] src/sys/dev/pci
Module Name:src Committed By: tls Date: Sun Dec 2 05:46:04 UTC 2012 Modified Files: src/sys/dev/pci [tls-maxphys]: arcmsr.c arcmsrvar.h Log Message: Areca controller maximum-transfer size limits -- looked up in FreeBSD driver. Actually exporting the per-volume transfer size for this driver will be quite hard; the controller firmware shows the host the configured volumes when the host probes the controller's "scsibus", and we can't really associate them with particular RAID volumes until later. I think we will have to intercept the SCSI inquiry commands -- yuck. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.30.12.1 src/sys/dev/pci/arcmsr.c cvs rdiff -u -r1.14 -r1.14.12.1 src/sys/dev/pci/arcmsrvar.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/pci/arcmsr.c diff -u src/sys/dev/pci/arcmsr.c:1.30 src/sys/dev/pci/arcmsr.c:1.30.12.1 --- src/sys/dev/pci/arcmsr.c:1.30 Mon Jun 20 22:03:16 2011 +++ src/sys/dev/pci/arcmsr.c Sun Dec 2 05:46:03 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: arcmsr.c,v 1.30 2011/06/20 22:03:16 pgoyette Exp $ */ +/* $NetBSD: arcmsr.c,v 1.30.12.1 2012/12/02 05:46:03 tls Exp $ */ /* $OpenBSD: arc.c,v 1.68 2007/10/27 03:28:27 dlg Exp $ */ /* @@ -21,7 +21,7 @@ #include "bio.h" #include -__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.30 2011/06/20 22:03:16 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arcmsr.c,v 1.30.12.1 2012/12/02 05:46:03 tls Exp $"); #include #include @@ -259,8 +259,8 @@ arc_shutdown(device_t self, int how) static void arc_minphys(struct buf *bp) { - if (bp->b_bcount > MAXPHYS) - bp->b_bcount = MAXPHYS; + if (bp->b_bcount > ARC_MAX_XFER) + bp->b_bcount = ARC_MAX_XFER; minphys(bp); } @@ -2091,8 +2091,9 @@ arc_alloc_ccbs(device_t self) for (i = 0; i < sc->sc_req_count; i++) { ccb = &sc->sc_ccbs[i]; - if (bus_dmamap_create(sc->sc_dmat, MAXPHYS, ARC_SGL_MAXLEN, - MAXPHYS, 0, 0, &ccb->ccb_dmamap) != 0) { + if (bus_dmamap_create(sc->sc_dmat, ARC_MAX_XFER, + ARC_SGL_MAXLEN, ARC_MAX_XFER, + 0, 0, &ccb->ccb_dmamap) != 0) { aprint_error_dev(self, "unable to create dmamap for ccb %d\n", i); goto free_maps; Index: src/sys/dev/pci/arcmsrvar.h diff -u src/sys/dev/pci/arcmsrvar.h:1.14 src/sys/dev/pci/arcmsrvar.h:1.14.12.1 --- src/sys/dev/pci/arcmsrvar.h:1.14 Mon Jun 20 13:26:58 2011 +++ src/sys/dev/pci/arcmsrvar.h Sun Dec 2 05:46:03 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: arcmsrvar.h,v 1.14 2011/06/20 13:26:58 pgoyette Exp $ */ +/* $NetBSD: arcmsrvar.h,v 1.14.12.1 2012/12/02 05:46:03 tls Exp $ */ /* Derived from $OpenBSD: arc.c,v 1.68 2007/10/27 03:28:27 dlg Exp $ */ /* @@ -127,7 +127,10 @@ struct arc_sge { #define ARC_MAX_TARGET 16 #define ARC_MAX_LUN 8 #define ARC_MAX_IOCMDLEN 512 +#define ARC_MAX_XFER_BLOCKS 4096 #define ARC_BLOCKSIZE 512 +#define ARC_MAX_XFER (MIN(MACHINE_MAXPHYS, \ + ARC_MAX_XFER_BLOCKS * ARC_BLOCKSIZE)) /* * the firmware deals with up to 256 or 512 byte command frames.
CVS commit: src
Module Name:src Committed By: reed Date: Sun Dec 2 02:21:29 UTC 2012 Modified Files: src/distrib/sets/lists/man: mi src/usr.bin/mkubootimage: Makefile Log Message: install the mkubootimage(1) manual To generate a diff of this commit: cvs rdiff -u -r1.1408 -r1.1409 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.2 -r1.3 src/usr.bin/mkubootimage/Makefile 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/man/mi diff -u src/distrib/sets/lists/man/mi:1.1408 src/distrib/sets/lists/man/mi:1.1409 --- src/distrib/sets/lists/man/mi:1.1408 Mon Nov 26 00:41:48 2012 +++ src/distrib/sets/lists/man/mi Sun Dec 2 02:21:28 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1408 2012/11/26 00:41:48 rkujawa Exp $ +# $NetBSD: mi,v 1.1409 2012/12/02 02:21:28 reed Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -300,6 +300,7 @@ ./usr/share/man/cat1/mkfilters.0 man-ipf-catman ipfilter,.cat ./usr/share/man/cat1/mklocale.0 man-util-catman .cat ./usr/share/man/cat1/mktemp.0 man-util-catman .cat +./usr/share/man/cat1/mkubootimage.0 man-util-catman .cat ./usr/share/man/cat1/mopa.out.0 man-obsolete obsolete ./usr/share/man/cat1/mopchk.0 man-bootserver-catman .cat ./usr/share/man/cat1/mopcopy.0 man-bootserver-catman .cat @@ -3286,6 +3287,7 @@ ./usr/share/man/html1/mkfilters.html man-ipf-htmlman ipfilter,html ./usr/share/man/html1/mklocale.html man-util-htmlman html ./usr/share/man/html1/mktemp.html man-util-htmlman html +./usr/share/man/html1/mkubootimage.html man-util-htmlman html ./usr/share/man/html1/mopchk.html man-bootserver-htmlman html ./usr/share/man/html1/mopcopy.html man-bootserver-htmlman html ./usr/share/man/html1/mopprobe.html man-bootserver-htmlman html @@ -5910,6 +5912,7 @@ ./usr/share/man/man1/mkfilters.1 man-ipf-man ipfilter,.man ./usr/share/man/man1/mklocale.1 man-util-man .man ./usr/share/man/man1/mktemp.1 man-util-man .man +./usr/share/man/man1/mkubootimage.1 man-util-man .man ./usr/share/man/man1/mopa.out.1 man-obsolete obsolete ./usr/share/man/man1/mopchk.1 man-bootserver-man .man ./usr/share/man/man1/mopcopy.1 man-bootserver-man .man Index: src/usr.bin/mkubootimage/Makefile diff -u src/usr.bin/mkubootimage/Makefile:1.2 src/usr.bin/mkubootimage/Makefile:1.3 --- src/usr.bin/mkubootimage/Makefile:1.2 Thu May 26 12:56:33 2011 +++ src/usr.bin/mkubootimage/Makefile Sun Dec 2 02:21:29 2012 @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.2 2011/05/26 12:56:33 joerg Exp $ +# $NetBSD: Makefile,v 1.3 2012/12/02 02:21:29 reed Exp $ PROG= mkubootimage SRCS= mkubootimage.c crc32.c -NOMAN= # defined CWARNFLAGS.clang+= -Wno-conversion
CVS commit: [netbsd-6] src
Module Name:src Committed By: riz Date: Sun Dec 2 02:06:22 UTC 2012 Modified Files: src/distrib/sets/lists/comp [netbsd-6]: mi src/doc [netbsd-6]: CHANGES-6.1 Log Message: Adjust ticket #693: lzf doesn't get built in netbsd-6, so revision 1.1781 of distrib/sets/lists/comp/mi should not have been pulled up as part of it. To generate a diff of this commit: cvs rdiff -u -r1.1738.2.14 -r1.1738.2.15 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.1.2.50 -r1.1.2.51 src/doc/CHANGES-6.1 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/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1738.2.14 src/distrib/sets/lists/comp/mi:1.1738.2.15 --- src/distrib/sets/lists/comp/mi:1.1738.2.14 Thu Nov 29 00:09:46 2012 +++ src/distrib/sets/lists/comp/mi Sun Dec 2 02:06:19 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1738.2.14 2012/11/29 00:09:46 riz Exp $ +# $NetBSD: mi,v 1.1738.2.15 2012/12/02 02:06:19 riz Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3718,7 +3718,6 @@ ./usr/libdata/debug/usr/bin/mkfifo.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/mklocale.debug comp-locale-debug debug ./usr/libdata/debug/usr/bin/mkstr.debug comp-c-debug debug -./usr/libdata/debug/usr/bin/lzf.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/mktemp.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/mkubootimage.debug comp-util-debug debug ./usr/libdata/debug/usr/bin/modstat.debug comp-obsolete obsolete Index: src/doc/CHANGES-6.1 diff -u src/doc/CHANGES-6.1:1.1.2.50 src/doc/CHANGES-6.1:1.1.2.51 --- src/doc/CHANGES-6.1:1.1.2.50 Sat Dec 1 09:58:35 2012 +++ src/doc/CHANGES-6.1 Sun Dec 2 02:06:18 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1,v 1.1.2.50 2012/12/01 09:58:35 msaitoh Exp $ +# $NetBSD: CHANGES-6.1,v 1.1.2.51 2012/12/02 02:06:18 riz Exp $ A complete list of changes from the 6.0 release until the 6.1 release: @@ -599,7 +599,6 @@ distrib/utils/sysinst/util.c 1.180 distrib/sets/lists/base/mi 1.1007,1.1009 distrib/sets/lists/base/shl.mi 1.636 -distrib/sets/lists/comp/mi 1.1781 distrib/sets/lists/comp/shl.mi 1.236 distrib/sets/lists/modules/mi 1.48 distrib/sets/lists/modules/md.evbppc 1.27-1.28 @@ -916,7 +915,7 @@ sys/dev/usb/if_urndis.c1.4 lib/libc/arch/arm/sys/__aeabi_read_tp.S 1.3 - Add $NetBSD: CHANGES-6.1,v 1.1.2.50 2012/12/01 09:58:35 msaitoh Exp $ tag. Use ip to save r1 instead of the stack. + Add $NetBSD: CHANGES-6.1,v 1.1.2.51 2012/12/02 02:06:18 riz Exp $ tag. Use ip to save r1 instead of the stack. [matt, ticket #701] sys/net/npf/npf.c1.14
CVS commit: src
Module Name:src Committed By: chs Date: Sun Dec 2 01:05:17 UTC 2012 Modified Files: src/external/cddl/osnet/dev/cyclic: cyclic.c src/external/cddl/osnet/dev/cyclic/i386: cyclic_machdep.c src/external/cddl/osnet/sys/sys: cyclic_impl.h src/sys/kern: kern_clock.c src/sys/modules: Makefile src/sys/modules/dtrace: Makefile src/sys/sys: dtrace_bsd.h Added Files: src/sys/modules/cyclic: Makefile src/sys/modules/dtrace/profile: Makefile Log Message: adapt the cyclic module and profile dtrace provider to netbsd. for now, just hook the cyclic callback into hardclock(). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/dev/cyclic/cyclic.c cvs rdiff -u -r1.3 -r1.4 \ src/external/cddl/osnet/dev/cyclic/i386/cyclic_machdep.c cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sys/sys/cyclic_impl.h cvs rdiff -u -r1.130 -r1.131 src/sys/kern/kern_clock.c cvs rdiff -u -r1.115 -r1.116 src/sys/modules/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/cyclic/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/modules/dtrace/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/dtrace/profile/Makefile cvs rdiff -u -r1.6 -r1.7 src/sys/sys/dtrace_bsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dev/cyclic/cyclic.c diff -u src/external/cddl/osnet/dev/cyclic/cyclic.c:1.3 src/external/cddl/osnet/dev/cyclic/cyclic.c:1.4 --- src/external/cddl/osnet/dev/cyclic/cyclic.c:1.3 Sun Dec 2 00:05:38 2012 +++ src/external/cddl/osnet/dev/cyclic/cyclic.c Sun Dec 2 01:05:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cyclic.c,v 1.3 2012/12/02 00:05:38 chs Exp $ */ +/* $NetBSD: cyclic.c,v 1.4 2012/12/02 01:05:16 chs Exp $ */ /* * CDDL HEADER START @@ -326,8 +326,10 @@ #include #include #include +#ifdef __FreeBSD___ #include #include +#endif #include #include #include @@ -335,7 +337,32 @@ #include #include #include +#ifdef __FreeBSD__ #include +#endif + +#ifdef __NetBSD__ +#include +#include +#include + +#undef mutex_init +#define mtx_init(m, d, p, f) mutex_init(m, MUTEX_DEFAULT, IPL_CLOCK) +#define mtx_lock_spin(x) mutex_spin_enter(x) +#define mtx_unlock_spin(x) mutex_spin_exit(x) +#define mtx_destroy(x) mutex_destroy(x) + +#define ASSERT(x) KASSERT(x) +#define SYSINIT(a1, a2, a3, a4, a5) +#define SYSUNINIT(a1, a2, a3, a4, a5) +#define CPU_FOREACH(var) \ + CPU_INFO_ITERATOR cii; \ + struct cpu_info *ci; \ + for (CPU_INFO_FOREACH(cii, ci)) +#define MAXCPU MAXCPUS +#define TRAPF_USERMODE(x) CLKF_USERMODE(x) +#define TRAPF_PC(x) CLKF_PC(x) +#endif static kmem_cache_t *cyclic_id_cache; static cyc_id_t *cyclic_id_head; @@ -873,7 +900,7 @@ cyclic_configure(cpu_t *c) ASSERT(MUTEX_HELD(&cpu_lock)); if (cyclic_id_cache == NULL) - cyclic_id_cache = kmem_cache_create("cyclic_id_cache", + cyclic_id_cache = kmem_cache_create(__UNCONST("cyclic_id_cache"), sizeof (cyc_id_t), 0, NULL, NULL, NULL, NULL, NULL, 0); cpu->cyp_cpu = c; @@ -1110,7 +1137,7 @@ cyclic_id_t cyclic_add(cyc_handler_t *hdlr, cyc_time_t *when) { cyc_id_t *idp = cyclic_new_id(); - solaris_cpu_t *c = &solaris_cpu[curcpu]; + solaris_cpu_t *c = &solaris_cpu[cpu_number()]; ASSERT(MUTEX_HELD(&cpu_lock)); ASSERT(when->cyt_when >= 0 && when->cyt_interval > 0); @@ -1217,6 +1244,7 @@ cyclic_add_omni(cyc_omni_handler_t *omni idp->cyi_omni_hdlr = *omni; CPU_FOREACH(i) { + i = cpu_index(ci); c = &solaris_cpu[i]; if ((cpu = c->cpu_cyclic) == NULL) continue; @@ -1305,7 +1333,7 @@ cyclic_init(cyc_backend_t *be) */ bcopy(be, &cyclic_backend, sizeof (cyc_backend_t)); - cyclic_configure(&solaris_cpu[curcpu]); + cyclic_configure(&solaris_cpu[cpu_number()]); } /* @@ -1320,15 +1348,20 @@ cyclic_mp_init(void) cpu_t *c; int i; +#ifndef __NetBSD__ mutex_enter(&cpu_lock); +#endif CPU_FOREACH(i) { + i = cpu_index(ci); c = &solaris_cpu[i]; if (c->cpu_cyclic == NULL) cyclic_configure(c); } +#ifndef __NetBSD__ mutex_exit(&cpu_lock); +#endif } static void @@ -1338,6 +1371,7 @@ cyclic_uninit(void) int id; CPU_FOREACH(id) { + id = cpu_index(ci); c = &solaris_cpu[id]; if (c->cpu_cyclic == NULL) continue; @@ -1379,6 +1413,7 @@ cyclic_unload(void) SYSUNINIT(cyclic_unregister, SI_SUB_CYCLIC, SI_ORDER_SECOND, cyclic_unload, NULL); +#ifdef __FreeBSD__ /* ARGSUSED */ static int cyclic_modevent(module_t mod __unused, int type, void *data __unused) @@ -1406,3 +1441,24 @@ cyclic_modevent(module_t mod __unused, i DEV_MODULE(cyclic, cyclic_modevent, NULL); MODULE_VERSION(cyclic, 1); MODULE_DEPEND(cyclic, opensolaris, 1, 1, 1); +#endif + +#ifdef __NetBSD__ +static int +cyclic_modcmd(modcmd_t cmd, void *data) +{ + switch (cmd) { + case MODULE_CMD_INIT: + cyclic_load(NULL); + return 0; + + case MODULE_CMD_FINI: + cyclic_unload(); + return 0; + default: + return ENOTTY; +
CVS commit: src/sys/modules/dtrace
Module Name:src Committed By: chs Date: Sun Dec 2 00:47:37 UTC 2012 Modified Files: src/sys/modules/dtrace/fbt: Makefile src/sys/modules/dtrace/sdt: Makefile Log Message: remove unneeded include dirs. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/modules/dtrace/fbt/Makefile cvs rdiff -u -r1.4 -r1.5 src/sys/modules/dtrace/sdt/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/dtrace/fbt/Makefile diff -u src/sys/modules/dtrace/fbt/Makefile:1.3 src/sys/modules/dtrace/fbt/Makefile:1.4 --- src/sys/modules/dtrace/fbt/Makefile:1.3 Tue Dec 14 23:27:48 2010 +++ src/sys/modules/dtrace/fbt/Makefile Sun Dec 2 00:47:37 2012 @@ -8,7 +8,6 @@ KMOD= fbt SRCS= fbt.c CPPFLAGS+= -I${NETBSDSRCDIR}/external/cddl/osnet/sys \ - -I${NETBSDSRCDIR}/external/cddl/osnet/dev/sdt \ -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common CPPFLAGS+= -Wno-unknown-pragmas Index: src/sys/modules/dtrace/sdt/Makefile diff -u src/sys/modules/dtrace/sdt/Makefile:1.4 src/sys/modules/dtrace/sdt/Makefile:1.5 --- src/sys/modules/dtrace/sdt/Makefile:1.4 Tue Dec 14 23:27:48 2010 +++ src/sys/modules/dtrace/sdt/Makefile Sun Dec 2 00:47:37 2012 @@ -8,8 +8,7 @@ KMOD= sdt SRCS= sdt.c CPPFLAGS+= -I${NETBSDSRCDIR}/external/cddl/osnet/sys \ - -I${NETBSDSRCDIR}/external/cddl/osnet/dev/sdt \ - -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common + -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common CPPFLAGS+= -Wno-unknown-pragmas
CVS commit: src
Module Name:src Committed By: chs Date: Sun Dec 2 00:05:39 UTC 2012 Modified Files: src/external/cddl/osnet/dev/cyclic: cyclic.c src/external/cddl/osnet/dev/cyclic/i386: cyclic_machdep.c src/external/cddl/osnet/sys/sys: cyclic.h cyclic_impl.h src/sys/sys: dtrace_bsd.h Removed Files: src/external/cddl/osnet/dev/cyclic/amd64: cyclic_machdep.c Log Message: update cyclic module to the freebsd 8-stable version as of svn r219520. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/dev/cyclic/cyclic.c cvs rdiff -u -r1.2 -r0 \ src/external/cddl/osnet/dev/cyclic/amd64/cyclic_machdep.c cvs rdiff -u -r1.2 -r1.3 \ src/external/cddl/osnet/dev/cyclic/i386/cyclic_machdep.c cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/sys/sys/cyclic.h cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/sys/sys/cyclic_impl.h cvs rdiff -u -r1.5 -r1.6 src/sys/sys/dtrace_bsd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dev/cyclic/cyclic.c diff -u src/external/cddl/osnet/dev/cyclic/cyclic.c:1.2 src/external/cddl/osnet/dev/cyclic/cyclic.c:1.3 --- src/external/cddl/osnet/dev/cyclic/cyclic.c:1.2 Sun Feb 21 01:46:33 2010 +++ src/external/cddl/osnet/dev/cyclic/cyclic.c Sun Dec 2 00:05:38 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cyclic.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */ +/* $NetBSD: cyclic.c,v 1.3 2012/12/02 00:05:38 chs Exp $ */ /* * CDDL HEADER START @@ -23,7 +23,7 @@ * * Portions Copyright 2008 John Birrell * - * $FreeBSD: src/sys/cddl/dev/cyclic/cyclic.c,v 1.2.2.1 2009/08/03 08:13:06 kensmith Exp $ + * $FreeBSD$ * * This is a simplified version of the cyclic timer subsystem from * OpenSolaris. In the FreeBSD version, we don't use interrupt levels. @@ -475,73 +475,6 @@ cyclic_expire(cyc_cpu_t *cpu, cyc_index_ (*handler)(arg); } -static void -cyclic_enable_xcall(void *v) -{ - cyc_xcallarg_t *argp = v; - cyc_cpu_t *cpu = argp->cyx_cpu; - cyc_backend_t *be = cpu->cyp_backend; - - be->cyb_enable(be->cyb_arg); -} - -static void -cyclic_enable(cyc_cpu_t *cpu) -{ - cyc_backend_t *be = cpu->cyp_backend; - cyc_xcallarg_t arg; - - arg.cyx_cpu = cpu; - - /* Cross call to the target CPU */ - be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_enable_xcall, &arg); -} - -static void -cyclic_disable_xcall(void *v) -{ - cyc_xcallarg_t *argp = v; - cyc_cpu_t *cpu = argp->cyx_cpu; - cyc_backend_t *be = cpu->cyp_backend; - - be->cyb_disable(be->cyb_arg); -} - -static void -cyclic_disable(cyc_cpu_t *cpu) -{ - cyc_backend_t *be = cpu->cyp_backend; - cyc_xcallarg_t arg; - - arg.cyx_cpu = cpu; - - /* Cross call to the target CPU */ - be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_disable_xcall, &arg); -} - -static void -cyclic_reprogram_xcall(void *v) -{ - cyc_xcallarg_t *argp = v; - cyc_cpu_t *cpu = argp->cyx_cpu; - cyc_backend_t *be = cpu->cyp_backend; - - be->cyb_reprogram(be->cyb_arg, argp->cyx_exp); -} - -static void -cyclic_reprogram(cyc_cpu_t *cpu, hrtime_t exp) -{ - cyc_backend_t *be = cpu->cyp_backend; - cyc_xcallarg_t arg; - - arg.cyx_cpu = cpu; - arg.cyx_exp = exp; - - /* Cross call to the target CPU */ - be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_reprogram_xcall, &arg); -} - /* * cyclic_fire(cpu_t *) * @@ -572,17 +505,15 @@ static void cyclic_fire(cpu_t *c) { cyc_cpu_t *cpu = c->cpu_cyclic; - - mtx_lock_spin(&cpu->cyp_mtx); - + cyc_backend_t *be = cpu->cyp_backend; cyc_index_t *heap = cpu->cyp_heap; cyclic_t *cyclic, *cyclics = cpu->cyp_cyclics; + void *arg = be->cyb_arg; hrtime_t now = gethrtime(); hrtime_t exp; if (cpu->cyp_nelems == 0) { /* This is a spurious fire. */ - mtx_unlock_spin(&cpu->cyp_mtx); return; } @@ -633,8 +564,45 @@ cyclic_fire(cpu_t *c) * Now we have a cyclic in the root slot which isn't in the past; * reprogram the interrupt source. */ - cyclic_reprogram(cpu, exp); + be->cyb_reprogram(arg, exp); +} + +static void +cyclic_expand_xcall(cyc_xcallarg_t *arg) +{ + cyc_cpu_t *cpu = arg->cyx_cpu; + cyc_index_t new_size = arg->cyx_size, size = cpu->cyp_size, i; + cyc_index_t *new_heap = arg->cyx_heap; + cyclic_t *cyclics = cpu->cyp_cyclics, *new_cyclics = arg->cyx_cyclics; + + /* Disable preemption and interrupts. */ + mtx_lock_spin(&cpu->cyp_mtx); + + /* + * Assert that the new size is a power of 2. + */ + ASSERT((new_size & (new_size - 1)) == 0); + ASSERT(new_size == (size << 1)); + ASSERT(cpu->cyp_heap != NULL && cpu->cyp_cyclics != NULL); + + bcopy(cpu->cyp_heap, new_heap, sizeof (cyc_index_t) * size); + bcopy(cyclics, new_cyclics, sizeof (cyclic_t) * size); + + /* + * Set up the free list, and set all of the new cyclics to be CYF_FREE. + */ + for (i = size; i < new_size; i++) { + new_heap[i] = i; + new_cyclics[i].cy_flags = CYF_FREE; + } + /* + * We can go ahead and plow the value of cyp_heap and cyp_cyclics; + * cyclic_expand() has kept a copy.
CVS commit: src/tests/ipf
Module Name:src Committed By: pgoyette Date: Sat Dec 1 21:37:41 UTC 2012 Modified Files: src/tests/ipf: t_nat_exec.sh Log Message: More test clean-up To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tests/ipf/t_nat_exec.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/ipf/t_nat_exec.sh diff -u src/tests/ipf/t_nat_exec.sh:1.11 src/tests/ipf/t_nat_exec.sh:1.12 --- src/tests/ipf/t_nat_exec.sh:1.11 Thu Nov 29 17:22:17 2012 +++ src/tests/ipf/t_nat_exec.sh Sat Dec 1 21:37:41 2012 @@ -1,4 +1,4 @@ -# $NetBSD: t_nat_exec.sh,v 1.11 2012/11/29 17:22:17 pgoyette Exp $ +# $NetBSD: t_nat_exec.sh,v 1.12 2012/12/01 21:37:41 pgoyette Exp $ # # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -48,6 +48,8 @@ nattest() format="$format" + test -f in && test -f reg || atf_fail "Test input file missing" + { while read rule; do atf_check -o save:save -x \ "echo \"$rule\" | ipftest $format -RDbN - -i in $args" @@ -95,7 +97,7 @@ test_case n9_6 nattest hex hex -6 test_case n11_6 nattest text text -6 test_case n12_6 nattest hex hex -6 test_case n15_6 nattest text text -6 -failing_test_case n17_6 nattest "Test input file missing" hex hex -6 +failing_test_case n17_6 nattest "Test golden output file missing" hex hex -6 atf_init_test_cases() {
CVS commit: src/tests/ipf
Module Name:src Committed By: pgoyette Date: Sat Dec 1 21:25:51 UTC 2012 Modified Files: src/tests/ipf: t_pools.sh Log Message: Put the reason for expected failure in the correct position To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/ipf/t_pools.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/ipf/t_pools.sh diff -u src/tests/ipf/t_pools.sh:1.6 src/tests/ipf/t_pools.sh:1.7 --- src/tests/ipf/t_pools.sh:1.6 Sat Dec 1 04:40:00 2012 +++ src/tests/ipf/t_pools.sh Sat Dec 1 21:25:51 2012 @@ -1,4 +1,4 @@ -# $NetBSD: t_pools.sh,v 1.6 2012/12/01 04:40:00 pgoyette Exp $ +# $NetBSD: t_pools.sh,v 1.7 2012/12/01 21:25:51 pgoyette Exp $ # # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -73,9 +73,9 @@ test_case p5 ptest text text test_case p6 ptest text text test_case p7 ptest text text test_case p9 ptest text text -failing_test_case p10 "PR kern/47270 - ipftest -P -N is broken" ptest text text -failing_test_case p11 "PR kern/47270 - ipftest -P -N is broken" ptest text text -failing_test_case p12 "PR kern/47270 - ipftest -P -N is broken" ptest text text +failing_test_case p10 ptest "PR kern/47270 - ipftest -P -N is broken" text text +failing_test_case p11 ptest "PR kern/47270 - ipftest -P -N is broken" text text +failing_test_case p12 ptest "PR kern/47270 - ipftest -P -N is broken" text text test_case p13 ptest text text test_case ip1 iptest text text test_case ip2 iptest text text
CVS commit: src/share/man/man3
Module Name:src Committed By: wiz Date: Sat Dec 1 21:21:44 UTC 2012 Modified Files: src/share/man/man3: bitmap.3 Log Message: Whitespace, comma nit, uppercase Dt argument. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man3/bitmap.3 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/man3/bitmap.3 diff -u src/share/man/man3/bitmap.3:1.2 src/share/man/man3/bitmap.3:1.3 --- src/share/man/man3/bitmap.3:1.2 Sat Dec 1 20:38:41 2012 +++ src/share/man/man3/bitmap.3 Sat Dec 1 21:21:44 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: bitmap.3,v 1.2 2012/12/01 20:38:41 christos Exp $ +.\" $NetBSD: bitmap.3,v 1.3 2012/12/01 21:21:44 wiz Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,14 +28,14 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd December 1, 2012 -.Dt bitmap 3 +.Dt BITMAP 3 .Os .Sh NAME .Nm __BITMAP_CLR , -.Nm __BITMAP_ISSET, +.Nm __BITMAP_ISSET , .Nm __BITMAP_SET , .Nm __BITMAP_SIZE , -.Nm __BITMAP_ZERO +.Nm __BITMAP_ZERO .Nd bitmap manipulation macros .Sh LIBRARY .Lb libc @@ -47,10 +47,10 @@ .Fn __BITMAP_SIZE "type" "int nbits" .Fn __BITMAP_ZERO "type *bitmap" .Sh DESCRIPTION -The supplied macros are similar to the +The supplied macros are similar to the .Xr select 2 .Fn FD_SET -family, and to the +family, and to the .Xr bitstring 3 library. They are different from @@ -65,7 +65,7 @@ and they can be used in both kernel and The following macros are provided for manipulating creating and manipulating bitmaps: .Pp -.Fn __BITMAP_CLR bit, bitmap +.Fn __BITMAP_CLR bit bitmap initializes a descriptor set pointed to by .Fa bitmap to the null set.
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sat Dec 1 21:07:01 UTC 2012 Modified Files: src/lib/libc/sys: chmod.2 mkfifo.2 mknod.2 open.2 rename.2 stat.2 symlink.2 unlink.2 utimes.2 Log Message: Bump date. New sentence, new line. Wording/articles. Sort errors while here. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/lib/libc/sys/chmod.2 cvs rdiff -u -r1.23 -r1.24 src/lib/libc/sys/mkfifo.2 \ src/lib/libc/sys/symlink.2 cvs rdiff -u -r1.24 -r1.25 src/lib/libc/sys/mknod.2 cvs rdiff -u -r1.53 -r1.54 src/lib/libc/sys/open.2 cvs rdiff -u -r1.25 -r1.26 src/lib/libc/sys/rename.2 \ src/lib/libc/sys/unlink.2 cvs rdiff -u -r1.52 -r1.53 src/lib/libc/sys/stat.2 cvs rdiff -u -r1.34 -r1.35 src/lib/libc/sys/utimes.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/chmod.2 diff -u src/lib/libc/sys/chmod.2:1.43 src/lib/libc/sys/chmod.2:1.44 --- src/lib/libc/sys/chmod.2:1.43 Sat Dec 1 20:51:29 2012 +++ src/lib/libc/sys/chmod.2 Sat Dec 1 21:07:00 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: chmod.2,v 1.43 2012/12/01 20:51:29 wiz Exp $ +.\" $NetBSD: chmod.2,v 1.44 2012/12/01 21:07:00 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -98,7 +98,7 @@ flag. .Fa fd can be set to .Dv AT_FDCWD -in order to specify current directory. +in order to specify the current directory. .Pp .Fn chmod verifies that the process owner (user) either owns Index: src/lib/libc/sys/mkfifo.2 diff -u src/lib/libc/sys/mkfifo.2:1.23 src/lib/libc/sys/mkfifo.2:1.24 --- src/lib/libc/sys/mkfifo.2:1.23 Sat Dec 1 20:57:41 2012 +++ src/lib/libc/sys/mkfifo.2 Sat Dec 1 21:07:00 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkfifo.2,v 1.23 2012/12/01 20:57:41 wiz Exp $ +.\" $NetBSD: mkfifo.2,v 1.24 2012/12/01 21:07:00 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -72,7 +72,7 @@ flag. .Fa fd can be set to .Dv AT_FDCWD -in order to specify current directory. +in order to specify the current directory. .Pp The fifo's owner ID is set to the process's effective user ID. The fifo's group ID is set to that of the parent directory in Index: src/lib/libc/sys/symlink.2 diff -u src/lib/libc/sys/symlink.2:1.23 src/lib/libc/sys/symlink.2:1.24 --- src/lib/libc/sys/symlink.2:1.23 Sat Dec 1 21:00:18 2012 +++ src/lib/libc/sys/symlink.2 Sat Dec 1 21:07:00 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: symlink.2,v 1.23 2012/12/01 21:00:18 wiz Exp $ +.\" $NetBSD: symlink.2,v 1.24 2012/12/01 21:07:00 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -75,7 +75,7 @@ flag. .Fa fd can be set to .Dv AT_FDCWD -in order to specify current directory. +in order to specify the current directory. .Sh RETURN VALUES Upon successful completion, a zero value is returned. If an error occurs, the error code is stored in Index: src/lib/libc/sys/mknod.2 diff -u src/lib/libc/sys/mknod.2:1.24 src/lib/libc/sys/mknod.2:1.25 --- src/lib/libc/sys/mknod.2:1.24 Sat Dec 1 20:45:01 2012 +++ src/lib/libc/sys/mknod.2 Sat Dec 1 21:07:00 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: mknod.2,v 1.24 2012/12/01 20:45:01 wiz Exp $ +.\" $NetBSD: mknod.2,v 1.25 2012/12/01 21:07:00 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)mknod.2 8.1 (Berkeley) 6/4/93 .\" -.Dd July 3, 2011 +.Dd November 18, 2012 .Dt MKNOD 2 .Os .Sh NAME @@ -63,18 +63,19 @@ works the same way as .Fn mknod except if .Fa path -is relative. In that case, it is looked up from a directory whose file +is relative. +In that case, it is looked up from a directory whose file descriptor was passed as .Fa fd . Search permission is required on .Fa fd -except if that file descriptor was open with +except if that file descriptor was opened with the .Dv O_SEARCH option. .Fa fd can be set to .Dv AT_FDCWD -in order to specify current directory. +in order to specify the current directory. .Pp .Fn mknod requires super-user privileges. Index: src/lib/libc/sys/open.2 diff -u src/lib/libc/sys/open.2:1.53 src/lib/libc/sys/open.2:1.54 --- src/lib/libc/sys/open.2:1.53 Sat Dec 1 20:45:01 2012 +++ src/lib/libc/sys/open.2 Sat Dec 1 21:07:00 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: open.2,v 1.53 2012/12/01 20:45:01 wiz Exp $ +.\" $NetBSD: open.2,v 1.54 2012/12/01 21:07:00 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" -.Dd January 23, 2012 +.Dd November 18, 2012 .Dt OPEN 2 .Os .Sh NAME @@ -58,18 +58,19 @@ works the same way as .Fn open except if .Fa path -is relative. In that case, it is looked up from a directory whose file +is
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sat Dec 1 21:00:18 UTC 2012 Modified Files: src/lib/libc/sys: symlink.2 Log Message: Bump date. New sentence, new line. Wording/articles. Sort errors while here. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/libc/sys/symlink.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/symlink.2 diff -u src/lib/libc/sys/symlink.2:1.22 src/lib/libc/sys/symlink.2:1.23 --- src/lib/libc/sys/symlink.2:1.22 Sat Dec 1 20:45:01 2012 +++ src/lib/libc/sys/symlink.2 Sat Dec 1 21:00:18 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: symlink.2,v 1.22 2012/12/01 20:45:01 wiz Exp $ +.\" $NetBSD: symlink.2,v 1.23 2012/12/01 21:00:18 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)symlink.2 8.1 (Berkeley) 6/4/93 .\" -.Dd June 4, 1993 +.Dd November 18, 2012 .Dt SYMLINK 2 .Os .Sh NAME @@ -63,14 +63,15 @@ works the same way as .Fn symlink except if .Fa path2 -is relative. In that case, it is looked up from a directory whose file +is relative. +In that case, it is looked up from a directory whose file descriptor was passed as .Fa fd . Search permission is required on .Fa fd -except if that file descriptor was open with +except if that file descriptor was opened with the .Dv O_SEARCH -option. +flag. .Fa fd can be set to .Dv AT_FDCWD @@ -83,29 +84,28 @@ and a \-1 value is returned. .Sh ERRORS The symbolic link succeeds unless: .Bl -tag -width Er -.It Bq Er ENOTDIR -A component of the -.Fa name2 -prefix is not a directory. -.It Bq Er ENAMETOOLONG -A component of a pathname exceeded -.Brq Dv NAME_MAX -characters, or an entire path name exceeded -.Brq Dv PATH_MAX -characters. -.It Bq Er ENOENT -A component of the -.Fa name2 -path does not exist. .It Bq Er EACCES A component of the .Fa name2 path prefix denies search permission. -.It Bq Er ELOOP -Too many symbolic links were encountered in translating the pathname. +.It Bq Er EDQUOT +The directory in which the entry for the new symbolic link +is being placed cannot be extended because the +user's quota of disk blocks on the file system +containing the directory has been exhausted. +Or, the new symbolic link cannot be created because the user's +quota of disk blocks on the file system that will +contain the symbolic link has been exhausted. +Or, the user's quota of inodes on the file system on +which the symbolic link is being created has been exhausted. .It Bq Er EEXIST .Fa name2 already exists. +.It Bq Er EFAULT +.Fa name1 +or +.Fa name2 +points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while making the directory entry for .Fa name2 , @@ -113,40 +113,36 @@ or allocating the inode for .Fa name2 , or writing out the link contents of .Fa name2 . -.It Bq Er EROFS -The file +Or, an I/O error occurred while making the directory entry or allocating the inode. +.It Bq Er ELOOP +Too many symbolic links were encountered in translating the pathname. +.It Bq Er ENAMETOOLONG +A component of a pathname exceeded +.Brq Dv NAME_MAX +characters, or an entire path name exceeded +.Brq Dv PATH_MAX +characters. +.It Bq Er ENOENT +A component of the .Fa name2 -would reside on a read-only file system. +path does not exist. .It Bq Er ENOSPC The directory in which the entry for the new symbolic link is being placed cannot be extended because there is no space left on the file system containing the directory. -.It Bq Er ENOSPC -The new symbolic link cannot be created because there +Or, the new symbolic link cannot be created because there there is no space left on the file system that will contain the symbolic link. -.It Bq Er ENOSPC -There are no free inodes on the file system on which the +Or, there are no free inodes on the file system on which the symbolic link is being created. -.It Bq Er EDQUOT -The directory in which the entry for the new symbolic link -is being placed cannot be extended because the -user's quota of disk blocks on the file system -containing the directory has been exhausted. -.It Bq Er EDQUOT -The new symbolic link cannot be created because the user's -quota of disk blocks on the file system that will -contain the symbolic link has been exhausted. -.It Bq Er EDQUOT -The user's quota of inodes on the file system on -which the symbolic link is being created has been exhausted. -.It Bq Er EIO -An I/O error occurred while making the directory entry or allocating the inode. -.It Bq Er EFAULT -.Fa name1 -or +.It Bq Er ENOTDIR +A component of the .Fa name2 -points outside the process's allocated address space. +prefix is not a directory. +.It Bq Er EROFS +The file +.Fa name2 +would reside on a read-only file system. .El .Sh SEE ALSO .Xr ln 1 ,
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sat Dec 1 20:57:41 UTC 2012 Modified Files: src/lib/libc/sys: mkfifo.2 Log Message: Bump date, really. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/libc/sys/mkfifo.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/mkfifo.2 diff -u src/lib/libc/sys/mkfifo.2:1.22 src/lib/libc/sys/mkfifo.2:1.23 --- src/lib/libc/sys/mkfifo.2:1.22 Sat Dec 1 20:57:08 2012 +++ src/lib/libc/sys/mkfifo.2 Sat Dec 1 20:57:41 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkfifo.2,v 1.22 2012/12/01 20:57:08 wiz Exp $ +.\" $NetBSD: mkfifo.2,v 1.23 2012/12/01 20:57:41 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)mkfifo.2 8.1 (Berkeley) 6/4/93 .\" -.Dd June 4, 1993 +.Dd November 18, 2012 .Dt MKFIFO 2 .Os .Sh NAME
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sat Dec 1 20:57:08 UTC 2012 Modified Files: src/lib/libc/sys: mkfifo.2 Log Message: Bump date. New sentence, new line. Wording/articles. Sort errors while here. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/libc/sys/mkfifo.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/mkfifo.2 diff -u src/lib/libc/sys/mkfifo.2:1.21 src/lib/libc/sys/mkfifo.2:1.22 --- src/lib/libc/sys/mkfifo.2:1.21 Sun Nov 18 17:41:53 2012 +++ src/lib/libc/sys/mkfifo.2 Sat Dec 1 20:57:08 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkfifo.2,v 1.21 2012/11/18 17:41:53 manu Exp $ +.\" $NetBSD: mkfifo.2,v 1.22 2012/12/01 20:57:08 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -60,14 +60,15 @@ works the same way as .Fn mkfifo except if .Fa path -is relative. In that case, it is looked up from a directory whose file +is relative. +In that case, it is looked up from a directory whose file descriptor was passed as .Fa fd . Search permission is required on .Fa fd -except if that file descriptor was open with +except if that file descriptor was opened with the .Dv O_SEARCH -option. +flag. .Fa fd can be set to .Dv AT_FDCWD @@ -84,52 +85,49 @@ A \-1 return value indicates an error, a .Fn mkfifo will fail and no fifo will be created if: .Bl -tag -width Er -.It Bq Er EOPNOTSUPP -The kernel has not been configured to support fifo's. -.It Bq Er ENOTDIR -A component of the path prefix is not a directory. -.It Bq Er ENAMETOOLONG -A component of a pathname exceeded -.Brq Dv NAME_MAX -characters, or an entire path name exceeded -.Brq Dv PATH_MAX -characters. -.It Bq Er ENOENT -A component of the path prefix does not exist. .It Bq Er EACCES Search permission is denied for a component of the path prefix. -.It Bq Er ELOOP -Too many symbolic links were encountered in translating the pathname. -.It Bq Er EROFS -The named file resides on a read-only file system. -.It Bq Er EEXIST -The named file exists. -.It Bq Er ENOSPC -The directory in which the entry for the new fifo is being placed -cannot be extended because there is no space left on the file -system containing the directory. -.It Bq Er ENOSPC -There are no free inodes on the file system on which the -fifo is being created. .It Bq Er EDQUOT The directory in which the entry for the new fifo is being placed cannot be extended because the user's quota of disk blocks on the file system containing the directory has been exhausted. -.It Bq Er EDQUOT -The user's quota of inodes on the file system on +Or, the user's quota of inodes on the file system on which the fifo is being created has been exhausted. +.It Bq Er EEXIST +The named file exists. +.It Bq Er EFAULT +.Fa path +points outside the process's allocated address space. .It Bq Er EIO An .Tn I/O error occurred while making the directory entry or allocating the inode. -.It Bq Er EIO -An +Or, an .Tn I/O error occurred while reading from or writing to the file system. -.It Bq Er EFAULT -.Fa path -points outside the process's allocated address space. +.It Bq Er ELOOP +Too many symbolic links were encountered in translating the pathname. +.It Bq Er ENAMETOOLONG +A component of a pathname exceeded +.Brq Dv NAME_MAX +characters, or an entire path name exceeded +.Brq Dv PATH_MAX +characters. +.It Bq Er ENOENT +A component of the path prefix does not exist. +.It Bq Er ENOSPC +The directory in which the entry for the new fifo is being placed +cannot be extended because there is no space left on the file +system containing the directory. +Or, there are no free inodes on the file system on which the +fifo is being created. +.It Bq Er ENOTDIR +A component of the path prefix is not a directory. +.It Bq Er EOPNOTSUPP +The kernel has not been configured to support fifo's. +.It Bq Er EROFS +The named file resides on a read-only file system. .El .Sh SEE ALSO .Xr chmod 2 , @@ -143,4 +141,3 @@ function call conforms to .Fn mkfifoat conforms to .St -p1003.1-2008 . -
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sat Dec 1 20:55:13 UTC 2012 Modified Files: src/lib/libc/sys: mkdir.2 Log Message: Bump date. New sentence, new line. Wording/articles. Sort errors while here. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libc/sys/mkdir.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/mkdir.2 diff -u src/lib/libc/sys/mkdir.2:1.25 src/lib/libc/sys/mkdir.2:1.26 --- src/lib/libc/sys/mkdir.2:1.25 Sun Nov 18 17:41:53 2012 +++ src/lib/libc/sys/mkdir.2 Sat Dec 1 20:55:13 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkdir.2,v 1.25 2012/11/18 17:41:53 manu Exp $ +.\" $NetBSD: mkdir.2,v 1.26 2012/12/01 20:55:13 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)mkdir.2 8.2 (Berkeley) 12/11/93 .\" -.Dd December 27, 2005 +.Dd November 18, 2012 .Dt MKDIR 2 .Os .Sh NAME @@ -58,18 +58,19 @@ works the same way as .Fn mkdir except if .Fa path -is relative. In that case, it is looked up from a directory whose file +is relative. +In that case, it is looked up from a directory whose file descriptor was passed as .Fa fd . Search permission is required on .Fa fd -except if that file descriptor was open with +except if that file descriptor was opened with the .Dv O_SEARCH -option. +flag. .Fa fd can be set to .Dv AT_FDCWD -in order to specify current directory. +in order to specify the current directory. .Pp The directory's owner ID is set to the process's effective user ID. The directory's group ID is set to that of the parent directory in @@ -82,8 +83,24 @@ A \-1 return value indicates an error, a .Fn mkdir will fail and no directory will be created if: .Bl -tag -width Er -.It Bq Er ENOTDIR -A component of the path prefix is not a directory. +.It Bq Er EACCES +Search permission is denied for a component of the path prefix. +.It Bq Er EDQUOT +The new directory cannot be created because the user's +quota of disk blocks on the file system that will +contain the directory has been exhausted. +Or, the user's quota of inodes on the file system on +which the directory is being created has been exhausted. +.It Bq Er EEXIST +The named file exists. +.It Bq Er EFAULT +.Fa path +points outside the process's allocated address space. +.It Bq Er EIO +An I/O error occurred while making the directory entry or allocating the inode; +or an I/O error occurred while reading from or writing to the file system. +.It Bq Er ELOOP +Too many symbolic links were encountered in translating the pathname. .It Bq Er ENAMETOOLONG A component of a pathname exceeded .Brq Dv NAME_MAX @@ -92,34 +109,15 @@ characters, or an entire path name excee characters. .It Bq Er ENOENT A component of the path prefix does not exist. -.It Bq Er EACCES -Search permission is denied for a component of the path prefix. -.It Bq Er ELOOP -Too many symbolic links were encountered in translating the pathname. -.It Bq Er EROFS -The named file resides on a read-only file system. -.It Bq Er EEXIST -The named file exists. .It Bq Er ENOSPC The new directory cannot be created because there is no space left on the file system that will contain the directory. -.It Bq Er ENOSPC -There are no free inodes on the file system on which the +Or, there are no free inodes on the file system on which the directory is being created. -.It Bq Er EDQUOT -The new directory cannot be created because the user's -quota of disk blocks on the file system that will -contain the directory has been exhausted. -.It Bq Er EDQUOT -The user's quota of inodes on the file system on -which the directory is being created has been exhausted. -.It Bq Er EIO -An I/O error occurred while making the directory entry or allocating the inode. -.It Bq Er EIO -An I/O error occurred while reading from or writing to the file system. -.It Bq Er EFAULT -.Fa path -points outside the process's allocated address space. +.It Bq Er ENOTDIR +A component of the path prefix is not a directory. +.It Bq Er EROFS +The named file resides on a read-only file system. .El .Sh SEE ALSO .Xr chmod 2 , @@ -133,4 +131,3 @@ function conforms to .Fn mkdirat conforms to .St -p1003.1-2008 . -
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sat Dec 1 20:53:10 UTC 2012 Modified Files: src/lib/libc/sys: chown.2 Log Message: Bump date. New sentence, new line. Wording/articles. Sort errors while here. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/lib/libc/sys/chown.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/chown.2 diff -u src/lib/libc/sys/chown.2:1.33 src/lib/libc/sys/chown.2:1.34 --- src/lib/libc/sys/chown.2:1.33 Sat Dec 1 20:45:01 2012 +++ src/lib/libc/sys/chown.2 Sat Dec 1 20:53:10 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: chown.2,v 1.33 2012/12/01 20:45:01 wiz Exp $ +.\" $NetBSD: chown.2,v 1.34 2012/12/01 20:53:10 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)chown.2 8.4 (Berkeley) 4/19/94 .\" -.Dd April 19, 1994 +.Dd November 18, 2012 .Dt CHOWN 2 .Os .Sh NAME @@ -115,18 +115,19 @@ is set in .Fa flag ) except if .Fa path -is relative. In that case, it is looked up from a directory whose file +is relative. +In that case, it is looked up from a directory whose file descriptor was passed as .Fa fd . Search permission is required on .Fa fd -except if that file descriptor was open with +except if that file descriptor was opened with the .Dv O_SEARCH -option. +flag. .Fa fd can be set to .Dv AT_FDCWD -in order to specify current directory. +in order to specify the current directory. .Pp One of the owner or group id's may be left unchanged by specifying it as (uid_t)\-1 or (gid_t)\-1 respectively. @@ -141,8 +142,15 @@ and .Fn lchown will fail and the file will be unchanged if: .Bl -tag -width Er -.It Bq Er ENOTDIR -A component of the path prefix is not a directory. +.It Bq Er EACCES +Search permission is denied for a component of the path prefix. +.It Bq Er EFAULT +.Fa path +points outside the process's allocated address space. +.It Bq Er EIO +An I/O error occurred while reading from or writing to the file system. +.It Bq Er ELOOP +Too many symbolic links were encountered in translating the pathname. .It Bq Er ENAMETOOLONG A component of a pathname exceeded .Brq Dv NAME_MAX @@ -151,19 +159,12 @@ characters, or an entire path name excee characters. .It Bq Er ENOENT The named file does not exist. -.It Bq Er EACCES -Search permission is denied for a component of the path prefix. -.It Bq Er ELOOP -Too many symbolic links were encountered in translating the pathname. +.It Bq Er ENOTDIR +A component of the path prefix is not a directory. .It Bq Er EPERM The effective user ID is not the super-user. .It Bq Er EROFS The named file resides on a read-only file system. -.It Bq Er EFAULT -.Fa path -points outside the process's allocated address space. -.It Bq Er EIO -An I/O error occurred while reading from or writing to the file system. .El .Pp .Fn fchown @@ -175,12 +176,12 @@ does not refer to a valid descriptor. .It Bq Er EINVAL .Fa fd refers to a socket, not a file. +.It Bq Er EIO +An I/O error occurred while reading from or writing to the file system. .It Bq Er EPERM The effective user ID is not the super-user. .It Bq Er EROFS The named file resides on a read-only file system. -.It Bq Er EIO -An I/O error occurred while reading from or writing to the file system. .El .Sh SEE ALSO .Xr chgrp 1 ,
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sat Dec 1 20:51:29 UTC 2012 Modified Files: src/lib/libc/sys: chmod.2 Log Message: Bump date. New sentence, new line. Wording/articles. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/lib/libc/sys/chmod.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/chmod.2 diff -u src/lib/libc/sys/chmod.2:1.42 src/lib/libc/sys/chmod.2:1.43 --- src/lib/libc/sys/chmod.2:1.42 Sat Dec 1 20:45:01 2012 +++ src/lib/libc/sys/chmod.2 Sat Dec 1 20:51:29 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: chmod.2,v 1.42 2012/12/01 20:45:01 wiz Exp $ +.\" $NetBSD: chmod.2,v 1.43 2012/12/01 20:51:29 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)chmod.2 8.1 (Berkeley) 6/4/93 .\" -.Dd March 3, 2012 +.Dd November 18, 2012 .Dt CHMOD 2 .Os .Sh NAME @@ -86,14 +86,15 @@ is set in .Fa flag ) except if .Fa path -is relative. In that case, it is looked up from a directory whose file +is relative. +In that case, it is looked up from a directory whose file descriptor was passed as .Fa fd . Search permission is required on .Fa fd -except if that file descriptor was open with +except if that file descriptor was opened with the .Dv O_SEARCH -option. +flag. .Fa fd can be set to .Dv AT_FDCWD
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sat Dec 1 20:50:19 UTC 2012 Modified Files: src/lib/libc/sys: readlink.2 Log Message: Bump date. New sentence, new line. Wording/articles. While here, sort errors. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/lib/libc/sys/readlink.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/readlink.2 diff -u src/lib/libc/sys/readlink.2:1.28 src/lib/libc/sys/readlink.2:1.29 --- src/lib/libc/sys/readlink.2:1.28 Sat Dec 1 20:45:01 2012 +++ src/lib/libc/sys/readlink.2 Sat Dec 1 20:50:19 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: readlink.2,v 1.28 2012/12/01 20:45:01 wiz Exp $ +.\" $NetBSD: readlink.2,v 1.29 2012/12/01 20:50:19 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)readlink.2 8.1 (Berkeley) 6/4/93 .\" -.Dd May 11, 2004 +.Dd November 18, 2012 .Dt READLINK 2 .Os .Sh NAME @@ -64,18 +64,19 @@ works the same way as .Fn readlink except if .Fa path -is relative. In that case, it is looked up from a directory whose file +is relative. +In that case, it is looked up from a directory whose file descriptor was passed as .Fa fd . Search permission is required on .Fa fd -except if that file descriptor was open with +except if that file descriptor was opened with the .Dv O_SEARCH -option. +flag. .Fa fd can be set to .Dv AT_FDCWD -in order to specify current directory. +in order to specify the current directory. .Sh RETURN VALUES The call returns the count of characters placed in the buffer if it succeeds, or a \-1 if an error occurs, placing the error @@ -101,8 +102,17 @@ buf[len] = '\e0'; .Fn readlink will fail if: .Bl -tag -width Er -.It Bq Er ENOTDIR -A component of the path prefix is not a directory. +.It Bq Er EACCES +Search permission is denied for a component of the path prefix. +.It Bq Er EFAULT +.Fa buf +extends outside the process's allocated address space. +.It Bq Er EINVAL +The named file is not a symbolic link. +.It Bq Er EIO +An I/O error occurred while reading from the file system. +.It Bq Er ELOOP +Too many symbolic links were encountered in translating the pathname. .It Bq Er ENAMETOOLONG A component of a pathname exceeded .Brq Dv NAME_MAX @@ -111,17 +121,8 @@ characters, or an entire path name excee characters. .It Bq Er ENOENT The named file does not exist. -.It Bq Er EACCES -Search permission is denied for a component of the path prefix. -.It Bq Er ELOOP -Too many symbolic links were encountered in translating the pathname. -.It Bq Er EINVAL -The named file is not a symbolic link. -.It Bq Er EIO -An I/O error occurred while reading from the file system. -.It Bq Er EFAULT -.Fa buf -extends outside the process's allocated address space. +.It Bq Er ENOTDIR +A component of the path prefix is not a directory. .El .Sh SEE ALSO .Xr lstat 2 ,
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sat Dec 1 20:48:26 UTC 2012 Modified Files: src/lib/libc/sys: link.2 Log Message: Bump date. New sentence, new line. Wording/articles. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/lib/libc/sys/link.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/link.2 diff -u src/lib/libc/sys/link.2:1.28 src/lib/libc/sys/link.2:1.29 --- src/lib/libc/sys/link.2:1.28 Sat Dec 1 20:45:01 2012 +++ src/lib/libc/sys/link.2 Sat Dec 1 20:48:26 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: link.2,v 1.28 2012/12/01 20:45:01 wiz Exp $ +.\" $NetBSD: link.2,v 1.29 2012/12/01 20:48:26 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993, 2011 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)link.2 8.3 (Berkeley) 1/12/94 .\" -.Dd January 12, 1994 +.Dd November 18, 2012 .Dt LINK 2 .Os .Sh NAME @@ -88,22 +88,23 @@ except if .Fa name1 (resp. .Fa name2 ) -is relative. In that case, it is looked up from a directory whose file +is relative. +In that case, it is looked up from a directory whose file descriptor was passed as .Fa fd1 (resp. -.Fa fd2 ). +.Fa fd2 ) . Search permission is required on passed directory file descriptors -except if they were open with the +except if they were opened with the .Dv O_SEARCH -option. +flag. .Fa fd1 or .Fa fd2 can be set to .Dv AT_FDCWD -in order to specify current directory. +in order to specify the current directory. .Pp When operating on a symlink, .Fn link @@ -199,4 +200,3 @@ function conforms to .Fn linkat conforms to .St -p1003.1-2008 . -
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sat Dec 1 20:46:54 UTC 2012 Modified Files: src/lib/libc/sys: access.2 Log Message: New sentence, new line. Add articles. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/lib/libc/sys/access.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/access.2 diff -u src/lib/libc/sys/access.2:1.28 src/lib/libc/sys/access.2:1.29 --- src/lib/libc/sys/access.2:1.28 Sat Dec 1 20:45:01 2012 +++ src/lib/libc/sys/access.2 Sat Dec 1 20:46:54 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: access.2,v 1.28 2012/12/01 20:45:01 wiz Exp $ +.\" $NetBSD: access.2,v 1.29 2012/12/01 20:46:54 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" -.Dd May 3, 2010 +.Dd November 18, 2012 .Dt ACCESS 2 .Os .Sh NAME @@ -74,28 +74,29 @@ works the same way as .Fn access except if .Fa path -is relative. In that case, it is looked up from a directory whose file +is relative. +In that case, it is looked up from a directory whose file descriptor was passed as .Fa fd . Search permission is required on .Fa fd -except if that file descriptor was open with +except if that file descriptor was opened with the .Dv O_SEARCH -option. +flag. .Fa fd can be set to .Dv AT_FDCWD -in order to specify current directory. +in order to specify the current directory. .Pp The real user ID is used in place of the effective user ID and the real group access list (including the real group ID) are used in place of the effective ID for verifying permission. .Fn faccessat -can use +can use the effective user ID and effective group ID if the .Dv AT_EACCESS -is passed in +flag is passed in .Fa flag . .Pp If a process has super-user privileges and indicates success for
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sat Dec 1 20:45:01 UTC 2012 Modified Files: src/lib/libc/sys: access.2 chmod.2 chown.2 link.2 mknod.2 open.2 readlink.2 rename.2 stat.2 symlink.2 unlink.2 utimes.2 Log Message: Remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/lib/libc/sys/access.2 src/lib/libc/sys/link.2 \ src/lib/libc/sys/readlink.2 cvs rdiff -u -r1.41 -r1.42 src/lib/libc/sys/chmod.2 cvs rdiff -u -r1.32 -r1.33 src/lib/libc/sys/chown.2 cvs rdiff -u -r1.23 -r1.24 src/lib/libc/sys/mknod.2 cvs rdiff -u -r1.52 -r1.53 src/lib/libc/sys/open.2 cvs rdiff -u -r1.24 -r1.25 src/lib/libc/sys/rename.2 \ src/lib/libc/sys/unlink.2 cvs rdiff -u -r1.51 -r1.52 src/lib/libc/sys/stat.2 cvs rdiff -u -r1.21 -r1.22 src/lib/libc/sys/symlink.2 cvs rdiff -u -r1.33 -r1.34 src/lib/libc/sys/utimes.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/access.2 diff -u src/lib/libc/sys/access.2:1.27 src/lib/libc/sys/access.2:1.28 --- src/lib/libc/sys/access.2:1.27 Sun Nov 18 17:41:53 2012 +++ src/lib/libc/sys/access.2 Sat Dec 1 20:45:01 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: access.2,v 1.27 2012/11/18 17:41:53 manu Exp $ +.\" $NetBSD: access.2,v 1.28 2012/12/01 20:45:01 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -69,13 +69,13 @@ All components of the pathname are checked for access permissions (including .Dv F_OK ) . .Pp -.Fn faccessat -works the same way as +.Fn faccessat +works the same way as .Fn access -except if +except if .Fa path is relative. In that case, it is looked up from a directory whose file -descriptor was passed as +descriptor was passed as .Fa fd . Search permission is required on .Fa fd @@ -85,7 +85,7 @@ option. .Fa fd can be set to .Dv AT_FDCWD -in order to specify current directory. +in order to specify current directory. .Pp The real user ID is used in place of the effective user ID and the real group access list @@ -93,9 +93,9 @@ and the real group access list used in place of the effective ID for verifying permission. .Fn faccessat can use -effective user ID and effective group ID if the +effective user ID and effective group ID if the .Dv AT_EACCESS -is passed in +is passed in .Fa flag . .Pp If a process has super-user privileges and indicates success for Index: src/lib/libc/sys/link.2 diff -u src/lib/libc/sys/link.2:1.27 src/lib/libc/sys/link.2:1.28 --- src/lib/libc/sys/link.2:1.27 Sun Nov 18 17:41:53 2012 +++ src/lib/libc/sys/link.2 Sat Dec 1 20:45:01 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: link.2,v 1.27 2012/11/18 17:41:53 manu Exp $ +.\" $NetBSD: link.2,v 1.28 2012/12/01 20:45:01 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993, 2011 .\" The Regents of the University of California. All rights reserved. @@ -80,18 +80,18 @@ must be in the same file system. .Fa name1 may not be a directory unless the caller is the super-user and the file system containing it supports linking to directories. -.Pp +.Pp .Fn linkat works the same way as .Fn link except if .Fa name1 -(resp. +(resp. .Fa name2 ) is relative. In that case, it is looked up from a directory whose file descriptor was passed as .Fa fd1 -(resp. +(resp. .Fa fd2 ). Search permission is required on passed directory file descriptors @@ -99,7 +99,7 @@ except if they were open with the .Dv O_SEARCH option. .Fa fd1 -or +or .Fa fd2 can be set to .Dv AT_FDCWD Index: src/lib/libc/sys/readlink.2 diff -u src/lib/libc/sys/readlink.2:1.27 src/lib/libc/sys/readlink.2:1.28 --- src/lib/libc/sys/readlink.2:1.27 Sun Nov 18 17:41:53 2012 +++ src/lib/libc/sys/readlink.2 Sat Dec 1 20:45:01 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: readlink.2,v 1.27 2012/11/18 17:41:53 manu Exp $ +.\" $NetBSD: readlink.2,v 1.28 2012/12/01 20:45:01 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -135,7 +135,7 @@ function conforms to .St -p1003.1-2001 . .Fn readlinkat conforms to -.St -p1003.1-2008 . +.St -p1003.1-2008 . .Sh HISTORY The .Fn readlink Index: src/lib/libc/sys/chmod.2 diff -u src/lib/libc/sys/chmod.2:1.41 src/lib/libc/sys/chmod.2:1.42 --- src/lib/libc/sys/chmod.2:1.41 Sun Nov 18 17:41:53 2012 +++ src/lib/libc/sys/chmod.2 Sat Dec 1 20:45:01 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: chmod.2,v 1.41 2012/11/18 17:41:53 manu Exp $ +.\" $NetBSD: chmod.2,v 1.42 2012/12/01 20:45:01 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -74,12 +74,12 @@ sets the permission bits of the link, while .Fn chmod sets the bits of the file the link references. -.Pp -.Fn fchmodat +.Pp +.Fn fchmodat works the same way as -.Fn chmod +.Fn chmod (or -.Fn lchmod +.Fn lchmod if .Dv AT_SYMLINK_NOFOLLOW is set in @@ -90,7 +90,
CVS commit: src/share/man/man3
Module Name:src Committed By: christos Date: Sat Dec 1 20:38:42 UTC 2012 Modified Files: src/share/man/man3: bitmap.3 Log Message: fix bug To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man3/bitmap.3 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/man3/bitmap.3 diff -u src/share/man/man3/bitmap.3:1.1 src/share/man/man3/bitmap.3:1.2 --- src/share/man/man3/bitmap.3:1.1 Sat Dec 1 15:33:02 2012 +++ src/share/man/man3/bitmap.3 Sat Dec 1 15:38:41 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: bitmap.3,v 1.1 2012/12/01 20:33:02 christos Exp $ +.\" $NetBSD: bitmap.3,v 1.2 2012/12/01 20:38:41 christos Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -112,7 +112,7 @@ main(int argc, char **argv) /* Set bit 1 */ __BITMAP_SET(1, bitmap); - for (size_t i = 0; i \*[Lt]= 5000; i++) { + for (size_t i = 0; i \*[Lt] 5000; i++) { if (__BITMAP_ISSET(i, bitmap)) { /* Should just print 1 */ printf("Bit %zu is set\en", i);
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: christos Date: Sat Dec 1 20:37:04 UTC 2012 Modified Files: src/distrib/sets/lists/comp: mi Log Message: add bitmap macros To generate a diff of this commit: cvs rdiff -u -r1.1791 -r1.1792 src/distrib/sets/lists/comp/mi 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/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1791 src/distrib/sets/lists/comp/mi:1.1792 --- src/distrib/sets/lists/comp/mi:1.1791 Tue Nov 20 11:18:47 2012 +++ src/distrib/sets/lists/comp/mi Sat Dec 1 15:37:02 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1791 2012/11/20 16:18:47 agc Exp $ +# $NetBSD: mi,v 1.1792 2012/12/01 20:37:02 christos Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -5572,6 +5572,11 @@ ./usr/share/man/cat3/X509_verify_cert.0 comp-c-catman crypto,.cat ./usr/share/man/cat3/_DIAGASSERT.0 comp-c-catman .cat ./usr/share/man/cat3/__BIT.0 comp-c-catman .cat +./usr/share/man/cat3/__BITMAP_CLR.0 comp-c-catman .cat +./usr/share/man/cat3/__BITMAP_ISSET.0 comp-c-catman .cat +./usr/share/man/cat3/__BITMAP_SIZE.0 comp-c-catman .cat +./usr/share/man/cat3/__BITMAP_SET.0 comp-c-catman .cat +./usr/share/man/cat3/__BITMAP_ZERO.0 comp-c-catman .cat ./usr/share/man/cat3/__BITS.0 comp-c-catman .cat ./usr/share/man/cat3/__CONCAT.0 comp-c-catman .cat ./usr/share/man/cat3/__KERNEL_RCSID.0 comp-c-catman .cat @@ -5981,6 +5986,7 @@ ./usr/share/man/cat3/bit_nset.0 comp-c-catman .cat ./usr/share/man/cat3/bit_set.0 comp-c-catman .cat ./usr/share/man/cat3/bit_test.0 comp-c-catman .cat +./usr/share/man/cat3/bitmap.0 comp-c-catman .cat ./usr/share/man/cat3/bitops.0 comp-c-catman .cat ./usr/share/man/cat3/bits.0 comp-c-catman .cat ./usr/share/man/cat3/bitstr_size.0 comp-c-catman .cat @@ -12094,6 +12100,11 @@ ./usr/share/man/html3/X509_verify_cert.html comp-c-htmlman crypto,html ./usr/share/man/html3/_DIAGASSERT.html comp-c-htmlman html ./usr/share/man/html3/__BIT.html comp-c-htmlman html +./usr/share/man/html3/__BITMAP_CLR.html comp-c-htmlman html +./usr/share/man/html3/__BITMAP_ISSET.html comp-c-htmlman html +./usr/share/man/html3/__BITMAP_SIZE.html comp-c-htmlman html +./usr/share/man/html3/__BITMAP_SET.html comp-c-htmlman html +./usr/share/man/html3/__BITMAP_ZERO.html comp-c-htmlman html ./usr/share/man/html3/__BITS.html comp-c-htmlman html ./usr/share/man/html3/__CONCAT.html comp-c-htmlman html ./usr/share/man/html3/__KERNEL_RCSID.html comp-c-htmlman html @@ -12503,6 +12514,7 @@ ./usr/share/man/html3/bit_nset.html comp-c-htmlman html ./usr/share/man/html3/bit_set.html comp-c-htmlman html ./usr/share/man/html3/bit_test.html comp-c-htmlman html +./usr/share/man/html3/bitmap.html comp-c-htmlman html ./usr/share/man/html3/bitops.html comp-c-htmlman html ./usr/share/man/html3/bits.html comp-c-htmlman html ./usr/share/man/html3/bitstr_size.html comp-c-htmlman html @@ -18418,6 +18430,11 @@ ./usr/share/man/man3/X509_verify_cert.3 comp-c-man crypto,.man ./usr/share/man/man3/_DIAGASSERT.3 comp-c-man .man ./usr/share/man/man3/__BIT.3 comp-c-man .man +./usr/share/man/man3/__BITMAP_CLR.3 comp-c-man .man +./usr/share/man/man3/__BITMAP_ISSET.3 comp-c-man .man +./usr/share/man/man3/__BITMAP_SIZE.3 comp-c-man .man +./usr/share/man/man3/__BITMAP_SET.3 comp-c-man .man +./usr/share/man/man3/__BITMAP_ZERO.3 comp-c-man .man ./usr/share/man/man3/__BITS.3 comp-c-man .man ./usr/share/man/man3/__CONCAT.3 comp-c-man .man ./usr/share/man/man3/__KERNEL_RCSID.3 comp-c-man .man @@ -18827,6 +18844,7 @@ ./usr/share/man/man3/bit_nset.3 comp-c-man .man ./usr/share/man/man3/bit_set.3 comp-c-man .man ./usr/share/man/man3/bit_test.3 comp-c-man .man +./usr/share/man/man3/bitmap.3 comp-c-man .man ./usr/share/man/man3/bitops.3 comp-c-man .man ./usr/share/man/man3/bits.3 comp-c-man .man ./usr/share/man/man3/bitstr_size.3 comp-c-man .man
CVS commit: src/share/man/man3
Module Name:src Committed By: christos Date: Sat Dec 1 20:33:02 UTC 2012 Modified Files: src/share/man/man3: Makefile Added Files: src/share/man/man3: bitmap.3 Log Message: add documentation for the bitmap macros To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/share/man/man3/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man3/bitmap.3 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/man3/Makefile diff -u src/share/man/man3/Makefile:1.79 src/share/man/man3/Makefile:1.80 --- src/share/man/man3/Makefile:1.79 Tue Aug 9 13:58:27 2011 +++ src/share/man/man3/Makefile Sat Dec 1 15:33:02 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.79 2011/08/09 17:58:27 jruoho Exp $ +# $NetBSD: Makefile,v 1.80 2012/12/01 20:33:02 christos Exp $ # @(#)Makefile 8.2 (Berkeley) 12/13/93 MAN= _DIAGASSERT.3 __CONCAT.3 __UNCONST.3 CMSG_DATA.3 \ @@ -6,7 +6,7 @@ MAN= _DIAGASSERT.3 __CONCAT.3 __UNCONST. __builtin_constant_p.3 __builtin_prefetch.3 \ __builtin_return_address.3 \ __builtin_types_compatible_p.3 __insn_barrier.3 \ - assert.3 attribute.3 bitops.3 bits.3 bitstring.3 \ + assert.3 attribute.3 bitmap.3 bitops.3 bits.3 bitstring.3 \ cdefs.3 dirent.3 dlfcn.3 dl_iterate_phdr.3 end.3 \ fast_divide32.3 ffs32.3 gcq.3 \ ilog2.3 intro.3 inttypes.3 iso646.3 limits.3 \ @@ -268,6 +268,11 @@ MLINKS+=CMSG_DATA.3 CMSG_FIRSTHDR.3 \ CMSG_DATA.3 CMSG_NXTHDR.3 \ CMSG_DATA.3 CMSG_SPACE.3 \ CMSG_DATA.3 cmsg.3 +MLINKS+=bitmap.3 __BITMAP_CLR.3 \ + bitmap.3 __BITMAP_ISSET.3 \ + bitmap.3 __BITMAP_SET.3 \ + bitmap.3 __BITMAP_SIZE.3 \ + bitmap.3 __BITMAP_ZERO.3 .include .include Added files: Index: src/share/man/man3/bitmap.3 diff -u /dev/null src/share/man/man3/bitmap.3:1.1 --- /dev/null Sat Dec 1 15:33:02 2012 +++ src/share/man/man3/bitmap.3 Sat Dec 1 15:33:02 2012 @@ -0,0 +1,133 @@ +.\" $NetBSD: bitmap.3,v 1.1 2012/12/01 20:33:02 christos Exp $ +.\" +.\" Copyright (c) 2012 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Christos Zoulas. +.\" +.\" 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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. +.\" +.Dd December 1, 2012 +.Dt bitmap 3 +.Os +.Sh NAME +.Nm __BITMAP_CLR , +.Nm __BITMAP_ISSET, +.Nm __BITMAP_SET , +.Nm __BITMAP_SIZE , +.Nm __BITMAP_ZERO +.Nd bitmap manipulation macros +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/bitops.h +.Fn __BITMAP_CLR "int bit" "type *bitmap" +.Fn __BITMAP_ISSET "int bit" "type *bitmap" +.Fn __BITMAP_SET "int bit" "type *bitmap" +.Fn __BITMAP_SIZE "type" "int nbits" +.Fn __BITMAP_ZERO "type *bitmap" +.Sh DESCRIPTION +The supplied macros are similar to the +.Xr select 2 +.Fn FD_SET +family, and to the +.Xr bitstring 3 +library. +They are different from +.Fn FD_SET +because they are designed to handle multiple sized bitmaps at the same time, +and they can be of any integral type. +They are different from +.Xr bitstring 3 +because they are just macros, they don't allocate memory or use code, +and they can be used in both kernel and userland. +.Pp +The following macros are provided for manipulating creating and manipulating +bitmaps: +.Pp +.Fn __BITMAP_CLR bit, bitmap +initializes a descriptor set pointed to by +.Fa bitmap +to the null set. +.Pp +.Fn __BITMAP_ISSET bit bitmap +is non-zero if +.Fa bit +is a member of +.Fa bitmap , +zero otherwise. +.Pp +.Fn __BITMAP_SIZE type nbits +Returns the number of elements would be required of the given +.Fa type +to hold +.Fa nbits . +.Pp +.Fn __BITMAP_SET bit bitmap +Sets the given +.Fa bit +in the +.Fa bitmap . +.Pp +.Fn __BITMAP_CLR
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: christos Date: Sat Dec 1 16:30:00 UTC 2012 Modified Files: src/distrib/sets/lists/tests: mi Log Message: add a bitops test To generate a diff of this commit: cvs rdiff -u -r1.510 -r1.511 src/distrib/sets/lists/tests/mi 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.510 src/distrib/sets/lists/tests/mi:1.511 --- src/distrib/sets/lists/tests/mi:1.510 Thu Nov 29 20:42:43 2012 +++ src/distrib/sets/lists/tests/mi Sat Dec 1 11:30:00 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.510 2012/11/30 01:42:43 pgoyette Exp $ +# $NetBSD: mi,v 1.511 2012/12/01 16:30:00 christos Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -548,6 +548,7 @@ ./usr/libdata/debug/usr/tests/lib/libc/string/t_swab.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libc/systests-lib-debug ./usr/libdata/debug/usr/tests/lib/libc/sys/t_access.debug tests-lib-debug debug,atf +./usr/libdata/debug/usr/tests/lib/libc/sys/t_bitops.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libc/sys/t_cerror.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/lib/libc/sys/t_chroot.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libc/sys/t_clock_gettime.debug tests-lib-debug debug,atf @@ -2490,6 +2491,7 @@ ./usr/tests/lib/libc/sys tests-lib-tests ./usr/tests/lib/libc/sys/Atffile tests-lib-tests atf ./usr/tests/lib/libc/sys/t_access tests-lib-tests atf +./usr/tests/lib/libc/sys/t_bitops tests-lib-tests atf ./usr/tests/lib/libc/sys/t_cerror tests-obsolete obsolete ./usr/tests/lib/libc/sys/t_chroot tests-lib-tests atf ./usr/tests/lib/libc/sys/t_clock_gettime tests-lib-tests atf
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: christos Date: Sat Dec 1 16:27:27 UTC 2012 Modified Files: src/tests/lib/libc/sys: Makefile Added Files: src/tests/lib/libc/sys: t_bitops.c Log Message: Add a bitops test To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/tests/lib/libc/sys/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/sys/t_bitops.c 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/libc/sys/Makefile diff -u src/tests/lib/libc/sys/Makefile:1.28 src/tests/lib/libc/sys/Makefile:1.29 --- src/tests/lib/libc/sys/Makefile:1.28 Tue Sep 11 22:00:55 2012 +++ src/tests/lib/libc/sys/Makefile Sat Dec 1 11:27:27 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.28 2012/09/12 02:00:55 manu Exp $ +# $NetBSD: Makefile,v 1.29 2012/12/01 16:27:27 christos Exp $ MKMAN= no @@ -9,6 +9,7 @@ MKMAN= no TESTSDIR= ${TESTSBASE}/lib/libc/sys TESTS_C+= t_access +TESTS_C+= t_bitops TESTS_C+= t_chroot TESTS_C+= t_clock_gettime TESTS_C+= t_clone Added files: Index: src/tests/lib/libc/sys/t_bitops.c diff -u /dev/null src/tests/lib/libc/sys/t_bitops.c:1.1 --- /dev/null Sat Dec 1 11:27:27 2012 +++ src/tests/lib/libc/sys/t_bitops.c Sat Dec 1 11:27:27 2012 @@ -0,0 +1,78 @@ +/* $NetBSD: t_bitops.c,v 1.1 2012/12/01 16:27:27 christos Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include +__RCSID("$NetBSD: t_bitops.c,v 1.1 2012/12/01 16:27:27 christos Exp $"); + +#include +#include +#include + +ATF_TC(bitmap_basic); + +ATF_TC_HEAD(bitmap_basic, tc) +{ +atf_tc_set_md_var(tc, "descr", "A basic test of __BITMAP_*"); +} + +ATF_TC_BODY(bitmap_basic, tc) +{ + uint32_t bm[__BITMAP_SIZE(uint32_t, 65536)]; + __BITMAP_ZERO(bm); + + ATF_REQUIRE(__BITMAP_SIZE(uint32_t, 65536) == 2048); + + ATF_REQUIRE(__BITMAP_SHIFT(uint32_t) == 5); + + ATF_REQUIRE(__BITMAP_MASK(uint32_t) == 31); + + for (size_t i = 0; i < 65536; i += 2) + __BITMAP_SET(i, bm); + + for (size_t i = 0; i < 2048; i++) + ATF_REQUIRE(bm[i] == 0x); + + for (size_t i = 0; i < 65536; i++) + if (i & 1) + ATF_REQUIRE(!__BITMAP_ISSET(i, bm)); + else { + ATF_REQUIRE(__BITMAP_ISSET(i, bm)); + __BITMAP_CLR(i, bm); + } + + for (size_t i = 0; i < 65536; i += 2) + ATF_REQUIRE(!__BITMAP_ISSET(i, bm)); +} + +ATF_TP_ADD_TCS(tp) +{ +ATF_TP_ADD_TC(tp, bitmap_basic); + return atf_no_error(); +}
CVS commit: src/sbin/sysctl
Module Name:src Committed By: christos Date: Sat Dec 1 15:30:16 UTC 2012 Modified Files: src/sbin/sysctl: sysctl.c Log Message: switch from fd_set to bitmap macros, by popular demand. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sbin/sysctl/sysctl.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/sysctl/sysctl.c diff -u src/sbin/sysctl/sysctl.c:1.145 src/sbin/sysctl/sysctl.c:1.146 --- src/sbin/sysctl/sysctl.c:1.145 Wed Nov 28 21:24:14 2012 +++ src/sbin/sysctl/sysctl.c Sat Dec 1 10:30:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.c,v 1.145 2012/11/29 02:24:14 christos Exp $ */ +/* $NetBSD: sysctl.c,v 1.146 2012/12/01 15:30:16 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -68,12 +68,10 @@ __COPYRIGHT("@(#) Copyright (c) 1993\ #if 0 static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: sysctl.c,v 1.145 2012/11/29 02:24:14 christos Exp $"); +__RCSID("$NetBSD: sysctl.c,v 1.146 2012/12/01 15:30:16 christos Exp $"); #endif #endif /* not lint */ -#define FD_SETSIZE 0x1 -#include #include #include #include @@ -82,6 +80,7 @@ __RCSID("$NetBSD: sysctl.c,v 1.145 2012/ #include #include #include +#include #include #include #include @@ -254,6 +253,8 @@ char *fn; int req, stale, errs; FILE *warnfp = stderr; +#define MAXPORTS 0x1 + /* * vah-riables n stuff */ @@ -2692,13 +2693,13 @@ mode_bits(HANDLER_ARGS) } static char * -bitmask_print(const fd_set *o) +bitmask_print(const uint32_t *o) { char *s, *os; s = os = NULL; - for (size_t i = 0; i < FD_SETSIZE; i++) - if (FD_ISSET(i, o)) { + for (size_t i = 0; i < MAXPORTS; i++) + if (__BITMAP_ISSET(i, o)) { int rv; if (os) @@ -2716,21 +2717,21 @@ bitmask_print(const fd_set *o) } static void -bitmask_scan(const void *v, fd_set *o) +bitmask_scan(const void *v, uint32_t *o) { char *s = strdup(v); if (s == NULL) err(1, ""); - FD_ZERO(o); + __BITMAP_ZERO(o); for (s = strtok(s, ","); s; s = strtok(NULL, ",")) { char *e; errno = 0; unsigned long l = strtoul(s, &e, 0); if ((l == ULONG_MAX && errno == ERANGE) || s == e || *e) errx(1, "Invalid port: %s", s); - if (l >= FD_SETSIZE) + if (l >= MAXPORTS) errx(1, "Port out of range: %s", s); - FD_SET(l, o); + __BITMAP_SET(l, o); } } @@ -2740,15 +2741,16 @@ reserve(HANDLER_ARGS) { int rc; size_t osz, nsz; - fd_set o, n; + uint32_t o[__BITMAP_SIZE(uint32_t, MAXPORTS)]; + uint32_t n[__BITMAP_SIZE(uint32_t, MAXPORTS)]; if (fn) trim_whitespace(value, 3); osz = sizeof(o); if (value) { - bitmask_scan(value, &n); - value = (char *)&n; + bitmask_scan(value, n); + value = (char *)n; nsz = sizeof(n); } else nsz = 0; @@ -2763,10 +2765,10 @@ reserve(HANDLER_ARGS) return; if (rflag || xflag) - display_struct(pnode, sname, &o, sizeof(o), + display_struct(pnode, sname, o, sizeof(o), value ? DISPLAY_OLD : DISPLAY_VALUE); else { - char *s = bitmask_print(&o); + char *s = bitmask_print(o); display_string(pnode, sname, s, strlen(s), value ? DISPLAY_OLD : DISPLAY_VALUE); free(s); @@ -2774,10 +2776,10 @@ reserve(HANDLER_ARGS) if (value) { if (rflag || xflag) - display_struct(pnode, sname, &n, sizeof(n), + display_struct(pnode, sname, n, sizeof(n), DISPLAY_NEW); else { - char *s = bitmask_print(&n); + char *s = bitmask_print(n); display_string(pnode, sname, s, strlen(s), DISPLAY_NEW); free(s); }
CVS commit: src/sys/netinet
Module Name:src Committed By: christos Date: Sat Dec 1 15:11:43 UTC 2012 Modified Files: src/sys/netinet: portalgo.c Log Message: switch from fd_set to using bitmap macros To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/netinet/portalgo.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/netinet/portalgo.c diff -u src/sys/netinet/portalgo.c:1.2 src/sys/netinet/portalgo.c:1.3 --- src/sys/netinet/portalgo.c:1.2 Wed Nov 28 21:07:20 2012 +++ src/sys/netinet/portalgo.c Sat Dec 1 10:11:43 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: portalgo.c,v 1.2 2012/11/29 02:07:20 christos Exp $ */ +/* $NetBSD: portalgo.c,v 1.3 2012/12/01 15:11:43 christos Exp $ */ /* * Copyright 2011 Vlad Balan @@ -34,12 +34,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: portalgo.c,v 1.2 2012/11/29 02:07:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: portalgo.c,v 1.3 2012/12/01 15:11:43 christos Exp $"); #include "opt_inet.h" -#define FD_SETSIZE 0x1 -#include #include #include #include @@ -47,6 +45,7 @@ __KERNEL_RCSID(0, "$NetBSD: portalgo.c,v #include #include #include +#include #include #include @@ -89,11 +88,11 @@ static bool portalgo_debug = true; #ifdef INET static int inet4_portalgo = PORTALGO_BSD; -static fd_set inet4_reserve; +static uint32_t inet4_reserve[__BITMAP_SIZE(uint32_t, 0x1)]; #endif #ifdef INET6 static int inet6_portalgo = PORTALGO_BSD; -static fd_set inet6_reserve; +static uint32_t inet6_reserve[__BITMAP_SIZE(uint32_t, 0x1)]; #endif typedef struct { @@ -254,7 +253,7 @@ check_suitable_port(uint16_t port, struc struct inpcb *pcb; struct sockaddr_in sin; - if (FD_ISSET(port, &inet4_reserve)) + if (__BITMAP_ISSET(port, inet4_reserve)) return false; sin.sin_addr = inp->inp_laddr; @@ -299,7 +298,7 @@ check_suitable_port(uint16_t port, struc struct sockaddr_in6 sin6; void *t; - if (FD_ISSET(port, &inet6_reserve)) + if (__BITMAP_ISSET(port, inet6_reserve)) return false; sin6.sin6_addr = in6p->in6p_laddr; @@ -902,7 +901,7 @@ sysctl_portalgo_selected(SYSCTLFN_ARGS, } static int -sysctl_portalgo_reserve(SYSCTLFN_ARGS, fd_set *bt) +sysctl_portalgo_reserve(SYSCTLFN_ARGS, uint32_t *bt) { struct sysctlnode node; int error; @@ -943,7 +942,7 @@ int sysctl_portalgo_reserve4(SYSCTLFN_ARGS) { - return sysctl_portalgo_reserve(SYSCTLFN_CALL(rnode), &inet4_reserve); + return sysctl_portalgo_reserve(SYSCTLFN_CALL(rnode), inet4_reserve); } #endif @@ -958,7 +957,7 @@ sysctl_portalgo_selected6(SYSCTLFN_ARGS) int sysctl_portalgo_reserve6(SYSCTLFN_ARGS) { - return sysctl_portalgo_reserve(SYSCTLFN_CALL(rnode), &inet6_reserve); + return sysctl_portalgo_reserve(SYSCTLFN_CALL(rnode), inet6_reserve); } #endif
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Sat Dec 1 15:03:47 UTC 2012 Modified Files: src/sys/sys: bitops.h Log Message: Add some bitmap operation macros similar to fd_set. Unfortunately we cannot re-use bitstring, because it is userland only. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/sys/bitops.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/sys/bitops.h diff -u src/sys/sys/bitops.h:1.9 src/sys/sys/bitops.h:1.10 --- src/sys/sys/bitops.h:1.9 Sat Jul 30 12:35:58 2011 +++ src/sys/sys/bitops.h Sat Dec 1 10:03:47 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: bitops.h,v 1.9 2011/07/30 16:35:58 christos Exp $ */ +/* $NetBSD: bitops.h,v 1.10 2012/12/01 15:03:47 christos Exp $ */ /*- * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc. @@ -188,9 +188,7 @@ fls64(uint64_t _n) * version written by David Howells. */ #define _ilog2_helper(_n, _x) ((_n) & (1ULL << (_x))) ? _x : -#define ilog2(_n) \ -( \ - __builtin_constant_p(_n) ? ( \ +#define _ilog2_const(_n) ( \ _ilog2_helper(_n, 63) \ _ilog2_helper(_n, 62) \ _ilog2_helper(_n, 61) \ @@ -255,7 +253,12 @@ fls64(uint64_t _n) _ilog2_helper(_n, 2) \ _ilog2_helper(_n, 1) \ _ilog2_helper(_n, 0) \ - -1) : ((sizeof(_n) > 4 ? fls64(_n) : fls32(_n)) - 1) \ + -1) + +#define ilog2(_n) \ +( \ + __builtin_constant_p(_n) ? _ilog2_const(_n) : \ + ((sizeof(_n) > 4 ? fls64(_n) : fls32(_n)) - 1) \ ) static __inline void @@ -291,4 +294,32 @@ fast_remainder32(uint32_t _v, uint32_t _ return _v - _div * fast_divide32(_v, _div, _m, _s1, _s2); } +#define __BITMAP_BITS(__t) (sizeof(__t) * NBBY) +#define __BITMAP_SHIFT(__t) (ilog2(__BITMAP_BITS(__t))) +#define __BITMAP_MASK(__t) (__BITMAP_BITS(__t) - 1) +#define __BITMAP_SIZE(__t, __n) \ +(((__n) + (__BITMAP_BITS(__t) - 1)) / __BITMAP_BITS(__t)) +#define __BITMAP_BIT(__n, __v) \ +(1 << ((__n) & __BITMAP_MASK(*__v))) +#define __BITMAP_WORD(__n, __v) \ +((__n) >> __BITMAP_SHIFT(*__v)) + +#define __BITMAP_SET(__n, __v) \ +(__v[__BITMAP_WORD(__n, __v)] |= __BITMAP_BIT(__n, __v)) +#define __BITMAP_CLR(__n, __v) \ +(__v[__BITMAP_WORD(__n, __v)] &= ~__BITMAP_BIT(__n, __v)) +#define __BITMAP_ISSET(__n, __v) \ +(__v[__BITMAP_WORD(__n, __v)] & __BITMAP_BIT(__n, __v)) + +#if __GNUC_PREREQ__(2, 95) +#define __BITMAP_ZERO(__v) \ +(void)__builtin_memset((__v), 0, sizeof(__v)) +#else +#define __BITMAP_ZERO(__v) do { \ + size_t __i; \ + for (__i = 0; __i < __arraycount(__v); __i++) \ + (__v)[__i] = 0; \ + } while (/* CONSTCOND */ 0) +#endif /* GCC 2.95 */ + #endif /* _SYS_BITOPS_H_ */
CVS commit: src/include
Module Name:src Committed By: skrll Date: Sat Dec 1 13:28:18 UTC 2012 Modified Files: src/include: unistd.h Log Message: Check for _NETBSD_SOURCE being defined wherever we check for _INCOMPLETE_XOPEN_C063 so that we expose the new POSIX extended API set recently added. To generate a diff of this commit: cvs rdiff -u -r1.136 -r1.137 src/include/unistd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/unistd.h diff -u src/include/unistd.h:1.136 src/include/unistd.h:1.137 --- src/include/unistd.h:1.136 Sun Nov 18 17:41:53 2012 +++ src/include/unistd.h Sat Dec 1 13:28:18 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: unistd.h,v 1.136 2012/11/18 17:41:53 manu Exp $ */ +/* $NetBSD: unistd.h,v 1.137 2012/12/01 13:28:18 skrll Exp $ */ /*- * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc. @@ -295,7 +295,7 @@ ssize_t pwrite(int, const void *, size_ * X/Open Extended API set 2 (a.k.a. C063) */ #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0 >= 700) || \ -defined(_INCOMPLETE_XOPEN_C063) || defined(_KERNEL) +defined(_INCOMPLETE_XOPEN_C063) || defined(_NETBSD_SOURCE) int linkat(int, const char *, int, const char *, int); int renameat(int, const char *, int, const char *); int mkfifoat(int, const char *, mode_t);
CVS commit: src
Module Name:src Committed By: mbalmer Date: Sat Dec 1 11:41:50 UTC 2012 Modified Files: src/sys/fs/nilfs: nilfs_fs.h src/sys/kern: subr_tftproot.c src/sys/sys: quotactl.h sysctl.h src/usr.bin/mail: head.c Log Message: Fix misspelling: accommodate is a long enough word to have room for two 'c's and two 'm's. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/fs/nilfs/nilfs_fs.h cvs rdiff -u -r1.11 -r1.12 src/sys/kern/subr_tftproot.c cvs rdiff -u -r1.35 -r1.36 src/sys/sys/quotactl.h cvs rdiff -u -r1.203 -r1.204 src/sys/sys/sysctl.h cvs rdiff -u -r1.21 -r1.22 src/usr.bin/mail/head.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/nilfs/nilfs_fs.h diff -u src/sys/fs/nilfs/nilfs_fs.h:1.2 src/sys/fs/nilfs/nilfs_fs.h:1.3 --- src/sys/fs/nilfs/nilfs_fs.h:1.2 Thu Jun 24 10:20:08 2010 +++ src/sys/fs/nilfs/nilfs_fs.h Sat Dec 1 11:41:49 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: nilfs_fs.h,v 1.2 2010/06/24 10:20:08 reinoud Exp $ */ +/* $NetBSD: nilfs_fs.h,v 1.3 2012/12/01 11:41:49 mbalmer Exp $ */ /* * Copyright (c) 2008, 2009 Reinoud Zandijk @@ -513,7 +513,7 @@ struct nilfs_cpfile_header { struct nilfs_snapshot_list ch_snapshot_list; /* snapshot list */ }; -/* to accomodate with the header */ +/* to accommodate with the header */ #define NILFS_CPFILE_FIRST_CHECKPOINT_OFFSET\ ((sizeof(struct nilfs_cpfile_header) + \ sizeof(struct nilfs_checkpoint) - 1) /\ @@ -549,7 +549,7 @@ struct nilfs_sufile_header { /* ... */ }; -/* to accomodate with the header */ +/* to accommodate with the header */ #define NILFS_SUFILE_FIRST_SEGMENT_USAGE_OFFSET \ ((sizeof(struct nilfs_sufile_header) + \ sizeof(struct nilfs_segment_usage) - 1) / \ Index: src/sys/kern/subr_tftproot.c diff -u src/sys/kern/subr_tftproot.c:1.11 src/sys/kern/subr_tftproot.c:1.12 --- src/sys/kern/subr_tftproot.c:1.11 Sat Oct 27 17:18:39 2012 +++ src/sys/kern/subr_tftproot.c Sat Dec 1 11:41:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_tftproot.c,v 1.11 2012/10/27 17:18:39 chs Exp $ */ +/* $NetBSD: subr_tftproot.c,v 1.12 2012/12/01 11:41:50 mbalmer Exp $ */ /*- * Copyright (c) 2007 Emmanuel Dreyfus, all rights reserved. @@ -39,7 +39,7 @@ #include "opt_md.h" #include -__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.11 2012/10/27 17:18:39 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_tftproot.c,v 1.12 2012/12/01 11:41:50 mbalmer Exp $"); #include #include @@ -439,7 +439,7 @@ tftproot_recv(struct mbuf *m, void *ctx) } /* - * Grow the receiving buffer to accomodate new data + * Grow the receiving buffer to accommodate new data */ newlen = trh->trh_len + (m->m_pkthdr.len - hdrlen); if ((trh->trh_base = realloc(trh->trh_base, Index: src/sys/sys/quotactl.h diff -u src/sys/sys/quotactl.h:1.35 src/sys/sys/quotactl.h:1.36 --- src/sys/sys/quotactl.h:1.35 Wed Feb 1 05:46:45 2012 +++ src/sys/sys/quotactl.h Sat Dec 1 11:41:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: quotactl.h,v 1.35 2012/02/01 05:46:45 dholland Exp $ */ +/* $NetBSD: quotactl.h,v 1.36 2012/12/01 11:41:50 mbalmer Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -66,7 +66,7 @@ struct quotaobjtypestat { /* * Semi-opaque structure for cursors. This holds the cursor state in * userland; the size is exposed only to libquota, not to client code, - * and is meant to be large enough to accomodate all likely future + * and is meant to be large enough to accommodate all likely future * expansion without being unduly bloated, as it will need to be * copied in and out for every call using it. */ Index: src/sys/sys/sysctl.h diff -u src/sys/sys/sysctl.h:1.203 src/sys/sys/sysctl.h:1.204 --- src/sys/sys/sysctl.h:1.203 Sun Oct 14 20:56:55 2012 +++ src/sys/sys/sysctl.h Sat Dec 1 11:41:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.h,v 1.203 2012/10/14 20:56:55 christos Exp $ */ +/* $NetBSD: sysctl.h,v 1.204 2012/12/01 11:41:50 mbalmer Exp $ */ /* * Copyright (c) 1989, 1993 @@ -800,7 +800,7 @@ struct kinfo_file { * kern.evcnt returns an array of these structures, which are designed both to * be immune to 32/64 bit emulation issues. Note that the struct here differs * from the real struct evcnt but contains the same information in order to - * accomodate sysctl. + * accommodate sysctl. */ struct evcnt_sysctl { uint64_t ev_count; /* current count */ Index: src/usr.bin/mail/head.c diff -u src/usr.bin/mail/head.c:1.21 src/usr.bin/mail/head.c:1.22 --- src/usr.bin/mail/head.c:1.21 Tue Oct 23 14:58:44 2007 +++ src/usr.bin/mail/head.c Sat Dec 1 11:41:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: head.c,v 1.21 2007/10/23 14:58:44 christos Exp $ */ +/* $NetBSD: head.c,v 1.22 2012/12/01 11:41:50 mbalmer Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@
CVS commit: src
Module Name:src Committed By: mbalmer Date: Sat Dec 1 11:37:27 UTC 2012 Modified Files: src/games/rogue: machdep.c src/sys/arch/ibmnws/include: pnp.h src/sys/arch/prep/include: pnp.h src/sys/dev/pci/n8: n8_memory_bsd.c Log Message: Fix misspelling of acceptible (it's only acceptable with an 'a', not an 'i'). To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/games/rogue/machdep.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ibmnws/include/pnp.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/prep/include/pnp.h cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/n8/n8_memory_bsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/rogue/machdep.c diff -u src/games/rogue/machdep.c:1.19 src/games/rogue/machdep.c:1.20 --- src/games/rogue/machdep.c:1.19 Thu Sep 1 07:18:51 2011 +++ src/games/rogue/machdep.c Sat Dec 1 11:37:27 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.19 2011/09/01 07:18:51 plunky Exp $ */ +/* $NetBSD: machdep.c,v 1.20 2012/12/01 11:37:27 mbalmer Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)machdep.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: machdep.c,v 1.19 2011/09/01 07:18:51 plunky Exp $"); +__RCSID("$NetBSD: machdep.c,v 1.20 2012/12/01 11:37:27 mbalmer Exp $"); #endif #endif /* not lint */ @@ -84,7 +84,7 @@ __RCSID("$NetBSD: machdep.c,v 1.19 2011/ * #endif * } * - * Appropriate variations of this are of course acceptible. + * Appropriate variations of this are of course acceptable. * The use of "#elseif" is discouraged because of non-portability. * If the correct #define doesn't exist, "UNIX_SYSV" in this case, make it up * and insert it in the list at the top of the file. Alter the CFLAGS Index: src/sys/arch/ibmnws/include/pnp.h diff -u src/sys/arch/ibmnws/include/pnp.h:1.1 src/sys/arch/ibmnws/include/pnp.h:1.2 --- src/sys/arch/ibmnws/include/pnp.h:1.1 Sun Oct 19 03:33:50 2003 +++ src/sys/arch/ibmnws/include/pnp.h Sat Dec 1 11:37:26 2012 @@ -542,7 +542,7 @@ typedef union _PnP_TAG_PACKET { unsigned char Tag; /* small tag = 0x30 or 0x31 */ unsigned char Priority; /* Optional; if missing then x01; else*/ /* x00 = best possible */ -/* x01 = acceptible */ +/* x01 = acceptable */ /* x02 = sub-optimal but functional */ } S6_Pack; Index: src/sys/arch/prep/include/pnp.h diff -u src/sys/arch/prep/include/pnp.h:1.3 src/sys/arch/prep/include/pnp.h:1.4 --- src/sys/arch/prep/include/pnp.h:1.3 Thu Mar 9 20:17:27 2006 +++ src/sys/arch/prep/include/pnp.h Sat Dec 1 11:37:26 2012 @@ -567,7 +567,7 @@ typedef union _PnP_TAG_PACKET { unsigned char Tag; /* small tag = 0x30 or 0x31 */ unsigned char Priority; /* Optional; if missing then x01; else*/ /* x00 = best possible */ -/* x01 = acceptible */ +/* x01 = acceptable */ /* x02 = sub-optimal but functional */ } S6_Pack; Index: src/sys/dev/pci/n8/n8_memory_bsd.c diff -u src/sys/dev/pci/n8/n8_memory_bsd.c:1.5 src/sys/dev/pci/n8/n8_memory_bsd.c:1.6 --- src/sys/dev/pci/n8/n8_memory_bsd.c:1.5 Sat Oct 27 17:18:36 2012 +++ src/sys/dev/pci/n8/n8_memory_bsd.c Sat Dec 1 11:37:27 2012 @@ -61,7 +61,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -static char const n8_id[] = "$Id: n8_memory_bsd.c,v 1.5 2012/10/27 17:18:36 chs Exp $"; +static char const n8_id[] = "$Id: n8_memory_bsd.c,v 1.6 2012/12/01 11:37:27 mbalmer Exp $"; /*/ /** @file n8_memory_bsd.c * @brief NetOctaveMemory Services - FreeBSD-specific support routines. @@ -280,8 +280,8 @@ n8_GetLargeAllocation(N8_MemoryType_t ba #if 0 /* Replacement for: */ m = contigmalloc(size, M_DEVBUF, M_WAITOK, - 0, /* lower acceptible phys addr */ - 0x, /* upper acceptible phys addr */ + 0, /* lower acceptable phys addr */ + 0x, /* upper acceptable phys addr */ PAGE_SIZE, /* alignment */ 0); /* boundary */ #endif
CVS commit: src/sys/ufs/chfs
Module Name:src Committed By: mbalmer Date: Sat Dec 1 11:31:02 UTC 2012 Modified Files: src/sys/ufs/chfs: chfs_readinode.c Log Message: Fix a typo in debug output. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/ufs/chfs/chfs_readinode.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/ufs/chfs/chfs_readinode.c diff -u src/sys/ufs/chfs/chfs_readinode.c:1.6 src/sys/ufs/chfs/chfs_readinode.c:1.7 --- src/sys/ufs/chfs/chfs_readinode.c:1.6 Fri Oct 19 12:44:39 2012 +++ src/sys/ufs/chfs/chfs_readinode.c Sat Dec 1 11:31:01 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: chfs_readinode.c,v 1.6 2012/10/19 12:44:39 ttoth Exp $ */ +/* $NetBSD: chfs_readinode.c,v 1.7 2012/12/01 11:31:01 mbalmer Exp $ */ /*- * Copyright (c) 2010 Department of Software Engineering, @@ -164,7 +164,7 @@ chfs_check_td_data(struct chfs_mount *ch } err = chfs_read_leb(chmp, nref->nref_lnr, buf, ofs, len, &retlen); if (err) { - dbg("error wile reading: %d\n", err); + dbg("error while reading: %d\n", err); err = 2; goto out; }
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Sat Dec 1 09:58:36 UTC 2012 Modified Files: src/doc [netbsd-6]: CHANGES-6.1 Log Message: Ticket 730. To generate a diff of this commit: cvs rdiff -u -r1.1.2.49 -r1.1.2.50 src/doc/CHANGES-6.1 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-6.1 diff -u src/doc/CHANGES-6.1:1.1.2.49 src/doc/CHANGES-6.1:1.1.2.50 --- src/doc/CHANGES-6.1:1.1.2.49 Fri Nov 30 04:30:26 2012 +++ src/doc/CHANGES-6.1 Sat Dec 1 09:58:35 2012 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1,v 1.1.2.49 2012/11/30 04:30:26 msaitoh Exp $ +# $NetBSD: CHANGES-6.1,v 1.1.2.50 2012/12/01 09:58:35 msaitoh Exp $ A complete list of changes from the 6.0 release until the 6.1 release: @@ -916,7 +916,7 @@ sys/dev/usb/if_urndis.c1.4 lib/libc/arch/arm/sys/__aeabi_read_tp.S 1.3 - Add $NetBSD: CHANGES-6.1,v 1.1.2.49 2012/11/30 04:30:26 msaitoh Exp $ tag. Use ip to save r1 instead of the stack. + Add $NetBSD: CHANGES-6.1,v 1.1.2.50 2012/12/01 09:58:35 msaitoh Exp $ tag. Use ip to save r1 instead of the stack. [matt, ticket #701] sys/net/npf/npf.c1.14 @@ -7104,3 +7104,8 @@ lib/libnpf/Makefile1.4 Install libnpf in /lib too because npfctl is linked against it. [christos, ticket #729] + +sys/arch/amd64/conf/XEN3_DOM0 1.91 + + Add alc* at pci, re-sort slightly to reduce diffs from GENERIC. + [riz, ticket #730]
CVS commit: [netbsd-6] src/sys/arch/amd64/conf
Module Name:src Committed By: msaitoh Date: Sat Dec 1 09:56:12 UTC 2012 Modified Files: src/sys/arch/amd64/conf [netbsd-6]: XEN3_DOM0 Log Message: Pull up following revision(s) (requested by riz in ticket #730): sys/arch/amd64/conf/XEN3_DOM0: revision 1.91 Add alc* at pci, re-sort slightly to reduce diffs from GENERIC. To generate a diff of this commit: cvs rdiff -u -r1.77.2.7 -r1.77.2.8 src/sys/arch/amd64/conf/XEN3_DOM0 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/XEN3_DOM0 diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.77.2.7 src/sys/arch/amd64/conf/XEN3_DOM0:1.77.2.8 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.77.2.7 Wed Oct 17 21:33:17 2012 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Sat Dec 1 09:56:11 2012 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.77.2.7 2012/10/17 21:33:17 riz Exp $ +# $NetBSD: XEN3_DOM0,v 1.77.2.8 2012/12/01 09:56:11 msaitoh Exp $ include "arch/amd64/conf/std.xen" @@ -323,8 +323,9 @@ amdpm* at pci? dev ? function ? # RNG an # PCI network interfaces age* at pci? dev ? function ? # Attansic/Atheros L1 Gigabit Ethernet -an* at pci? dev ? function ? # Aironet PC4500/PC4800 (802.11) +alc* at pci? dev ? function ? # Attansic/Atheros L1C/L2C Ethernet ale* at pci? dev ? function ? # Attansic/Atheros L1E Ethernet +an* at pci? dev ? function ? # Aironet PC4500/PC4800 (802.11) ath* at pci? dev ? function ? # Atheros 5210/5211/5212 802.11 atw* at pci? dev ? function ? # ADMtek ADM8211 (802.11) bce* at pci? dev ? function ? # Broadcom 4401 10/100 Ethernet
CVS commit: src/sys/sys
Module Name:src Committed By: skrll Date: Sat Dec 1 08:20:55 UTC 2012 Modified Files: src/sys/sys: fcntl.h stat.h Log Message: Check for _NETBSD_SOURCE being defined wherever we check for _INCOMPLETE_XOPEN_C063 so that we expose the new POSIX extended API set recently added. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/sys/fcntl.h cvs rdiff -u -r1.64 -r1.65 src/sys/sys/stat.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/sys/fcntl.h diff -u src/sys/sys/fcntl.h:1.43 src/sys/sys/fcntl.h:1.44 --- src/sys/sys/fcntl.h:1.43 Sun Nov 18 17:41:54 2012 +++ src/sys/sys/fcntl.h Sat Dec 1 08:20:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: fcntl.h,v 1.43 2012/11/18 17:41:54 manu Exp $ */ +/* $NetBSD: fcntl.h,v 1.44 2012/12/01 08:20:55 skrll Exp $ */ /*- * Copyright (c) 1983, 1990, 1993 @@ -115,7 +115,7 @@ #define O_DIRECTORY 0x0020 /* fail if not a directory */ #define O_CLOEXEC 0x0040 /* set close on exec */ #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0 >= 700) || \ -defined(_INCOMPLETE_XOPEN_C063) || defined(_KERNEL) +defined(_INCOMPLETE_XOPEN_C063) || defined(_NETBSD_SOURCE) #define O_SEARCH 0x0080 /* skip search permission checks */ #endif #if defined(_NETBSD_SOURCE) @@ -292,7 +292,7 @@ struct flock { * Constants for X/Open Extended API set 2 (a.k.a. C063) */ #if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0 >= 700) || \ -defined(_INCOMPLETE_XOPEN_C063) || defined(_KERNEL) +defined(_INCOMPLETE_XOPEN_C063) || defined(_NETBSD_SOURCE) #define AT_FDCWD -100 /* Use cwd for relative link target */ #define AT_EACCESS 0x100 /* Use euig/egid for access checks */ #define AT_SYMLINK_NOFOLLOW 0x200 /* Do not follow symlinks */ @@ -316,7 +316,8 @@ int posix_fadvise(int, off_t, off_t, int /* * X/Open Extended API set 2 (a.k.a. C063) */ -#if defined(_INCOMPLETE_XOPEN_C063) +#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0 >= 700) || \ +defined(_INCOMPLETE_XOPEN_C063) || defined(_NETBSD_SOURCE) int openat(int, const char *, int oflags, ...); #endif __END_DECLS Index: src/sys/sys/stat.h diff -u src/sys/sys/stat.h:1.64 src/sys/sys/stat.h:1.65 --- src/sys/sys/stat.h:1.64 Sat Nov 3 19:39:21 2012 +++ src/sys/sys/stat.h Sat Dec 1 08:20:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: stat.h,v 1.64 2012/11/03 19:39:21 christos Exp $ */ +/* $NetBSD: stat.h,v 1.65 2012/12/01 08:20:55 skrll Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -244,7 +244,8 @@ int lchmod(const char *, mode_t); /* * X/Open Extended API set 2 (a.k.a. C063) */ -#if defined(_INCOMPLETE_XOPEN_C063) +#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0 >= 700) || \ +defined(_INCOMPLETE_XOPEN_C063) || defined(_NETBSD_SOURCE) int fstatat(int, const char *, struct stat *, int); int utimensat(int, const char *, const struct timespec *, int); #endif
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: wiz Date: Sat Dec 1 08:16:26 UTC 2012 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 Log Message: More markup. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/mkubootimage/mkubootimage.1 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/mkubootimage/mkubootimage.1 diff -u src/usr.bin/mkubootimage/mkubootimage.1:1.3 src/usr.bin/mkubootimage/mkubootimage.1:1.4 --- src/usr.bin/mkubootimage/mkubootimage.1:1.3 Sat Dec 1 05:26:16 2012 +++ src/usr.bin/mkubootimage/mkubootimage.1 Sat Dec 1 08:16:25 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkubootimage.1,v 1.3 2012/12/01 05:26:16 matt Exp $ +.\" $NetBSD: mkubootimage.1,v 1.4 2012/12/01 08:16:25 wiz Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -60,7 +60,8 @@ Defines the architecture. This is required. .It Fl a Ar address Sets the image load address. -This is an integer between 0 and UINT32_MAX. +This is an integer between 0 and +.Dv UINT32_MAX . This is required. .It Fl C No ( bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none ) Defines the compression. @@ -68,7 +69,8 @@ The default is .Qq none . .It Fl E Ar address Define the entry point. -This is an integer between 0 and UINT32_MAX. +This is an integer between 0 and +.Dv UINT32_MAX . This option is the same as .Fl e but it inverts the bytes to convert the 32 bit integer @@ -82,7 +84,8 @@ image load address .Pq Fl a . .It Fl e Ar address Define the entry point. -This is an integer between 0 and UINT32_MAX. +This is an integer between 0 and +.Dv UINT32_MAX . If .Fl E or @@ -94,7 +97,8 @@ image load address Display the usage and exit. .It Fl m Ar magic Set the magic. -This is an integer between 0 and UINT32_MAX. +This is an integer between 0 and +.Dv UINT32_MAX . The default is .Qq 0x27051956 . .It Fl n Ar image