CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: matt Date: Thu Feb 16 07:59:46 UTC 2012 Modified Files: src/sys/arch/powerpc/oea: oea_machdep.c ofwoea_machdep.c Log Message: Allow use of large (>256MB) bats for iobats. If XBSEN isn't present, they will be "downsized" into multiple 256MB bats. Tested by riz. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/powerpc/oea/oea_machdep.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/powerpc/oea/ofwoea_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/oea/oea_machdep.c diff -u src/sys/arch/powerpc/oea/oea_machdep.c:1.63 src/sys/arch/powerpc/oea/oea_machdep.c:1.64 --- src/sys/arch/powerpc/oea/oea_machdep.c:1.63 Wed Feb 15 01:56:57 2012 +++ src/sys/arch/powerpc/oea/oea_machdep.c Thu Feb 16 07:59:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: oea_machdep.c,v 1.63 2012/02/15 01:56:57 macallan Exp $ */ +/* $NetBSD: oea_machdep.c,v 1.64 2012/02/16 07:59:46 matt Exp $ */ /* * Copyright (C) 2002 Matt Thomas @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.63 2012/02/15 01:56:57 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.64 2012/02/16 07:59:46 matt Exp $"); #include "opt_ppcarch.h" #include "opt_compat_netbsd.h" @@ -473,12 +473,25 @@ void oea_iobat_add(paddr_t pa, register_t len) { static int z = 1; - const u_int n = __SHIFTOUT(len, (BAT_XBL|BAT_BL) & ~BAT_BL_8M); + const u_int n = BAT_BL_TO_SIZE(len) / BAT_BL_TO_SIZE(BAT_BL_8M); const u_int i = BAT_VA2IDX(pa) & -n; /* in case pa was in the middle */ const int after_bat3 = (oeacpufeat & OEACPU_HIGHBAT) ? 4 : 8; KASSERT(len >= BAT_BL_8M); + /* + * If the caller wanted a bigger BAT than the hardware supports, + * split it into smaller BATs. + */ + if (len > BAT_BL_256M && (oeacpufeat & OEACPU_XBSEN) == 0) { + u_int xn = BAT_BL_TO_SIZE(len) >> 28; + while (xn-- > 0) { + oea_iobat_add(pa, BAT_BL_256M); + pa += 0x1000; + } + return; + } + const register_t batl = BATL(pa, BAT_I|BAT_G, BAT_PP_RW); const register_t batu = BATU(pa, len, BAT_Vs); @@ -600,6 +613,7 @@ oea_batinit(paddr_t pa, ...) va_list ap; cpuvers = mfpvr() >> 16; + /* * we need to call this before zapping BATs so OF calls work */ Index: src/sys/arch/powerpc/oea/ofwoea_machdep.c diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.27 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.28 --- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.27 Wed Feb 15 01:56:58 2012 +++ src/sys/arch/powerpc/oea/ofwoea_machdep.c Thu Feb 16 07:59:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ofwoea_machdep.c,v 1.27 2012/02/15 01:56:58 macallan Exp $ */ +/* $NetBSD: ofwoea_machdep.c,v 1.28 2012/02/16 07:59:46 matt Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.27 2012/02/15 01:56:58 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.28 2012/02/16 07:59:46 matt Exp $"); #include "opt_ppcarch.h" #include "opt_compat_netbsd.h" @@ -416,15 +416,12 @@ ofwoea_batinit(void) /* * cover PCI and register space but not the firmware ROM */ - oea_batinit(0x8000, BAT_BL_256M, - 0x9000, BAT_BL_256M, - 0xa000, BAT_BL_256M, - 0xb000, BAT_BL_256M, + oea_batinit(0x8000, BAT_BL_1G, 0xf000, BAT_BL_128M, 0xf800, BAT_BL_64M, 0); #else -u_int16_t bitmap; + uint16_t bitmap; int node, i; node = OF_finddevice("/");
CVS commit: othersrc/external/bsd/circa/dist
Module Name:othersrc Committed By: agc Date: Thu Feb 16 07:36:55 UTC 2012 Modified Files: othersrc/external/bsd/circa/dist: circa.c Log Message: make sure we initialise the circa structures when decoding a file, and no header is present. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 othersrc/external/bsd/circa/dist/circa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/circa/dist/circa.c diff -u othersrc/external/bsd/circa/dist/circa.c:1.6 othersrc/external/bsd/circa/dist/circa.c:1.7 --- othersrc/external/bsd/circa/dist/circa.c:1.6 Thu Feb 16 04:05:12 2012 +++ othersrc/external/bsd/circa/dist/circa.c Thu Feb 16 07:36:54 2012 @@ -352,7 +352,10 @@ circa_file(circa_t *circa, size_t sector return 0; } } else { - readsize = sectorsize; + if (!circa_init(circa, readsize = sectorsize)) { +(void) fprintf(stderr, "bad sectorsize %zu\n", sectorsize); +return 0; + } } if ((buf = calloc(1, sectorsize)) == NULL || (out = calloc(1, sectorsize)) == NULL) {
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: buhrow Date: Thu Feb 16 06:52:04 UTC 2012 Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: Add the ability to autoconfigure raid components on raw disks. This change causes components on raw disks, as opposed to components inside partitions or wedges, to be autoconfigured if the raid set is configured for autoconfiguration. Approved by oster@ and mrg@ for submission after the NetBSD-6 tag. I've been running these changes in production at my day job for over a year without a problem. See http://mail-index.NetBSD.org/tech-kern/2010/11/09/msg009167.html for the original discussion of this patch and for a version of this patch that works with NetBSD-5.x systems. To generate a diff of this commit: cvs rdiff -u -r1.295 -r1.296 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.295 src/sys/dev/raidframe/rf_netbsdkintf.c:1.296 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.295 Sat Nov 5 16:40:35 2011 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Thu Feb 16 06:52:03 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.295 2011/11/05 16:40:35 erh Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.296 2012/02/16 06:52:03 buhrow Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.295 2011/11/05 16:40:35 erh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.296 2012/02/16 06:52:03 buhrow Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -2992,7 +2992,7 @@ rf_find_raid_components(void) device_t dv; deviter_t di; dev_t dev; - int bmajor, bminor, wedge; + int bmajor, bminor, wedge, rf_part_found; int error; int i; RF_AutoConfig_t *ac_list; @@ -3039,6 +3039,8 @@ rf_find_raid_components(void) /* need to find the device_name_to_block_device_major stuff */ bmajor = devsw_name2blk(device_xname(dv), NULL, 0); + rf_part_found = 0; /*No raid partition as yet*/ + /* get a vnode for the raw partition of this disk */ wedge = device_is_a(dv, "dk"); @@ -3084,6 +3086,7 @@ rf_find_raid_components(void) ac_list = rf_get_component(ac_list, dev, vp, device_xname(dv), dkw.dkw_size, numsecs, secsize); + rf_part_found = 1; /*There is a raid component on this disk*/ continue; } @@ -3108,6 +3111,7 @@ rf_find_raid_components(void) if (error) continue; + rf_part_found = 0; /*No raid partitions yet*/ for (i = 0; i < label.d_npartitions; i++) { char cname[sizeof(ac_list->devname)]; @@ -3129,6 +3133,33 @@ rf_find_raid_components(void) device_xname(dv), 'a' + i); ac_list = rf_get_component(ac_list, dev, vp, cname, label.d_partitions[i].p_size, numsecs, secsize); +rf_part_found = 1; /*There is at least one raid partition on this disk*/ + } + + /* + *If there is no raid component on this disk, either in a + *disklabel or inside a wedge, check the raw partition as well, + *as it is possible to configure raid components on raw disk + *devices. + */ + + if (!rf_part_found) { + char cname[sizeof(ac_list->devname)]; + + dev = MAKEDISKDEV(bmajor, device_unit(dv), RAW_PART); + if (bdevvp(dev, &vp)) +panic("RAID can't alloc vnode"); + + error = VOP_OPEN(vp, FREAD, NOCRED); + if (error) { +/* Whatever... */ +vput(vp); +continue; + } + snprintf(cname, sizeof(cname), "%s%c", + device_xname(dv), 'a' + RAW_PART); + ac_list = rf_get_component(ac_list, dev, vp, cname, +label.d_partitions[RAW_PART].p_size, numsecs, secsize); } } deviter_release(&di);
CVS commit: src
-r1.11 -r0 src/usr.bin/window/lcmd1.c \ src/usr.bin/window/parser2.c src/usr.bin/window/string.c \ src/usr.bin/window/ttgeneric.c cvs rdiff -u -r1.15 -r0 src/usr.bin/window/lcmd2.c cvs rdiff -u -r1.18 -r0 src/usr.bin/window/main.c cvs rdiff -u -r1.14 -r0 src/usr.bin/window/win.c src/usr.bin/window/wwiomux.c cvs rdiff -u -r1.23 -r0 src/usr.bin/window/window.1 cvs rdiff -u -r1.3 -r0 src/usr.bin/window/windowrc cvs rdiff -u -r1.19 -r0 src/usr.bin/window/ww.h src/usr.bin/window/wwinit.c cvs rdiff -u -r1.12 -r0 src/usr.bin/window/wwopen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.984 src/distrib/sets/lists/base/mi:1.985 --- src/distrib/sets/lists/base/mi:1.984 Tue Feb 14 14:03:34 2012 +++ src/distrib/sets/lists/base/mi Thu Feb 16 04:52:49 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.984 2012/02/14 14:03:34 wiz Exp $ +# $NetBSD: mi,v 1.985 2012/02/16 04:52:49 jmmv Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -742,7 +742,7 @@ ./usr/bin/who base-util-bin ./usr/bin/whoamibase-util-bin ./usr/bin/whois base-netutil-bin -./usr/bin/windowbase-util-bin +./usr/bin/windowbase-util-bin obsolete ./usr/bin/write base-util-bin ./usr/bin/xargs base-util-bin ./usr/bin/xz base-util-bin Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1379 src/distrib/sets/lists/man/mi:1.1380 --- src/distrib/sets/lists/man/mi:1.1379 Tue Feb 14 17:35:11 2012 +++ src/distrib/sets/lists/man/mi Thu Feb 16 04:52:50 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1379 2012/02/14 17:35:11 plunky Exp $ +# $NetBSD: mi,v 1.1380 2012/02/16 04:52:50 jmmv Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -573,7 +573,7 @@ ./usr/share/man/cat1/who.0 man-util-catman .cat ./usr/share/man/cat1/whoami.0 man-util-catman .cat ./usr/share/man/cat1/whois.0 man-netutil-catman .cat -./usr/share/man/cat1/window.0 man-util-catman .cat +./usr/share/man/cat1/window.0 man-util-catman obsolete ./usr/share/man/cat1/write.0 man-util-catman .cat ./usr/share/man/cat1/x68k/aout2hux.0 man-util-catman .cat ./usr/share/man/cat1/x68k/bellctrl.0 man-util-catman .cat @@ -3494,7 +3494,7 @@ ./usr/share/man/html1/who.html man-util-htmlman html ./usr/share/man/html1/whoami.html man-util-htmlman html ./usr/share/man/html1/whois.html man-netutil-htmlman html -./usr/share/man/html1/window.html man-util-htmlman html +./usr/share/man/html1/window.html man-util-htmlman obsolete ./usr/share/man/html1/write.html man-util-htmlman html ./usr/share/man/html1/x68k/aout2hux.html man-util-htmlman html ./usr/share/man/html1/x68k/bellctrl.html man-util-htmlman html @@ -6080,7 +6080,7 @@ ./usr/share/man/man1/who.1 man-util-man .man ./usr/share/man/man1/whoami.1 man-util-man .man ./usr/share/man/man1/whois.1 man-netutil-man .man -./usr/share/man/man1/window.1 man-util-man .man +./usr/share/man/man1/window.1 man-util-man obsolete ./usr/share/man/man1/write.1 man-util-man .man ./usr/share/man/man1/x68k/aout2hux.1 man-util-man .man ./usr/share/man/man1/x68k/bellctrl.1 man-util-man .man Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1671 src/doc/CHANGES:1.1672 --- src/doc/CHANGES:1.1671 Wed Feb 15 23:05:33 2012 +++ src/doc/CHANGES Thu Feb 16 04:52:49 2012 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1671 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1672 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -25,4 +25,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0: - + window(1): Removed from the base system in favor of tmux. Use the + pkgsrc/misc/window package from now on. [jmmv 20120215] Index: src/usr.bin/Makefile diff -u src/usr.bin/Makefile:1.207 src/usr.bin/Makefile:1.208 --- src/usr.bin/Makefile:1.207 Tue Feb 7 19:13:31 2012 +++ src/usr.bin/Makefile Thu Feb 16 04:52:47 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.207 2012/02/07 19:13:31 joerg Exp $ +# $NetBSD: Makefile,v 1.208 2012/02/16 04:52:47 jmmv Exp $ # from: @(#)Makefile 8.3 (Berkeley) 1/7/94 .include @@ -31,7 +31,7 @@ SUBDIR= apply asa at audio audiocfg \ uniq units unvis unzip usbhidaction usbhidctl users utoppya \ uudecode uuencode uuidgen vacation vgrind videoctl vis \ vmstat vndcompress w \ - wall wc what whereis who whois window \ + wall wc what whereis who whois \ write xargs xinstall xlint xstr yes SUBDIR+= ../external/zlib/pigz/bin/pigz
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Thu Feb 16 04:20:46 UTC 2012 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_anon.c uvm_page.c uvm_page.h uvm_pdaemon.c uvm_pglist.h uvm_stat.c Log Message: Track the victims selected by the pagedaemon and what happens to then. Keep a hint for what page group has the most free pages for a given color. To generate a diff of this commit: cvs rdiff -u -r1.51.28.1 -r1.51.28.2 src/sys/uvm/uvm_anon.c cvs rdiff -u -r1.140.6.3.4.8 -r1.140.6.3.4.9 src/sys/uvm/uvm_page.c cvs rdiff -u -r1.55.14.7 -r1.55.14.8 src/sys/uvm/uvm_page.h cvs rdiff -u -r1.93.4.2.4.5 -r1.93.4.2.4.6 src/sys/uvm/uvm_pdaemon.c cvs rdiff -u -r1.7.16.4 -r1.7.16.5 src/sys/uvm/uvm_pglist.h cvs rdiff -u -r1.31.12.2 -r1.31.12.3 src/sys/uvm/uvm_stat.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/uvm/uvm_anon.c diff -u src/sys/uvm/uvm_anon.c:1.51.28.1 src/sys/uvm/uvm_anon.c:1.51.28.2 --- src/sys/uvm/uvm_anon.c:1.51.28.1 Tue Feb 14 01:12:42 2012 +++ src/sys/uvm/uvm_anon.c Thu Feb 16 04:20:45 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_anon.c,v 1.51.28.1 2012/02/14 01:12:42 matt Exp $ */ +/* $NetBSD: uvm_anon.c,v 1.51.28.2 2012/02/16 04:20:45 matt Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.51.28.1 2012/02/14 01:12:42 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_anon.c,v 1.51.28.2 2012/02/16 04:20:45 matt Exp $"); #include "opt_uvmhist.h" @@ -192,7 +192,6 @@ uvm_anfree(struct vm_anon *anon) return; } mutex_enter(&uvm_pageqlock); - uvm_pagedequeue(pg); uvm_pagefree(pg); mutex_exit(&uvm_pageqlock); mutex_exit(&anon->an_lock); Index: src/sys/uvm/uvm_page.c diff -u src/sys/uvm/uvm_page.c:1.140.6.3.4.8 src/sys/uvm/uvm_page.c:1.140.6.3.4.9 --- src/sys/uvm/uvm_page.c:1.140.6.3.4.8 Tue Feb 14 01:12:42 2012 +++ src/sys/uvm/uvm_page.c Thu Feb 16 04:20:45 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.140.6.3.4.8 2012/02/14 01:12:42 matt Exp $ */ +/* $NetBSD: uvm_page.c,v 1.140.6.3.4.9 2012/02/16 04:20:45 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.140.6.3.4.8 2012/02/14 01:12:42 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.140.6.3.4.9 2012/02/16 04:20:45 matt Exp $"); #include "opt_uvmhist.h" #include "opt_readahead.h" @@ -321,12 +321,17 @@ uvm_pageremove(struct vm_page *pg) } static void -uvm_page_init_freelist(struct pgfreelist *pgfl) +uvm_page_init_freelist(struct pgfreelist *pgfl, struct uvm_pggroup *pggroups, + size_t color) { for (size_t free_list = 0; free_list < VM_NFREELIST; free_list++) { for (size_t queue = 0; queue < PGFL_NQUEUES; queue++) { LIST_INIT(&pgfl->pgfl_queues[free_list][queue]); } + pgfl->pgfl_pggroups[free_list] = + &pggroups[free_list * uvmexp.ncolors + color]; + pgfl->pgfl_pggroups[free_list]->pgrp_free_list = free_list; + pgfl->pgfl_pggroups[free_list]->pgrp_color = color; } for (size_t queue = 0; queue < PGFL_NQUEUES; queue++) { pgfl->pgfl_pages[queue] = 0; @@ -435,8 +440,10 @@ uvm_page_init(vaddr_t *kvm_startp, vaddr KASSERT(pagearray != NULL); for (u_int color = 0; color < uvmexp.ncolors; color++) { - uvm_page_init_freelist(&uvm.page_free[color]); - uvm_page_init_freelist(&uvm.cpus[0].page_free[color]); + uvm_page_init_freelist(&uvm.page_free[color], + grparray, color); + uvm_page_init_freelist(&uvm.cpus[0].page_free[color], + grparray, color); } memset(pagearray, 0, pagecount * sizeof(struct vm_page)); @@ -466,7 +473,7 @@ uvm_page_init(vaddr_t *kvm_startp, vaddr if (i >= seg->avail_start && i < seg->avail_end) { size_t pggroup = VM_PAGE_TO_PGGROUP(pg, uvmexp.ncolors); uvmexp.npages++; - + KASSERT(pggroup < npggroup); if (grparray[pggroup].pgrp_npages++ == 0) { uvmexp.npggroups++; @@ -962,8 +969,8 @@ uvm_page_recolor(int newncolors) ucpu = curcpu()->ci_data.cpu_uvm; for (color = 0; color < newncolors; color++) { - uvm_page_init_freelist(&uvmarray[color]); - uvm_page_init_freelist(&cpuarray[color]); + uvm_page_init_freelist(&uvmarray[color], grparray, color); + uvm_page_init_freelist(&cpuarray[color], grparray, color); } old_gpgfl = olduvmarray; old_pgfl = ucpu->page_free; @@ -1082,7 +1089,8 @@ uvm_cpu_attach(struct cpu_info *ci) ucpu->page_free = malloc(uvmexp.ncolors * sizeof(ucpu->page_free[0]), M_VMPAGE, M_WAITOK); for (size_t color = 0; color < uvmexp.ncolors; color++) { - uvm_page_init_freelist(&ucpu->page_free[color]); + uvm_page_init_freelist(&ucpu->page_free[color], + uvm.pggroups, color); } ci->ci_data.cpu_uvm = ucpu; } @@ -1284,7 +1292,16 @@ uvm_pagealloc_strat(struct uvm_object *o again: switch (strat) { - case UVM_PGA_STRAT_NORMAL: + case UVM_PGA_STRAT_NORMAL: { + struct uvm_pggroup *hi
CVS commit: othersrc/usr.bin
Module Name:othersrc Committed By: jmmv Date: Thu Feb 16 04:07:33 UTC 2012 Modified Files: othersrc/usr.bin: Makefile Log Message: Recurse into 'window'. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/usr.bin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/Makefile diff -u othersrc/usr.bin/Makefile:1.4 othersrc/usr.bin/Makefile:1.5 --- othersrc/usr.bin/Makefile:1.4 Mon Mar 23 21:03:59 2009 +++ othersrc/usr.bin/Makefile Thu Feb 16 04:07:33 2012 @@ -1,5 +1,5 @@ -# $NetBSD: Makefile,v 1.4 2009/03/23 21:03:59 stacktic Exp $ +# $NetBSD: Makefile,v 1.5 2012/02/16 04:07:33 jmmv Exp $ -SUBDIR= edit fsu_chflags fsu_du fsu_mkfifo fsu_touch +SUBDIR= edit fsu_chflags fsu_du fsu_mkfifo fsu_touch window .include
CVS commit: othersrc/usr.bin/window
Module Name:othersrc Committed By: jmmv Date: Thu Feb 16 04:06:58 UTC 2012 Update of /cvsroot/othersrc/usr.bin/window In directory ivanova.netbsd.org:/tmp/cvs-serv9717 Log Message: Initial import of window-20120215. This is a snapshot of the window(1) source code taken from src on 20120215. window(1) will be dropped from src, so this will remain here for posterity's sake. This copy of the sources will also be the canonical source to generate the distfiles used by pkgsrc/misc/window, if any new ones have to be created. Status: Vendor Tag: TNF Release Tags: window-20120215 N othersrc/usr.bin/window/Makefile N othersrc/usr.bin/window/README N othersrc/usr.bin/window/alias.h N othersrc/usr.bin/window/char.c N othersrc/usr.bin/window/char.h N othersrc/usr.bin/window/cmd.c N othersrc/usr.bin/window/cmd1.c N othersrc/usr.bin/window/cmd2.c N othersrc/usr.bin/window/cmd3.c N othersrc/usr.bin/window/cmd4.c N othersrc/usr.bin/window/cmd5.c N othersrc/usr.bin/window/cmd6.c N othersrc/usr.bin/window/cmd7.c N othersrc/usr.bin/window/compress.c N othersrc/usr.bin/window/context.c N othersrc/usr.bin/window/context.h N othersrc/usr.bin/window/defs.h N othersrc/usr.bin/window/error.c N othersrc/usr.bin/window/lcmd.c N othersrc/usr.bin/window/lcmd.h N othersrc/usr.bin/window/lcmd1.c N othersrc/usr.bin/window/lcmd2.c N othersrc/usr.bin/window/local.h N othersrc/usr.bin/window/main.c N othersrc/usr.bin/window/mloop.c N othersrc/usr.bin/window/parser.h N othersrc/usr.bin/window/parser1.c N othersrc/usr.bin/window/parser2.c N othersrc/usr.bin/window/parser3.c N othersrc/usr.bin/window/parser4.c N othersrc/usr.bin/window/parser5.c N othersrc/usr.bin/window/scanner.c N othersrc/usr.bin/window/startup.c N othersrc/usr.bin/window/string.c N othersrc/usr.bin/window/token.h N othersrc/usr.bin/window/tt.h N othersrc/usr.bin/window/ttf100.c N othersrc/usr.bin/window/ttgeneric.c N othersrc/usr.bin/window/tth19.c N othersrc/usr.bin/window/tth29.c N othersrc/usr.bin/window/ttinit.c N othersrc/usr.bin/window/ttoutput.c N othersrc/usr.bin/window/tttermcap.c N othersrc/usr.bin/window/tttvi925.c N othersrc/usr.bin/window/ttwyse60.c N othersrc/usr.bin/window/ttwyse75.c N othersrc/usr.bin/window/ttzapple.c N othersrc/usr.bin/window/ttzentec.c N othersrc/usr.bin/window/value.h N othersrc/usr.bin/window/var.c N othersrc/usr.bin/window/var.h N othersrc/usr.bin/window/win.c N othersrc/usr.bin/window/window.1 N othersrc/usr.bin/window/window_string.h N othersrc/usr.bin/window/windowrc N othersrc/usr.bin/window/ww.h N othersrc/usr.bin/window/wwadd.c N othersrc/usr.bin/window/wwalloc.c N othersrc/usr.bin/window/wwbox.c N othersrc/usr.bin/window/wwchild.c N othersrc/usr.bin/window/wwclose.c N othersrc/usr.bin/window/wwclreol.c N othersrc/usr.bin/window/wwclreos.c N othersrc/usr.bin/window/wwcursor.c N othersrc/usr.bin/window/wwdata.c N othersrc/usr.bin/window/wwdelchar.c N othersrc/usr.bin/window/wwdelete.c N othersrc/usr.bin/window/wwdelline.c N othersrc/usr.bin/window/wwdump.c N othersrc/usr.bin/window/wwend.c N othersrc/usr.bin/window/wwenviron.c N othersrc/usr.bin/window/wwerror.c N othersrc/usr.bin/window/wwflush.c N othersrc/usr.bin/window/wwframe.c N othersrc/usr.bin/window/wwgets.c N othersrc/usr.bin/window/wwinit.c N othersrc/usr.bin/window/wwinschar.c N othersrc/usr.bin/window/wwinsline.c N othersrc/usr.bin/window/wwiomux.c N othersrc/usr.bin/window/wwlabel.c N othersrc/usr.bin/window/wwmisc.c N othersrc/usr.bin/window/wwmove.c N othersrc/usr.bin/window/wwopen.c N othersrc/usr.bin/window/wwprintf.c N othersrc/usr.bin/window/wwpty.c N othersrc/usr.bin/window/wwputc.c N othersrc/usr.bin/window/wwputs.c N othersrc/usr.bin/window/wwredraw.c N othersrc/usr.bin/window/wwredrawwin.c N othersrc/usr.bin/window/wwrint.c N othersrc/usr.bin/window/wwscroll.c N othersrc/usr.bin/window/wwsize.c N othersrc/usr.bin/window/wwspawn.c N othersrc/usr.bin/window/wwsuspend.c N othersrc/usr.bin/window/wwterminfo.c N othersrc/usr.bin/window/wwtty.c N othersrc/usr.bin/window/wwunframe.c N othersrc/usr.bin/window/wwupdate.c N othersrc/usr.bin/window/wwwrite.c N othersrc/usr.bin/window/xx.c N othersrc/usr.bin/window/xx.h N othersrc/usr.bin/window/xxflush.c N othersrc/usr.bin/window/export.sh No conflicts created by this import
CVS commit: othersrc/external/bsd/httpdev/dist
Module Name:othersrc Committed By: agc Date: Thu Feb 16 04:06:57 UTC 2012 Modified Files: othersrc/external/bsd/httpdev/dist: httpdev.8 main.c Log Message: Don't hardcode a blocksize of 512 bytes. Add a blocksize argument to httpdev (-b blocksize). Bump default blocksize to 4KB. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/httpdev/dist/httpdev.8 \ othersrc/external/bsd/httpdev/dist/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/httpdev/dist/httpdev.8 diff -u othersrc/external/bsd/httpdev/dist/httpdev.8:1.2 othersrc/external/bsd/httpdev/dist/httpdev.8:1.3 --- othersrc/external/bsd/httpdev/dist/httpdev.8:1.2 Wed Feb 15 09:03:38 2012 +++ othersrc/external/bsd/httpdev/dist/httpdev.8 Thu Feb 16 04:06:57 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: httpdev.8,v 1.2 2012/02/15 09:03:38 wiz Exp $ +.\" $NetBSD: httpdev.8,v 1.3 2012/02/16 04:06:57 agc Exp $ .\" .\" Copyright (c) 2012 Alistair Crooks .\" All rights reserved. @@ -23,7 +23,7 @@ .\" (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 February 14, 2012 +.Dd February 15, 2012 .Dt HTTPDEV 8 .Os .Sh NAME @@ -31,6 +31,7 @@ .Nd utility to make a remote file appear as local via HTTP .Sh SYNOPSIS .Nm +.Op Fl b Ar blocksize .Op Fl n Ar name .Ar URI .Ar mount_point @@ -77,6 +78,10 @@ for the storage to be presented. The .Fl n Ar name argument allows the name of the subdirectory of the mount point to be specified. +The +.Fl b Ar blocksize +argument sets the number of bytes which will be done in one HTTP request. +The default blocksize is 512 bytes. .Sh EXAMPLES .Bd -literal # httpdev http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201202061530Z/iso/NetBSD-5.99.64-amd64.iso /mnt \*[Am] Index: othersrc/external/bsd/httpdev/dist/main.c diff -u othersrc/external/bsd/httpdev/dist/main.c:1.2 othersrc/external/bsd/httpdev/dist/main.c:1.3 --- othersrc/external/bsd/httpdev/dist/main.c:1.2 Wed Feb 15 15:56:07 2012 +++ othersrc/external/bsd/httpdev/dist/main.c Thu Feb 16 04:06:57 2012 @@ -75,6 +75,14 @@ typedef struct smalltgt_t { #define __UNCONST(x) (x) #endif +#ifndef KB +#define KB(x) ((x) * 1024) +#endif + +#ifndef DEFAULT_BLOCKSIZE +#define DEFAULT_BLOCKSIZE KB(4) +#endif + /* read the capacity (maximum LBA and blocksize) from the target */ static int read_capacity(const char *uri, uint64_t *size, uint64_t *maxlba, uint32_t *blocklen) @@ -87,7 +95,9 @@ read_capacity(const char *uri, uint64_t if ((s = strstr(buf, "Content-Length:")) == NULL) { return 0; } - *blocklen = 512; + if (*blocklen == 0) { + *blocklen = DEFAULT_BLOCKSIZE; + } *size = (int64_t)strtoll(s + 16, NULL, 10); *maxlba = *size / *blocklen; return 1; @@ -116,7 +126,7 @@ inquiry(const char *uri, targetinfo_t *i /* read info from the target - method depends on size of data being read */ static int -targetop(const char *uri, uint64_t offset, uint32_t length, char *buf, int writing) +targetop(const char *uri, uint64_t offset, uint32_t length, char *buf, const int writing) { if (writing) { return http_post(buf, length, uri, offset, offset + length); @@ -224,12 +234,13 @@ httpdev_read(const char *path, char *buf { virt_dirent_t *ep; smalltgt_t *smalltgt; + const int reading = 0; if ((ep = virtdir_find(&httpdev, path, strlen(path))) == NULL) { return -ENOENT; } smalltgt = (smalltgt_t *)ep->tgt; - if (targetop(smalltgt->uri, offset, size, buf, 0) < 0) { + if (targetop(smalltgt->uri, offset, size, buf, reading) < 0) { return -EPERM; } return size; @@ -242,12 +253,13 @@ httpdev_write(const char *path, const ch { virt_dirent_t *ep; smalltgt_t *smalltgt; + const int writing = 1; if ((ep = virtdir_find(&httpdev, path, strlen(path))) == NULL) { return -ENOENT; } smalltgt = (smalltgt_t *)ep->tgt; - if (targetop(smalltgt->uri, offset, size, __UNCONST(buf), 1) < 0) { + if (targetop(smalltgt->uri, offset, size, __UNCONST(buf), writing) < 0) { return -EPERM; } return size; @@ -384,18 +396,20 @@ static void setup_virtdir(targetinfo_t *target, smalltgt_t *smalltgt) { ssize_t cc; - char f[1024]; + char buf[1024]; - cc = snprintf(f, sizeof(f), "/%s", target->name); - virtdir_add(&httpdev, f, cc, 'd', f, cc); + cc = snprintf(buf, sizeof(buf), "/%s", target->name); + virtdir_add(&httpdev, buf, cc, 'd', buf, cc); setup_entry(target->name, "address", 'l', target->address, -1); - setup_entry(target->name, "storage", 'f', smalltgt, sizeof(*smalltgt)); + cc = snprintf(buf, sizeof(buf), "%u", target->blocksize); + setup_entry(target->name, "blocksize", 'l', buf, cc); setup_entry(target->name, "hostname", 'l', target->host, -1); + setup_entry(target->name, "pid", 'l', target->pid, -1); + setup_entry(target->name, "product", 'l', target->product,
CVS commit: othersrc/external/bsd/circa
Module Name:othersrc Committed By: agc Date: Thu Feb 16 04:05:12 UTC 2012 Modified Files: othersrc/external/bsd/circa/dist: circa.c circa.h libcirca.3 main.c othersrc/external/bsd/circa/libcirca: shlib_version Log Message: Add an argument to circa_file(3), and a command line flag (-n) to circa(1), to denote that we do/do not want the circa header placed in the output. This is useful in cases where the sectorsize is pre-defined, and so we do not need to place the value in a header in the output. Bump shlib major version for the change to the API for libcirca(3). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/circa/dist/circa.c \ othersrc/external/bsd/circa/dist/libcirca.3 \ othersrc/external/bsd/circa/dist/main.c cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/circa/dist/circa.h cvs rdiff -u -r1.1.1.1 -r1.2 \ othersrc/external/bsd/circa/libcirca/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/circa/dist/circa.c diff -u othersrc/external/bsd/circa/dist/circa.c:1.5 othersrc/external/bsd/circa/dist/circa.c:1.6 --- othersrc/external/bsd/circa/dist/circa.c:1.5 Thu Oct 13 16:00:48 2011 +++ othersrc/external/bsd/circa/dist/circa.c Thu Feb 16 04:05:12 2012 @@ -295,7 +295,7 @@ circa_end(circa_t *circa) /* process a file - encoding or decoding */ int -circa_file(circa_t *circa, size_t sectorsize, int encoding, char *in, char *fout) +circa_file(circa_t *circa, size_t sectorsize, int encoding, int header, char *in, char *fout) { uint8_t *buf; uint8_t *out; @@ -332,21 +332,27 @@ circa_file(circa_t *circa, size_t sector (void) fprintf(stderr, "can't allocate sectorsize buffers\n"); return 0; } - outcc = circa_put_header(circa, out, sectorsize); - if (write(fileno(fpout), out, (size_t)outcc) != outcc) { - (void) fprintf(stderr, "short write\n"); - return 0; + if (header) { + outcc = circa_put_header(circa, out, sectorsize); + if (write(fileno(fpout), out, (size_t)outcc) != outcc) { +(void) fprintf(stderr, "short write\n"); +return 0; + } } } else { /* read the encoding paramters from input */ - if (read(fileno(fpin), &circa->header, sizeof(circa->header)) != sizeof(circa->header)) { - (void) fprintf(stderr, "short read\n"); - return 0; - } - if (circa_get_header(circa, &circa->header, sizeof(circa->header)) != sizeof(circa->header) || - !circa_init(circa, readsize = sectorsize = circa->header.sectorsize)) { - (void) fprintf(stderr, "bad sectorsize %zu\n", sectorsize); - return 0; + if (header) { + if (read(fileno(fpin), &circa->header, sizeof(circa->header)) != sizeof(circa->header)) { +(void) fprintf(stderr, "short read\n"); +return 0; + } + if (circa_get_header(circa, &circa->header, sizeof(circa->header)) != sizeof(circa->header) || + !circa_init(circa, readsize = sectorsize = circa->header.sectorsize)) { +(void) fprintf(stderr, "bad sectorsize %zu\n", sectorsize); +return 0; + } + } else { + readsize = sectorsize; } if ((buf = calloc(1, sectorsize)) == NULL || (out = calloc(1, sectorsize)) == NULL) { Index: othersrc/external/bsd/circa/dist/libcirca.3 diff -u othersrc/external/bsd/circa/dist/libcirca.3:1.5 othersrc/external/bsd/circa/dist/libcirca.3:1.6 --- othersrc/external/bsd/circa/dist/libcirca.3:1.5 Wed Aug 3 05:52:19 2011 +++ othersrc/external/bsd/circa/dist/libcirca.3 Thu Feb 16 04:05:12 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: libcirca.3,v 1.5 2011/08/03 05:52:19 agc Exp $ +.\" $NetBSD: libcirca.3,v 1.6 2012/02/16 04:05:12 agc Exp $ .\" .\" Copyright (c) 2011 Alistair Crooks .\" All rights reserved. @@ -23,7 +23,7 @@ .\" (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 August 2, 2011 +.Dd February 15, 2012 .Dt LIBCIRCA 3 .Os .Sh NAME @@ -48,7 +48,7 @@ .Fc .Ft int .Fo circa_file -.Fa "circa_t *circa" "size_t sectorsize" "int encoding" "char *in" "char *fout" +.Fa "circa_t *circa" "size_t sectorsize" "int encoding" "int header" "char *in" "char *fout" .Fc .Ft ssize_t .Fo circa_get_header Index: othersrc/external/bsd/circa/dist/main.c diff -u othersrc/external/bsd/circa/dist/main.c:1.5 othersrc/external/bsd/circa/dist/main.c:1.6 --- othersrc/external/bsd/circa/dist/main.c:1.5 Wed Aug 3 05:52:19 2011 +++ othersrc/external/bsd/circa/dist/main.c Thu Feb 16 04:05:12 2012 @@ -34,7 +34,7 @@ #include "circa.h" -#define PKG_VERSION "20110511" +#define PKG_VERSION "20120215"
CVS commit: src
Module Name:src Committed By: perseant Date: Thu Feb 16 02:47:56 UTC 2012 Modified Files: src/sbin/newfs_lfs: make_lfs.c src/sys/ufs/lfs: lfs.h lfs_alloc.c lfs_bio.c lfs_segment.c lfs_vfsops.c lfs_vnops.c src/tests/fs/vfs: t_renamerace.c t_rmdirrace.c Log Message: Pass t_renamerace and t_rmdirrace tests. Adapt dholland@'s fix to ufs_rename to fix PR kern/43582. Address several other MP locking issues discovered during the course of investigating the same problem. Removed extraneous vn_lock() calls on the Ifile, since the Ifile writes are controlled by the segment lock. Fix PR kern/45982 by deemphasizing the estimate of how much metadata will fill the empty space on disk when the disk is nearly empty (t_renamerace crates a lot of inode blocks on a tiny empty disk). To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sbin/newfs_lfs/make_lfs.c cvs rdiff -u -r1.135 -r1.136 src/sys/ufs/lfs/lfs.h cvs rdiff -u -r1.111 -r1.112 src/sys/ufs/lfs/lfs_alloc.c cvs rdiff -u -r1.121 -r1.122 src/sys/ufs/lfs/lfs_bio.c cvs rdiff -u -r1.223 -r1.224 src/sys/ufs/lfs/lfs_segment.c cvs rdiff -u -r1.293 -r1.294 src/sys/ufs/lfs/lfs_vfsops.c cvs rdiff -u -r1.239 -r1.240 src/sys/ufs/lfs/lfs_vnops.c cvs rdiff -u -r1.24 -r1.25 src/tests/fs/vfs/t_renamerace.c cvs rdiff -u -r1.8 -r1.9 src/tests/fs/vfs/t_rmdirrace.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/newfs_lfs/make_lfs.c diff -u src/sbin/newfs_lfs/make_lfs.c:1.18 src/sbin/newfs_lfs/make_lfs.c:1.19 --- src/sbin/newfs_lfs/make_lfs.c:1.18 Thu Feb 2 03:50:32 2012 +++ src/sbin/newfs_lfs/make_lfs.c Thu Feb 16 02:47:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: make_lfs.c,v 1.18 2012/02/02 03:50:32 perseant Exp $ */ +/* $NetBSD: make_lfs.c,v 1.19 2012/02/16 02:47:54 perseant Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ #if 0 static char sccsid[] = "@(#)lfs.c 8.5 (Berkeley) 5/24/95"; #else -__RCSID("$NetBSD: make_lfs.c,v 1.18 2012/02/02 03:50:32 perseant Exp $"); +__RCSID("$NetBSD: make_lfs.c,v 1.19 2012/02/16 02:47:54 perseant Exp $"); #endif #endif /* not lint */ @@ -496,7 +496,7 @@ make_lfs(int devfd, uint secsize, struct if (fs->lfs_resvseg < MIN_RESV_SEGS) fs->lfs_resvseg = MIN_RESV_SEGS; - if(fs->lfs_nseg < (3 * CM_MAG_NUM * fs->lfs_minfreeseg) / CM_MAG_DEN + 1 + if(fs->lfs_nseg < (4 * fs->lfs_minfreeseg) || fs->lfs_nseg < LFS_MIN_SBINTERVAL + 1) { if(seg_size == 0 && ssize > (bsize<<1)) { Index: src/sys/ufs/lfs/lfs.h diff -u src/sys/ufs/lfs/lfs.h:1.135 src/sys/ufs/lfs/lfs.h:1.136 --- src/sys/ufs/lfs/lfs.h:1.135 Mon Jan 2 22:10:44 2012 +++ src/sys/ufs/lfs/lfs.h Thu Feb 16 02:47:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs.h,v 1.135 2012/01/02 22:10:44 perseant Exp $ */ +/* $NetBSD: lfs.h,v 1.136 2012/02/16 02:47:55 perseant Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -1027,13 +1027,23 @@ struct lfs_inode_ext { /* * Estimate number of clean blocks not available for writing because * they will contain metadata or overhead. This is calculated as - * (dmeta / # dirty segments) * (# clean segments). + * + * E = ((C * M / D) * D + (0) * (T - D)) / T + * or more simply + * E = (C * M) / T + * + * where + * C is the clean space, + * D is the dirty space, + * M is the dirty metadata, and + * T = C + D is the total space on disk. + * + * This approximates the old formula of E = C * M / D when D is close to T, + * but avoids falsely reporting "disk full" when the sample size (D) is small. */ -#define CM_MAG_NUM 3 -#define CM_MAG_DEN 2 #define LFS_EST_CMETA(F) (int32_t)(( \ -(CM_MAG_NUM * ((F)->lfs_dmeta * (int64_t)(F)->lfs_nclean)) / \ -(CM_MAG_DEN * ((F)->lfs_nseg - (F)->lfs_nclean + ((F)->lfs_dmeta * (int64_t)(F)->lfs_nclean) / \ + ((F)->lfs_nseg))) /* Estimate total size of the disk not including metadata */ #define LFS_EST_NONMETA(F) ((F)->lfs_dsize - (F)->lfs_dmeta - LFS_EST_CMETA(F)) Index: src/sys/ufs/lfs/lfs_alloc.c diff -u src/sys/ufs/lfs/lfs_alloc.c:1.111 src/sys/ufs/lfs/lfs_alloc.c:1.112 --- src/sys/ufs/lfs/lfs_alloc.c:1.111 Sun Jun 12 03:36:01 2011 +++ src/sys/ufs/lfs/lfs_alloc.c Thu Feb 16 02:47:55 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_alloc.c,v 1.111 2011/06/12 03:36:01 rmind Exp $ */ +/* $NetBSD: lfs_alloc.c,v 1.112 2012/02/16 02:47:55 perseant Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.111 2011/06/12 03:36:01 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_alloc.c,v 1.112 2012/02/16 02:47:55 perseant Exp $"); #if defined(_KERNEL_OPT) #include "opt_quota.h" @@ -207,7 +207,6 @@ lfs_valloc(struct vnode *pvp, int mode, ASSERT_NO_SEGLOCK(fs); lfs_seglock(fs, SEGM_PROT); - vn_lock(fs->lfs_ivnode, LK_EXCLUSIVE); /* Get
CVS commit: src/usr.sbin/crash
Module Name:src Committed By: christos Date: Thu Feb 16 02:37:43 UTC 2012 Modified Files: src/usr.sbin/crash: Makefile Log Message: - make this work for arm32 - factor out duplicated ifdefs To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/crash/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/crash/Makefile diff -u src/usr.sbin/crash/Makefile:1.16 src/usr.sbin/crash/Makefile:1.17 --- src/usr.sbin/crash/Makefile:1.16 Tue Jan 31 16:17:57 2012 +++ src/usr.sbin/crash/Makefile Wed Feb 15 21:37:43 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2012/01/31 21:17:57 mlelstv Exp $ +# $NetBSD: Makefile,v 1.17 2012/02/16 02:37:43 christos Exp $ PROG= crash MAN= crash.8 @@ -15,7 +15,10 @@ DPADD+= ${LIBUTIL} ${LIBKVM} ${LIBEDIT} || ${MACHINE} == "hp700" \ || ${MACHINE} == "i386" \ || ${MACHINE} == "sparc64" \ +|| (${MACHINE_ARCH} == "arm" && ${MACHINE} != "acorn26") \ || ${MACHINE_ARCH} == "m68k" +SRCS+= db_trace.c +SRCS+= db_machdep.c REALCRASH=yes .else REALCRASH=no @@ -40,30 +43,24 @@ SRCS+= db_sym.c db_variables.c db_write_ .PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} SRCS+= db_disasm.c +CPPFLAGS+= -I${S}/arch + . if${MACHINE} == "amd64" \ || ${MACHINE} == "i386" MACHINE_FAMILY = x86 -.PATH: ${S}/arch/x86/x86 -SRCS+= db_trace.c -SRCS+= db_machdep.c +. elif ${MACHINE_ARCH} == "m68k" \ + || ${MACHINE_ARCH} == "arm" +MACHINE_FAMILY = ${MACHINE_ARCH} . else MACHINE_FAMILY = ${MACHINE} . endif -. if ${MACHINE} == "hp700" -SRCS+= db_trace.c db_machdep.c -. endif - -. if ${MACHINE} == "sparc64" -SRCS+= db_trace.c db_interface.c -. endif +.if ${MACHINE_ARCH} == "arm" +.PATH: ${S}/arch/arm/arm32 +SRCS+=disassem.c setstack.S cpufunc_asm.S +.endif -. if ${MACHINE_ARCH} == "m68k" -MACHINE_FAMILY = m68k -.PATH: ${S}/arch/m68k/m68k -CPPFLAGS+= -I${S}/arch -SRCS+= db_trace.c db_interface.c -. endif +.PATH: ${S}/arch/${MACHINE_FAMILY}/${MACHINE_FAMILY} # crash main source SRCS+= crash.c
CVS commit: src/sys/arch/arm
Module Name:src Committed By: christos Date: Thu Feb 16 02:35:52 UTC 2012 Modified Files: src/sys/arch/arm/arm: cpufunc_asm.S src/sys/arch/arm/arm32: setstack.S Log Message: don't need arm/cpu.h, we just need the cpureg.h... To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/arm/cpufunc_asm.S cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/arm32/setstack.S 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/arm/arm/cpufunc_asm.S diff -u src/sys/arch/arm/arm/cpufunc_asm.S:1.14 src/sys/arch/arm/arm/cpufunc_asm.S:1.15 --- src/sys/arch/arm/arm/cpufunc_asm.S:1.14 Sun Apr 27 14:58:43 2008 +++ src/sys/arch/arm/arm/cpufunc_asm.S Wed Feb 15 21:35:52 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc_asm.S,v 1.14 2008/04/27 18:58:43 matt Exp $ */ +/* $NetBSD: cpufunc_asm.S,v 1.15 2012/02/16 02:35:52 christos Exp $ */ /* * Copyright (c) 1997,1998 Mark Brinicombe. @@ -41,8 +41,8 @@ * Created : 30/01/97 */ +#include #include -#include .text .align 0 Index: src/sys/arch/arm/arm32/setstack.S diff -u src/sys/arch/arm/arm32/setstack.S:1.4 src/sys/arch/arm/arm32/setstack.S:1.5 --- src/sys/arch/arm/arm32/setstack.S:1.4 Sun Apr 27 14:58:44 2008 +++ src/sys/arch/arm/arm32/setstack.S Wed Feb 15 21:35:52 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: setstack.S,v 1.4 2008/04/27 18:58:44 matt Exp $ */ +/* $NetBSD: setstack.S,v 1.5 2012/02/16 02:35:52 christos Exp $ */ /* * Copyright (c) 1994 Mark Brinicombe. @@ -46,11 +46,10 @@ * * Based of kate/display/setstack.s */ - -#include +#include #include - RCSID("$NetBSD: setstack.S,v 1.4 2008/04/27 18:58:44 matt Exp $") + RCSID("$NetBSD: setstack.S,v 1.5 2012/02/16 02:35:52 christos Exp $") /* To set the stack pointer for a particular mode we must switch * to that mode update the banked r13 and then switch back.
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: christos Date: Thu Feb 16 02:34:56 UTC 2012 Modified Files: src/sys/arch/arm/arm: disassem.c Log Message: cast printf so it can be used from userland, and include the proper include files for userland if not kernel. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/arm/disassem.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/arm/arm/disassem.c diff -u src/sys/arch/arm/arm/disassem.c:1.18 src/sys/arch/arm/arm/disassem.c:1.19 --- src/sys/arch/arm/arm/disassem.c:1.18 Sun Apr 27 14:58:43 2008 +++ src/sys/arch/arm/arm/disassem.c Wed Feb 15 21:34:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: disassem.c,v 1.18 2008/04/27 18:58:43 matt Exp $ */ +/* $NetBSD: disassem.c,v 1.19 2012/02/16 02:34:56 christos Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe. @@ -49,10 +49,14 @@ #include -__KERNEL_RCSID(0, "$NetBSD: disassem.c,v 1.18 2008/04/27 18:58:43 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: disassem.c,v 1.19 2012/02/16 02:34:56 christos Exp $"); #include #include +#ifndef _KERNEL +#include +#include +#endif /* * General instruction format @@ -680,7 +684,8 @@ disassemble_printaddr(u_int address) } static const disasm_interface_t disassemble_di = { - disassemble_readword, disassemble_printaddr, printf + disassemble_readword, disassemble_printaddr, + (void (*)(const char *, ...))printf }; void
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: christos Date: Thu Feb 16 02:33:38 UTC 2012 Modified Files: src/sys/arch/arm/arm32: db_interface.c db_machdep.c Log Message: move stuff between the two files, so db_interface contains the functions it needs for userland programs to link. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/arm/arm32/db_interface.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/arm32/db_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/db_interface.c diff -u src/sys/arch/arm/arm32/db_interface.c:1.48 src/sys/arch/arm/arm32/db_interface.c:1.49 --- src/sys/arch/arm/arm32/db_interface.c:1.48 Wed Jun 16 18:06:53 2010 +++ src/sys/arch/arm/arm32/db_interface.c Wed Feb 15 21:33:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.48 2010/06/16 22:06:53 jmcneill Exp $ */ +/* $NetBSD: db_interface.c,v 1.49 2012/02/16 02:33:37 christos Exp $ */ /* * Copyright (c) 1996 Scott K. Stevens @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.48 2010/06/16 22:06:53 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.49 2012/02/16 02:33:37 christos Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -64,71 +64,13 @@ __KERNEL_RCSID(0, "$NetBSD: db_interface #define db_printf printf #endif -static long nil; - -int db_access_und_sp(const struct db_variable *, db_expr_t *, int); -int db_access_abt_sp(const struct db_variable *, db_expr_t *, int); -int db_access_irq_sp(const struct db_variable *, db_expr_t *, int); u_int db_fetch_reg(int, db_regs_t *); int db_trapper(u_int, u_int, trapframe_t *, int); -const struct db_variable db_regs[] = { - { "spsr", (long *)&DDB_REGS->tf_spsr, FCN_NULL, }, - { "r0", (long *)&DDB_REGS->tf_r0, FCN_NULL, }, - { "r1", (long *)&DDB_REGS->tf_r1, FCN_NULL, }, - { "r2", (long *)&DDB_REGS->tf_r2, FCN_NULL, }, - { "r3", (long *)&DDB_REGS->tf_r3, FCN_NULL, }, - { "r4", (long *)&DDB_REGS->tf_r4, FCN_NULL, }, - { "r5", (long *)&DDB_REGS->tf_r5, FCN_NULL, }, - { "r6", (long *)&DDB_REGS->tf_r6, FCN_NULL, }, - { "r7", (long *)&DDB_REGS->tf_r7, FCN_NULL, }, - { "r8", (long *)&DDB_REGS->tf_r8, FCN_NULL, }, - { "r9", (long *)&DDB_REGS->tf_r9, FCN_NULL, }, - { "r10", (long *)&DDB_REGS->tf_r10, FCN_NULL, }, - { "r11", (long *)&DDB_REGS->tf_r11, FCN_NULL, }, - { "r12", (long *)&DDB_REGS->tf_r12, FCN_NULL, }, - { "usr_sp", (long *)&DDB_REGS->tf_usr_sp, FCN_NULL, }, - { "usr_lr", (long *)&DDB_REGS->tf_usr_lr, FCN_NULL, }, - { "svc_sp", (long *)&DDB_REGS->tf_svc_sp, FCN_NULL, }, - { "svc_lr", (long *)&DDB_REGS->tf_svc_lr, FCN_NULL, }, - { "pc", (long *)&DDB_REGS->tf_pc, FCN_NULL, }, - { "und_sp", &nil, db_access_und_sp, }, - { "abt_sp", &nil, db_access_abt_sp, }, - { "irq_sp", &nil, db_access_irq_sp, }, -}; - -const struct db_variable * const db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]); - int db_active = 0; db_regs_t ddb_regs; /* register state */ -int -db_access_und_sp(const struct db_variable *vp, db_expr_t *valp, int rw) -{ - - if (rw == DB_VAR_GET) - *valp = get_stackptr(PSR_UND32_MODE); - return(0); -} - -int -db_access_abt_sp(const struct db_variable *vp, db_expr_t *valp, int rw) -{ - - if (rw == DB_VAR_GET) - *valp = get_stackptr(PSR_ABT32_MODE); - return(0); -} - -int -db_access_irq_sp(const struct db_variable *vp, db_expr_t *valp, int rw) -{ - - if (rw == DB_VAR_GET) - *valp = get_stackptr(PSR_IRQ32_MODE); - return(0); -} #ifdef DDB /* @@ -361,20 +303,6 @@ cpu_Debugger(void) __asm(".word 0xe7ff"); } -const struct db_command db_machine_command_table[] = { - { DDB_ADD_CMD("frame", db_show_frame_cmd, 0, - "Displays the contents of a trapframe", - "[address]", - " address:\taddress of trapfame to display")}, - { DDB_ADD_CMD("panic", db_show_panic_cmd, 0, - "Displays the last panic string", - NULL,NULL) }, -#ifdef ARM32_DB_COMMANDS - ARM32_DB_COMMANDS, -#endif - { DDB_ADD_CMD(NULL, NULL, 0,NULL,NULL,NULL) } -}; - int db_trapper(u_int addr, u_int inst, trapframe_t *frame, int fault_code) { Index: src/sys/arch/arm/arm32/db_machdep.c diff -u src/sys/arch/arm/arm32/db_machdep.c:1.12 src/sys/arch/arm/arm32/db_machdep.c:1.13 --- src/sys/arch/arm/arm32/db_machdep.c:1.12 Sat Mar 14 11:36:01 2009 +++ src/sys/arch/arm/arm32/db_machdep.c Wed Feb 15 21:33:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.c,v 1.12 2009/03/14 15:36:01 dsl Exp $ */ +/* $NetBSD: db_machdep.c,v 1.13 2012/02/16 02:33:37 christos Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.12 2009/03/14 15:36:01 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.13 2012/02/16 02:33:37 christos Exp $"); #include #include @@ -37,23 +37,101 @@ __KERNEL_RCSID(0, "$NetBSD: db_machdep.c #include #include +#include #include #include #include
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: christos Date: Thu Feb 16 02:32:40 UTC 2012 Modified Files: src/sys/arch/arm/arm: db_trace.c Log Message: Arrange so that we can be used from userland, by not accessing pointers directly and using db_read_bytes(). XXX: arm26 not handled. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/arm/db_trace.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/arm/arm/db_trace.c diff -u src/sys/arch/arm/arm/db_trace.c:1.22 src/sys/arch/arm/arm/db_trace.c:1.23 --- src/sys/arch/arm/arm/db_trace.c:1.22 Wed Jun 30 22:38:27 2010 +++ src/sys/arch/arm/arm/db_trace.c Wed Feb 15 21:32:40 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: db_trace.c,v 1.22 2010/07/01 02:38:27 rmind Exp $ */ +/* $NetBSD: db_trace.c,v 1.23 2012/02/16 02:32:40 christos Exp $ */ /* * Copyright (c) 2000, 2001 Ben Harris @@ -31,16 +31,19 @@ #include -__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.22 2010/07/01 02:38:27 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.23 2012/02/16 02:32:40 christos Exp $"); #include #include #include +#include #include +#include #include #include #include +#include #include #define INKERNEL(va) (((vaddr_t)(va)) >= VM_MIN_KERNEL_ADDRESS) @@ -106,25 +109,36 @@ db_stack_trace_print(db_expr_t addr, boo frame = (u_int32_t *)(DDB_REGS->tf_r11); else { if (trace_thread) { - struct proc *p; struct pcb *pcb; - struct lwp *l; + proc_t p; + lwp_t l; + if (lwpaddr) { -l = (struct lwp *)addr; -p = l->l_proc; -(*pr)("trace: pid %d ", p->p_pid); +db_read_bytes(addr, sizeof(l), +(char *)&l); +db_read_bytes((db_addr_t)l.l_proc, +sizeof(p), (char *)&p); +(*pr)("trace: pid %d ", p.p_pid); } else { +proc_t *pp; + (*pr)("trace: pid %d ", (int)addr); -p = proc_find_raw(addr); -if (p == NULL) { +if ((pp = db_proc_find((pid_t)addr)) == 0) { (*pr)("not found\n"); return; } -l = LIST_FIRST(&p->p_lwps); -KASSERT(l != NULL); +db_read_bytes((db_addr_t)pp, sizeof(p), (char *)&p); +addr = (db_addr_t)p.p_lwps.lh_first; +db_read_bytes(addr, sizeof(l), (char *)&l); } - (*pr)("lid %d ", l->l_lid); - pcb = lwp_getpcb(l); + (*pr)("lid %d ", l.l_lid); + pcb = lwp_getpcb(&l); +#ifndef _KERNEL + struct pcb pcbb; + db_read_bytes((db_addr_t)pcb, sizeof(*pcb), + (char *)&pcbb); + pcb = &pcbb; +#endif #ifdef acorn26 frame = (uint32_t *)(pcb->pcb_sf->sf_r11); #else @@ -144,6 +158,14 @@ db_stack_trace_print(db_expr_t addr, boo u_int32_t *rp; const char *sep; + lastframe = frame; +#ifndef _KERNEL + uint32_t frameb[4]; + db_read_bytes((db_addr_t)(frame - 4), sizeof(frameb), + (char *)frameb); + frame = frameb + 4; +#endif + /* * In theory, the SCP isn't guaranteed to be in the function * that generated the stack frame. We hope for the best. @@ -190,7 +212,6 @@ db_stack_trace_print(db_expr_t addr, boo if (frame[FR_RFP] == 0) break; /* Top of stack */ - lastframe = frame; frame = (u_int32_t *)(frame[FR_RFP]); if (INKERNEL((int)frame)) {
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: christos Date: Thu Feb 16 02:30:32 UTC 2012 Modified Files: src/sys/arch/arm/include: cpu.h Log Message: expose cpu structures to kmemuser and prevent opt_*.h from being included if kmemuser To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/arch/arm/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/cpu.h diff -u src/sys/arch/arm/include/cpu.h:1.62 src/sys/arch/arm/include/cpu.h:1.63 --- src/sys/arch/arm/include/cpu.h:1.62 Sat Nov 13 08:13:33 2010 +++ src/sys/arch/arm/include/cpu.h Wed Feb 15 21:30:32 2012 @@ -60,18 +60,18 @@ #define CPU_POWERSAVE 5 /* int: use CPU powersave mode */ #define CPU_MAXID 6 /* number of valid machdep ids */ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KMEMUSER) /* * Kernel-only definitions */ -#ifndef _LKM +#if !defined(_LKM) && defined(_KERNEL_OPT) #include "opt_multiprocessor.h" #include "opt_cpuoptions.h" #include "opt_lockdebug.h" #include "opt_cputypes.h" -#endif /* !_LKM */ +#endif /* !_LKM && _KERNEL_OPT */ #include
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: christos Date: Thu Feb 16 02:29:25 UTC 2012 Modified Files: src/sys/arch/arm/include: cpufunc.h Log Message: expose functions needed to compute stack traces to kmemuser To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/arm/include/cpufunc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/cpufunc.h diff -u src/sys/arch/arm/include/cpufunc.h:1.54 src/sys/arch/arm/include/cpufunc.h:1.55 --- src/sys/arch/arm/include/cpufunc.h:1.54 Sat Dec 10 22:30:23 2011 +++ src/sys/arch/arm/include/cpufunc.h Wed Feb 15 21:29:25 2012 @@ -689,19 +689,6 @@ u_int set_r15(u_int, u_int); u_int get_r15(void); #endif /* __PROG32 */ -/* - * Functions to manipulate cpu r13 - * (in arm/arm32/setstack.S) - */ - -void set_stackptr (u_int, u_int); -u_int get_stackptr (u_int); - -/* - * Miscellany - */ - -int get_pc_str_offset (void); /* * CPU functions from locore.S @@ -730,6 +717,24 @@ extern int arm_dcache_align; extern int arm_dcache_align_mask; #endif /* _KERNEL */ + +#if defined(_KERNEL) || defined(_KMEMUSER) +/* + * Miscellany + */ + +int get_pc_str_offset (void); + +/* + * Functions to manipulate cpu r13 + * (in arm/arm32/setstack.S) + */ + +void set_stackptr (u_int, u_int); +u_int get_stackptr (u_int); + +#endif /* _KERNEL || _KMEMUSER */ + #endif /* _ARM32_CPUFUNC_H_ */ /* End of cpufunc.h */
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: christos Date: Thu Feb 16 02:27:11 UTC 2012 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: expose stuff that crash needs to kmemuser To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/include/arm32/vmparam.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.25 src/sys/arch/arm/include/arm32/vmparam.h:1.26 --- src/sys/arch/arm/include/arm32/vmparam.h:1.25 Sun Nov 14 08:33:21 2010 +++ src/sys/arch/arm/include/arm32/vmparam.h Wed Feb 15 21:27:11 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.25 2010/11/14 13:33:21 uebayasi Exp $ */ +/* $NetBSD: vmparam.h,v 1.26 2012/02/16 02:27:11 christos Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -38,7 +38,7 @@ #ifndef _ARM_ARM32_VMPARAM_H_ #define _ARM_ARM32_VMPARAM_H_ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KMEMUSER) /* * Virtual Memory parameters common to all arm32 platforms. @@ -98,6 +98,6 @@ extern vaddr_t virtual_end; #endif #endif /* __ASSEMBLER__ */ -#endif /* _KERNEL */ +#endif /* _KERNEL || _KMEMUSER */ #endif /* _ARM_ARM32_VMPARAM_H_ */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: christos Date: Thu Feb 16 02:26:36 UTC 2012 Modified Files: src/sys/arch/arm/include: db_machdep.h Log Message: include ; things included from here need it. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/include/db_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/db_machdep.h diff -u src/sys/arch/arm/include/db_machdep.h:1.17 src/sys/arch/arm/include/db_machdep.h:1.18 --- src/sys/arch/arm/include/db_machdep.h:1.17 Thu May 26 11:34:12 2011 +++ src/sys/arch/arm/include/db_machdep.h Wed Feb 15 21:26:35 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.h,v 1.17 2011/05/26 15:34:12 joerg Exp $ */ +/* $NetBSD: db_machdep.h,v 1.18 2012/02/16 02:26:35 christos Exp $ */ /* * Copyright (c) 1996 Scott K Stevens @@ -34,7 +34,7 @@ /* * Machine-dependent defines for new kernel debugger. */ - +#include #include #include #include
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: joerg Date: Wed Feb 15 23:53:13 UTC 2012 Modified Files: src/usr.sbin/makemandb: apropos.1 apropos.c Log Message: Add support for apropos -s like in the old apropos. Fix capitalisation. Add note about optional quotation. From Abhinav Upadhyay. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/makemandb/apropos.1 cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/makemandb/apropos.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/makemandb/apropos.1 diff -u src/usr.sbin/makemandb/apropos.1:1.2 src/usr.sbin/makemandb/apropos.1:1.3 --- src/usr.sbin/makemandb/apropos.1:1.2 Fri Feb 10 16:57:44 2012 +++ src/usr.sbin/makemandb/apropos.1 Wed Feb 15 23:53:13 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: apropos.1,v 1.2 2012/02/10 16:57:44 njoly Exp $ +.\" $NetBSD: apropos.1,v 1.3 2012/02/15 23:53:13 joerg Exp $ .\" .\" Copyright (c) 2011 Abhinav Upadhyay .\" All rights reserved. @@ -29,7 +29,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 6, 2012 +.Dd February 15, 2012 .Dt APROPOS 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Op Fl 123456789Ccp .Op Fl n Ar Number of results .Op Fl S Ar machine +.Op Fl s Ar section .Ar query .Sh DESCRIPTION The @@ -61,6 +62,8 @@ By default .Nm will only display the top 10 matches in the output. .Pp +Quotes are optional for specifying multiword queries. +.Pp It supports the following options: .Bl -tag -width indent .It Fl 1 @@ -91,9 +94,16 @@ The default limit is 10. .It Fl p Display all matching results and pipe them through a pager (defaulting to .Xr more 1 ) . -.It Fl S +.It Fl S Ar machine Limit the search to the pages for the specified machine architecture. By default pages for all architectures are shown in the search results. +.It Fl s Ar section +Restrict the search to the specified section of the manual. +By default, pages from all section are shown. +This option is for backwards compatibility with the classic version of apropos, +using it is equivalent to using the +.Op 123456789 +options directly. .El .Sh FILES .Bl -hang -width -compact Index: src/usr.sbin/makemandb/apropos.c diff -u src/usr.sbin/makemandb/apropos.c:1.4 src/usr.sbin/makemandb/apropos.c:1.5 --- src/usr.sbin/makemandb/apropos.c:1.4 Tue Feb 7 23:03:34 2012 +++ src/usr.sbin/makemandb/apropos.c Wed Feb 15 23:53:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: apropos.c,v 1.4 2012/02/07 23:03:34 joerg Exp $ */ +/* $NetBSD: apropos.c,v 1.5 2012/02/15 23:53:13 joerg Exp $ */ /*- * Copyright (c) 2011 Abhinav Upadhyay * All rights reserved. @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: apropos.c,v 1.4 2012/02/07 23:03:34 joerg Exp $"); +__RCSID("$NetBSD: apropos.c,v 1.5 2012/02/15 23:53:13 joerg Exp $"); #include #include @@ -76,6 +76,7 @@ main(int argc, char *argv[]) char *errmsg = NULL; char *str; int ch, rc = 0; + int s; callback_data cbdata; cbdata.out = stdout; // the default output stream cbdata.count = 0; @@ -92,7 +93,7 @@ main(int argc, char *argv[]) * index element in sec_nums is set to the string representing that * section number. */ - while ((ch = getopt(argc, argv, "123456789Ccn:pS:")) != -1) { + while ((ch = getopt(argc, argv, "123456789Ccn:pS:s:")) != -1) { switch (ch) { case '1': case '2': @@ -121,6 +122,12 @@ main(int argc, char *argv[]) case 'S': aflags.machine = optarg; break; + case 's': + s = atoi(optarg); + if (s < 1 || s > 9) +errx(EXIT_FAILURE, "Invalid section"); + aflags.sec_nums[s - 1] = 1; + break; case '?': default: usage(); @@ -189,8 +196,8 @@ main(int argc, char *argv[]) if (cbdata.count == 0) { warnx("No relevant results obtained.\n" - "Please make sure that you spelled all the terms correctly\n" - "Or try using better keywords."); + "Please make sure that you spelled all the terms correctly " + "or try using better keywords."); } return 0; }
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: riz Date: Wed Feb 15 23:46:47 UTC 2012 Modified Files: src/doc [netbsd-6]: LAST_MINUTE Added Files: src/doc [netbsd-6]: CHANGES-6.0 Log Message: Create CHANGES-6.0 and clear out LAST_MINUTE. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/doc/CHANGES-6.0 cvs rdiff -u -r1.2 -r1.2.40.1 src/doc/LAST_MINUTE Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/LAST_MINUTE diff -u src/doc/LAST_MINUTE:1.2 src/doc/LAST_MINUTE:1.2.40.1 --- src/doc/LAST_MINUTE:1.2 Mon Sep 23 07:52:18 2002 +++ src/doc/LAST_MINUTE Wed Feb 15 23:46:47 2012 @@ -1,7 +1,7 @@ -# $NetBSD: LAST_MINUTE,v 1.2 2002/09/23 07:52:18 lukem Exp $ +# $NetBSD: LAST_MINUTE,v 1.2.40.1 2012/02/15 23:46:47 riz Exp $ -This file contains important information on the NetBSD XXX.XXX release that +This file contains important information on the NetBSD 6.0 release that did not make it into the main documentation. [all] - Nothing pertinent; this is NetBSD-current... + Nothing pertinent Added files: Index: src/doc/CHANGES-6.0 diff -u /dev/null src/doc/CHANGES-6.0:1.1.2.1 --- /dev/null Wed Feb 15 23:46:47 2012 +++ src/doc/CHANGES-6.0 Wed Feb 15 23:46:47 2012 @@ -0,0 +1,10 @@ +# $NetBSD: CHANGES-6.0,v 1.1.2.1 2012/02/15 23:46:47 riz Exp $ + +A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012 +until the 6.0 release: + +gnu/usr.bin/groff/tmac/mdoc.local patched by hand +sys/sys/param.h patched by hand + + Welcome to 6.0_BETA! +
CVS commit: [netbsd-6] src
Module Name:src Committed By: riz Date: Wed Feb 15 23:45:50 UTC 2012 Modified Files: src/gnu/usr.bin/groff/tmac [netbsd-6]: mdoc.local src/sys/sys [netbsd-6]: param.h Log Message: Welcome to 6.0_BETA! To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.66.2.1 src/gnu/usr.bin/groff/tmac/mdoc.local cvs rdiff -u -r1.408 -r1.408.2.1 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/usr.bin/groff/tmac/mdoc.local diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.66 src/gnu/usr.bin/groff/tmac/mdoc.local:1.66.2.1 --- src/gnu/usr.bin/groff/tmac/mdoc.local:1.66 Wed Jan 25 22:22:20 2012 +++ src/gnu/usr.bin/groff/tmac/mdoc.local Wed Feb 15 23:45:50 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: mdoc.local,v 1.66 2012/01/25 22:22:20 dholland Exp $ +.\" $NetBSD: mdoc.local,v 1.66.2.1 2012/02/15 23:45:50 riz Exp $ .\" .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -44,9 +44,9 @@ .as doc-str-St--ieee1275-94 " (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq]) . .\" Default .Os value -.ds doc-operating-system NetBSD\~5.0 +.ds doc-operating-system NetBSD\~6.0 .\" Default footer operating system value -.ds doc-default-operating-system NetBSD\~5.0 +.ds doc-default-operating-system NetBSD\~6.0 .\" Other known versions, not yet in groff distribution .ds doc-operating-system-NetBSD-1.3.3 1.3.3 .ds doc-operating-system-NetBSD-1.6.3 1.6.3 Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.408 src/sys/sys/param.h:1.408.2.1 --- src/sys/sys/param.h:1.408 Sat Feb 11 23:19:11 2012 +++ src/sys/sys/param.h Wed Feb 15 23:45:50 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.408 2012/02/11 23:19:11 martin Exp $ */ +/* $NetBSD: param.h,v 1.408.2.1 2012/02/15 23:45:50 riz Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -63,7 +63,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 599006500 /* NetBSD 5.99.65 */ +#define __NetBSD_Version__ 6 /* NetBSD 6.0_BETA */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: joerg Date: Wed Feb 15 23:36:10 UTC 2012 Modified Files: src/usr.sbin/makemandb: makemandb.c Log Message: Also handle hyphen replacement if it was used as plain input and no backslash sequence was used at all in the line. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/makemandb/makemandb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/makemandb/makemandb.c diff -u src/usr.sbin/makemandb/makemandb.c:1.3 src/usr.sbin/makemandb/makemandb.c:1.4 --- src/usr.sbin/makemandb/makemandb.c:1.3 Wed Feb 15 23:35:00 2012 +++ src/usr.sbin/makemandb/makemandb.c Wed Feb 15 23:36:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: makemandb.c,v 1.3 2012/02/15 23:35:00 joerg Exp $ */ +/* $NetBSD: makemandb.c,v 1.4 2012/02/15 23:36:10 joerg Exp $ */ /* * Copyright (c) 2011 Abhinav Upadhyay * Copyright (c) 2011 Kristaps Dzonsons @@ -17,7 +17,7 @@ */ #include -__RCSID("$NetBSD: makemandb.c,v 1.3 2012/02/15 23:35:00 joerg Exp $"); +__RCSID("$NetBSD: makemandb.c,v 1.4 2012/02/15 23:36:10 joerg Exp $"); #include #include @@ -1846,6 +1846,14 @@ free_secbuffs(mandb_rec *rec) free(rec->errors.data); } +static void +replace_hyph(char *str) +{ + char *iter = str; + while ((iter = strchr(iter, ASCII_HYPH)) != NULL) + *iter = '-'; +} + static char * parse_escape(const char *str) { @@ -1857,8 +1865,11 @@ parse_escape(const char *str) last_backslash = str; backslash = strchr(str, '\\'); - if (backslash == NULL) - return estrdup(str); + if (backslash == NULL) { + result = estrdup(str); + replace_hyph(result); + return result; + } result = emalloc(strlen(str) + 1); iter = result; @@ -1882,9 +1893,8 @@ parse_escape(const char *str) } while (backslash != NULL); if (last_backslash != NULL) strcpy(iter, last_backslash); - iter = result; - while ((iter = strchr(iter, ASCII_HYPH)) != NULL) - *iter = '-'; + + replace_hyph(result); return result; }
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: joerg Date: Wed Feb 15 23:35:00 UTC 2012 Modified Files: src/usr.sbin/makemandb: makemandb.c Log Message: Be a bit more friendly to man pages using the roff .so command by changing the current directory to the parent of the man -p entry, e.g. /usr/share/man for /usr/share/man1. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/makemandb/makemandb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/makemandb/makemandb.c diff -u src/usr.sbin/makemandb/makemandb.c:1.2 src/usr.sbin/makemandb/makemandb.c:1.3 --- src/usr.sbin/makemandb/makemandb.c:1.2 Tue Feb 7 19:17:16 2012 +++ src/usr.sbin/makemandb/makemandb.c Wed Feb 15 23:35:00 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: makemandb.c,v 1.2 2012/02/07 19:17:16 joerg Exp $ */ +/* $NetBSD: makemandb.c,v 1.3 2012/02/15 23:35:00 joerg Exp $ */ /* * Copyright (c) 2011 Abhinav Upadhyay * Copyright (c) 2011 Kristaps Dzonsons @@ -17,7 +17,7 @@ */ #include -__RCSID("$NetBSD: makemandb.c,v 1.2 2012/02/07 19:17:16 joerg Exp $"); +__RCSID("$NetBSD: makemandb.c,v 1.3 2012/02/15 23:35:00 joerg Exp $"); #include #include @@ -26,6 +26,7 @@ __RCSID("$NetBSD: makemandb.c,v 1.2 2012 #include #include #include +#include #include #include #include @@ -291,7 +292,7 @@ main(int argc, char *argv[]) { FILE *file; const char *sqlstr, *manconf = NULL; - char *line, *command; + char *line, *command, *parent; char *errmsg; int ch; struct mparse *mp; @@ -397,6 +398,9 @@ main(int argc, char *argv[]) while ((len = getline(&line, &linesize, file)) != -1) { /* Replace the new line character at the end of string with '\0' */ line[len - 1] = '\0'; + parent = estrdup(line); + chdir(dirname(parent)); + free(parent); /* Traverse the man page directories and parse the pages */ traversedir(line, db, mp); }
CVS commit: src
Module Name:src Committed By: joerg Date: Wed Feb 15 23:32:27 UTC 2012 Modified Files: src: UPDATING Log Message: Extend entry to makemandb permission issue. To generate a diff of this commit: cvs rdiff -u -r1.234 -r1.235 src/UPDATING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.234 src/UPDATING:1.235 --- src/UPDATING:1.234 Thu Feb 9 21:49:31 2012 +++ src/UPDATING Wed Feb 15 23:32:27 2012 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.234 2012/02/09 21:49:31 spz Exp $ +$NetBSD: UPDATING,v 1.235 2012/02/15 23:32:27 joerg Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -16,9 +16,12 @@ See also: BUILDING, build.sh, Makefile. Recent changes: ^^^ -20120207: +20120216: Default for MKCATPAGES changed to NO. Update builds will fail - unless DESTDIR is cleaned manually. + unless DESTDIR is cleaned manually. If you built between 20120207 + and 20120216, daily and weekly could have created an unreable + /var/db/man.db index for apropos. Running makemandb -f or + the next run of weekly will fix it. 20111227: If you built between 20111225 and 20111227 you need to remove
CVS commit: src/etc
Module Name:src Committed By: joerg Date: Wed Feb 15 23:30:11 UTC 2012 Modified Files: src/etc: daily weekly Log Message: Run makemandb with the normal 022 umask, not the restrictive 077. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/etc/daily cvs rdiff -u -r1.25 -r1.26 src/etc/weekly Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/daily diff -u src/etc/daily:1.80 src/etc/daily:1.81 --- src/etc/daily:1.80 Thu Feb 9 13:38:44 2012 +++ src/etc/daily Wed Feb 15 23:30:11 2012 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: daily,v 1.80 2012/02/09 13:38:44 joerg Exp $ +# $NetBSD: daily,v 1.81 2012/02/15 23:30:11 joerg Exp $ # @(#)daily 8.2 (Berkeley) 1/25/94 # @@ -294,7 +294,7 @@ if checkyesno run_makemandb; then if [ -f /etc/man.conf -a -x /usr/sbin/makemandb ]; then echo "" echo "Updating man page index:" - nice -n 5 /usr/sbin/makemandb + (umask 022; nice -n 5 /usr/sbin/makemandb) fi fi Index: src/etc/weekly diff -u src/etc/weekly:1.25 src/etc/weekly:1.26 --- src/etc/weekly:1.25 Tue Feb 7 19:13:30 2012 +++ src/etc/weekly Wed Feb 15 23:30:11 2012 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: weekly,v 1.25 2012/02/07 19:13:30 joerg Exp $ +# $NetBSD: weekly,v 1.26 2012/02/15 23:30:11 joerg Exp $ # from: @(#)weekly 8.2 (Berkeley) 1/2/94 # @@ -94,7 +94,7 @@ if checkyesno rebuild_mandb; then echo "" if [ -f /etc/man.conf -a -x /usr/sbin/makemandb ]; then echo "Rebuilding man page index:" - nice -n 5 /usr/sbin/makemandb -f + (umask 022; nice -n 5 /usr/sbin/makemandb -f) else echo "Not rebuilding man page index" fi
CVS commit: src/gnu/usr.bin/groff/tmac
Module Name:src Committed By: riz Date: Wed Feb 15 23:06:20 UTC 2012 Modified Files: src/gnu/usr.bin/groff/tmac: mdoc.local Log Message: Add NetBSD 7.0, and make the default 6.0. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/gnu/usr.bin/groff/tmac/mdoc.local Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/usr.bin/groff/tmac/mdoc.local diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.66 src/gnu/usr.bin/groff/tmac/mdoc.local:1.67 --- src/gnu/usr.bin/groff/tmac/mdoc.local:1.66 Wed Jan 25 22:22:20 2012 +++ src/gnu/usr.bin/groff/tmac/mdoc.local Wed Feb 15 23:06:20 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: mdoc.local,v 1.66 2012/01/25 22:22:20 dholland Exp $ +.\" $NetBSD: mdoc.local,v 1.67 2012/02/15 23:06:20 riz Exp $ .\" .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -44,9 +44,9 @@ .as doc-str-St--ieee1275-94 " (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq]) . .\" Default .Os value -.ds doc-operating-system NetBSD\~5.0 +.ds doc-operating-system NetBSD\~6.0 .\" Default footer operating system value -.ds doc-default-operating-system NetBSD\~5.0 +.ds doc-default-operating-system NetBSD\~6.0 .\" Other known versions, not yet in groff distribution .ds doc-operating-system-NetBSD-1.3.3 1.3.3 .ds doc-operating-system-NetBSD-1.6.3 1.6.3 @@ -59,6 +59,7 @@ .ds doc-operating-system-NetBSD-5.05.0 .ds doc-operating-system-NetBSD-5.15.1 .ds doc-operating-system-NetBSD-6.06.0 +.ds doc-operating-system-NetBSD-7.07.0 .ds doc-operating-system-FreeBSD-4.11 4.11 .ds doc-operating-system-FreeBSD-5.4 5.4 .ds doc-operating-system-FreeBSD-5.5 5.5
CVS commit: src/sys/sys
Module Name:src Committed By: riz Date: Wed Feb 15 23:05:02 UTC 2012 Modified Files: src/sys/sys: param.h Log Message: Welcome to 6.99.1. To generate a diff of this commit: cvs rdiff -u -r1.408 -r1.409 src/sys/sys/param.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/param.h diff -u src/sys/sys/param.h:1.408 src/sys/sys/param.h:1.409 --- src/sys/sys/param.h:1.408 Sat Feb 11 23:19:11 2012 +++ src/sys/sys/param.h Wed Feb 15 23:05:02 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.408 2012/02/11 23:19:11 martin Exp $ */ +/* $NetBSD: param.h,v 1.409 2012/02/15 23:05:02 riz Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -63,7 +63,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 599006500 /* NetBSD 5.99.65 */ +#define __NetBSD_Version__ 699000100 /* NetBSD 6.99.1 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: [matt-nb5-mips64] src/usr.bin/mkubootimage
Module Name:src Committed By: matt Date: Wed Feb 15 20:49:14 UTC 2012 Modified Files: src/usr.bin/mkubootimage [matt-nb5-mips64]: mkubootimage.c Log Message: Let address/entry be 64bit if they are just sign-extended 32-bit values. To generate a diff of this commit: cvs rdiff -u -r1.6.2.2 -r1.6.2.3 src/usr.bin/mkubootimage/mkubootimage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/mkubootimage/mkubootimage.c diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.6.2.2 src/usr.bin/mkubootimage/mkubootimage.c:1.6.2.3 --- src/usr.bin/mkubootimage/mkubootimage.c:1.6.2.2 Fri May 20 15:05:11 2011 +++ src/usr.bin/mkubootimage/mkubootimage.c Wed Feb 15 20:49:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mkubootimage.c,v 1.6.2.2 2011/05/20 15:05:11 matt Exp $ */ +/* $NetBSD: mkubootimage.c,v 1.6.2.3 2012/02/15 20:49:14 matt Exp $ */ /*- * Copyright (c) 2010 Jared D. McNeill @@ -30,7 +30,7 @@ #endif #include -__RCSID("$NetBSD: mkubootimage.c,v 1.6.2.2 2011/05/20 15:05:11 matt Exp $"); +__RCSID("$NetBSD: mkubootimage.c,v 1.6.2.3 2012/02/15 20:49:14 matt Exp $"); #include #include @@ -262,7 +262,7 @@ main(int argc, char *argv[]) char *ep; int kernel_fd, image_fd; int ch; - unsigned long num; + unsigned long long num; while ((ch = getopt(argc, argv, "A:C:O:T:a:e:hn:")) != -1) { switch (ch) { @@ -280,17 +280,19 @@ main(int argc, char *argv[]) break; case 'a': /* addr */ errno = 0; - num = strtoul(optarg, &ep, 0); + num = strtoull(optarg, &ep, 0); if (*ep != '\0' || (errno == ERANGE && - (num == ULONG_MAX || num == 0))) + (num == ULLONG_MAX || num == 0)) || + (num != (int32_t)num && num != (uint32_t)num)) errx(1, "illegal number -- %s", optarg); image_loadaddr = (uint32_t)num; break; case 'e': /* ep */ errno = 0; - num = strtoul(optarg, &ep, 0); + num = strtoull(optarg, &ep, 0); if (*ep != '\0' || (errno == ERANGE && - (num == ULONG_MAX || num == 0))) + (num == ULLONG_MAX || num == 0)) || + (num != (int32_t)num && num != (uint32_t)num)) errx(1, "illegal number -- %s", optarg); image_entrypoint = (uint32_t)num; break;
CVS commit: src
Module Name:src Committed By: riz Date: Wed Feb 15 17:55:29 UTC 2012 Modified Files: src/dist/ipf: HISTORY bpf-ipf.h bpf_filter.c ip_fil.c ip_fil_compat.c ip_htable.c ip_htable.h ip_irc_pxy.c ip_lookup.c ip_lookup.h ip_pool.c ip_pool.h ip_pptp_pxy.c ip_rpcb_pxy.c ip_scan.c ip_scan.h ip_sync.c ip_sync.h ipf.h ipmon.h ipt.h kmem.h md5.c md5.h mln_rule.c opts.h pcap-ipf.h radix_ipf.h snoop.h todo src/dist/ipf/etc: protocols services src/dist/ipf/iplang: iplang.h iplang.tst iplang_l.l iplang_y.y src/dist/ipf/ipsd: ipsd.c ipsdr.c linux.h sbpf.c sdlpi.c slinux.c snit.c src/dist/ipf/ipsend: 44arp.c arp.c dlcommon.c ip.c ipresend.c ipsend.c ipsopt.c iptest.c iptests.c larp.c linux.h lsock.c resend.c sbpf.c sdlpi.c slinux.c snit.c sock.c tcpip.h src/dist/ipf/l4check: l4check.c src/dist/ipf/lib: addicmp.c addipopt.c alist_free.c alist_new.c bcopywrap.c binprint.c buildopts.c checkrev.c count4bits.c count6bits.c debug.c facpri.c facpri.h fill6bits.c flags.c gethost.c getifname.c getnattype.c getport.c getportproto.c getproto.c getsumd.c hostname.c icmpcode.c inet_addr.c initparse.c ionames.c ipf_dotuning.c ipft_ef.c ipft_hx.c ipft_pc.c ipft_sn.c ipft_td.c ipft_tx.c ipoptsec.c kmem.c kmem.h kmemcpywrap.c kvatoname.c load_file.c load_hash.c load_hashnode.c load_http.c load_pool.c load_poolnode.c load_url.c mutex_emul.c nametokva.c nat_setgroupmap.c ntomask.c optname.c optprint.c optprintv6.c optvalue.c portname.c print_toif.c printactivenat.c printaps.c printbuf.c printfr.c printfraginfo.c printhash.c printhash_live.c printhashdata.c printhashnode.c printhostmap.c printhostmask.c printifname.c printip.c printlog.c printmask.c printnat.c printpacket.c printpacket6.c printpool.c printpool_live.c printpooldata.c printpoolnode.c printportcmp.c printproto.c printsbuf.c printstate.c printtqtable.c printtunable.c remove_hash.c remove_hashnode.c remove_pool.c remove_poolnode.c resetlexer.c rwlock_emul.c tcp_flags.c tcpflags.c v6ionames.c v6optvalue.c var.c verbose.c src/dist/ipf/man: ipf.5 ipfilter.4.mandoc ipmon.5 ipnat.5 ippool.5 ippool.8 src/dist/ipf/perl: Ipfanaly.pl Isbgraph Services ipfmeta.pl logfilter.pl src/dist/ipf/rules: BASIC_1.FW BASIC_2.FW firewall ipmon.conf server src/dist/ipf/samples: proxy.c relay.c src/dist/ipf/test: bpftest iptest ptest test.format vfycksum.pl src/dist/ipf/test/expected: f18 i14 i17 i19.dist i20 in5 in6 ip1 ip2 ipv6.6 n10 n11 n12 n13 n14 n16 n17 n18 n8 n9 ni10 ni11 ni12 ni19 ni20 ni21 ni23 ni6 p1 p2 p3 p5 src/dist/ipf/test/input: ipv6.6 n10 n12 n16 n17 n8 n9 ni10 ni11 ni12 ni13 ni14 ni15 ni16 ni19 ni20 ni7 ni8 ni9 src/dist/ipf/test/regress: i14 i17 i18 i21 ipv6.5 n18 ni13.nat ni14.nat p1.pool p3.ipf src/dist/ipf/tools: BNF.ipf ipf.c ipf_y.y ipfcomp.c ipfs.c ipfstat.c ipftest.c ipmon.c ipmon_y.y ipnat.c ipnat_y.y ippool.c ippool_y.y ipscan_y.y ipsyncm.c ipsyncs.c lex_var.h lexer.c lexer.h src/dist/pf/usr.sbin/ftp-proxy: ipf.c src/distrib/sets/lists/comp: mi src/distrib/sets/lists/tests: mi src/regress/sys/kern/ipf/expected: n18 src/regress/sys/kern/ipf/regress: n18 src/sys/dist/ipf/netinet: fil.c ip_auth.c ip_auth.h ip_compat.h ip_fil.h ip_fil_compat.c ip_fil_netbsd.c ip_frag.c ip_frag.h ip_ftp_pxy.c ip_h323_pxy.c ip_htable.c ip_htable.h ip_ipsec_pxy.c ip_irc_pxy.c ip_log.c ip_lookup.c ip_lookup.h ip_nat.c ip_nat.h ip_netbios_pxy.c ip_pool.c ip_pool.h ip_pptp_pxy.c ip_proxy.c ip_proxy.h ip_raudio_pxy.c ip_rcmd_pxy.c ip_rpcb_pxy.c ip_scan.c ip_scan.h ip_state.c ip_state.h ip_sync.c ip_sync.h ipl.h src/sys/netinet: Makefile files.ipfilter src/tests/ipf: t_filter_exec.sh t_filter_parse.sh t_nat_exec.sh t_nat_ipf_exec.sh t_nat_parse.sh t_pools.sh src/tests/ipf/expected: Makefile f11 f13 f18 i1 i10 i11 i12 i14 i17 i19.dist i2 i20 i3 i4 i5 i6 i7 i8 i9 in1 in2 in3 in5 in6 ip1 ip2 ipv6.6 l1 l1.b n1 n10 n11 n12 n13 n14 n16 n17 n2 n3 n4 n5 n6 n7 n8 n9 ni10 ni11 ni12 ni19 ni2 ni20 ni21 ni23 ni5 ni6 p1 p2 p3 p5 src/tests/ipf/input: Makefile f13 ipv6.1 ipv6.6 n10 n12 n16 n17 n8 n9 ni1 ni10 ni11 ni12 ni13 ni14 ni15 ni16 ni19 ni2 ni20 ni3 ni4 ni5 ni7 ni8 ni9 src/tests/ipf/regress: Makefile f13 i11 i12 i14 i17 i18 i2 i21 i7 i8 in2 ipv6.5 ipv6.6 ni13.nat ni14.nat p1.pool p3.ipf src/usr.sbin/ipf/ipftest: Makefile
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Wed Feb 15 17:00:54 UTC 2012 Added Files: src/sys/arch/evbmips/conf [matt-nb5-mips64]: XLSATX32.MP Log Message: Add a N32 MP config. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/evbmips/conf/XLSATX32.MP Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/evbmips/conf/XLSATX32.MP diff -u /dev/null src/sys/arch/evbmips/conf/XLSATX32.MP:1.1.2.1 --- /dev/null Wed Feb 15 17:00:54 2012 +++ src/sys/arch/evbmips/conf/XLSATX32.MP Wed Feb 15 17:00:54 2012 @@ -0,0 +1,8 @@ +# XLSATX64.MP,v 1.1.2.1 2010/01/24 05:27:47 cliff Exp +# +include "arch/evbmips/conf/XLSATX32" + +options MULTIPROCESSOR +options LOCKDEBUG + +pseudo-device lockstat
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: tsutsui Date: Wed Feb 15 16:30:29 UTC 2012 Modified Files: src/sys/arch/x86/pci: pci_machdep.c Log Message: Add VIA VX900 host bridge to a buggy PCI mode 1 quirk table. PR/46018 Ok releng@ To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/x86/pci/pci_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/pci_machdep.c diff -u src/sys/arch/x86/pci/pci_machdep.c:1.53 src/sys/arch/x86/pci/pci_machdep.c:1.54 --- src/sys/arch/x86/pci/pci_machdep.c:1.53 Fri Nov 18 22:18:08 2011 +++ src/sys/arch/x86/pci/pci_machdep.c Wed Feb 15 16:30:29 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.53 2011/11/18 22:18:08 jmcneill Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.54 2012/02/15 16:30:29 tsutsui Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.53 2011/11/18 22:18:08 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.54 2012/02/15 16:30:29 tsutsui Exp $"); #include #include @@ -197,6 +197,8 @@ struct { _qe(0, 0, 0, PCI_VENDOR_SIS, PCI_PRODUCT_SIS_740), /* SIS 741 */ _qe(0, 0, 0, PCI_VENDOR_SIS, PCI_PRODUCT_SIS_741), + /* VIA Technologies VX900 */ + _qe(0, 0, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VX900_HB), {0, 0x} /* patchable */ }; #undef _m1tag
CVS commit: src/sys/dev/pci
Module Name:src Committed By: tsutsui Date: Wed Feb 15 16:27:26 UTC 2012 Modified Files: src/sys/dev/pci: pcidevs.h pcidevs_data.h Log Message: Regen from pcidevs rev 1.1102: > Add VIA VX900 Host Bridge, to handle its quirk. PR/46018 > Ok releng@ To generate a diff of this commit: cvs rdiff -u -r1.1096 -r1.1097 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1095 -r1.1096 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs.h diff -u src/sys/dev/pci/pcidevs.h:1.1096 src/sys/dev/pci/pcidevs.h:1.1097 --- src/sys/dev/pci/pcidevs.h:1.1096 Tue Oct 18 23:23:20 2011 +++ src/sys/dev/pci/pcidevs.h Wed Feb 15 16:27:23 2012 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs.h,v 1.1096 2011/10/18 23:23:20 jmcneill Exp $ */ +/* $NetBSD: pcidevs.h,v 1.1097 2012/02/15 16:27:23 tsutsui Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.1101 2011/10/18 23:23:07 jmcneill Exp + * NetBSD: pcidevs,v 1.1102 2012/02/15 16:26:00 tsutsui Exp */ /* @@ -4596,6 +4596,7 @@ #define PCI_PRODUCT_VIATECH_VT8363_HB 0x0305 /* VT8363 (Apollo KT133) Host Bridge */ #define PCI_PRODUCT_VIATECH_VT3351_HB_0351 0x0351 /* VT3351 Host Bridge */ #define PCI_PRODUCT_VIATECH_VT8371_HB 0x0391 /* VT8371 (Apollo KX133) Host Bridge */ +#define PCI_PRODUCT_VIATECH_VX900_HB 0x0410 /* VX900 Host Bridge */ #define PCI_PRODUCT_VIATECH_VT8501_MVP4 0x0501 /* VT8501 (Apollo MVP4) Host Bridge */ #define PCI_PRODUCT_VIATECH_VT82C505 0x0505 /* VT82C505 (Pluto) */ #define PCI_PRODUCT_VIATECH_VT82C561 0x0561 /* VT82C561 */ Index: src/sys/dev/pci/pcidevs_data.h diff -u src/sys/dev/pci/pcidevs_data.h:1.1095 src/sys/dev/pci/pcidevs_data.h:1.1096 --- src/sys/dev/pci/pcidevs_data.h:1.1095 Tue Oct 18 23:23:20 2011 +++ src/sys/dev/pci/pcidevs_data.h Wed Feb 15 16:27:24 2012 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs_data.h,v 1.1095 2011/10/18 23:23:20 jmcneill Exp $ */ +/* $NetBSD: pcidevs_data.h,v 1.1096 2012/02/15 16:27:24 tsutsui Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.1101 2011/10/18 23:23:07 jmcneill Exp + * NetBSD: pcidevs,v 1.1102 2012/02/15 16:26:00 tsutsui Exp */ /* @@ -7450,194 +7450,196 @@ static const uint16_t pci_products[] = { 25995, 6649, 6259, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8371_HB, 26002, 25980, 26009, 6649, 6259, 0, + PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VX900_HB, + 26016, 6649, 6259, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8501_MVP4, - 26016, 25980, 26023, 6649, 6259, 0, + 26022, 25980, 26029, 6649, 6259, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C505, - 26029, 26038, 0, + 26035, 26044, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C561, - 26046, 0, + 26052, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C586A_IDE, - 26055, 6322, 6151, 0, + 26061, 6322, 6151, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C576, - 26065, 26074, 0, + 26071, 26080, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_CX700_IDE, - 26077, 6322, 6151, 0, + 26083, 6322, 6151, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C580VP, - 26083, 25980, 26092, 6547, 6259, 0, + 26089, 25980, 26098, 6547, 6259, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C586_ISA, - 26096, 6533, 6259, 0, + 26102, 6533, 6259, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8237A_SATA, - 26105, 692, 8052, 6151, 0, + 26111, 692, 8052, 6151, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C595, - 26113, 25980, 26122, 6547, 6259, 0, + 26119, 25980, 26128, 6547, 6259, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C596A, - 26127, 6533, 6259, 0, + 26133, 6533, 6259, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C597, - 26137, 25980, 26146, 6547, 6259, 0, + 26143, 25980, 26152, 6547, 6259, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C598PCI, - 26151, 25980, 26160, 6547, 6259, 0, + 26157, 25980, 26166, 6547, 6259, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8605PCI, - 26166, 25980, 26173, 26182, 6547, 6259, 0, + 26172, 25980, 26179, 26188, 6547, 6259, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C686A_ISA, - 26187, 6533, 6259, 0, + 26193, 6533, 6259, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C691, - 26197, 25980, 26206, 6547, 0, + 26203, 25980, 26212, 6547, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C693, - 26211, 25980, 6928, 26220, 6547, 0, + 26217, 25980, 6928, 26226, 6547, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT86C926, - 26226, 26235, 26242, 6151, 0, + 26232, 26241, 26248, 6151, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT82C570M, - 26255, 26265, 6547, 6259, 0, +
CVS commit: src/sys/dev/pci
Module Name:src Committed By: tsutsui Date: Wed Feb 15 16:26:00 UTC 2012 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add VIA VX900 Host Bridge, to handle its quirk. PR/46018 Ok releng@ To generate a diff of this commit: cvs rdiff -u -r1.1101 -r1.1102 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1101 src/sys/dev/pci/pcidevs:1.1102 --- src/sys/dev/pci/pcidevs:1.1101 Tue Oct 18 23:23:07 2011 +++ src/sys/dev/pci/pcidevs Wed Feb 15 16:26:00 2012 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1101 2011/10/18 23:23:07 jmcneill Exp $ +$NetBSD: pcidevs,v 1.1102 2012/02/15 16:26:00 tsutsui Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -4589,6 +4589,7 @@ product VIATECH K8HTB_0 0x0282 K8HTB Ho product VIATECH VT8363_HB 0x0305 VT8363 (Apollo KT133) Host Bridge product VIATECH VT3351_HB_0351 0x0351 VT3351 Host Bridge product VIATECH VT8371_HB 0x0391 VT8371 (Apollo KX133) Host Bridge +product VIATECH VX900_HB 0x0410 VX900 Host Bridge product VIATECH VT8501_MVP4 0x0501 VT8501 (Apollo MVP4) Host Bridge product VIATECH VT82C505 0x0505 VT82C505 (Pluto) product VIATECH VT82C561 0x0561 VT82C561
CVS commit: src/sys/netinet
Module Name:src Committed By: drochner Date: Wed Feb 15 16:11:23 UTC 2012 Modified Files: src/sys/netinet: ip_output.c Log Message: fix for IPSEC tunnel + NAT-T + esp_frag: Output packets larger than "esp_frag" are fragmented first and then reinjected into ip_output for encapsulation and transfer. The problem was that each packet got a new ip_id value assigned, so that fragments couldn't be matched by the receiver. Offset information was overwritten too. approved by releng To generate a diff of this commit: cvs rdiff -u -r1.212 -r1.213 src/sys/netinet/ip_output.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/ip_output.c diff -u src/sys/netinet/ip_output.c:1.212 src/sys/netinet/ip_output.c:1.213 --- src/sys/netinet/ip_output.c:1.212 Sat Dec 31 20:41:59 2011 +++ src/sys/netinet/ip_output.c Wed Feb 15 16:11:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_output.c,v 1.212 2011/12/31 20:41:59 christos Exp $ */ +/* $NetBSD: ip_output.c,v 1.213 2012/02/15 16:11:23 drochner Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.212 2011/12/31 20:41:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.213 2012/02/15 16:11:23 drochner Exp $"); #include "opt_pfil_hooks.h" #include "opt_inet.h" @@ -896,7 +896,7 @@ spd_done: */ if (natt_frag) { error = ip_output(m, opt, -ro, flags, imo, so, mtu_p); +ro, flags | IP_RAWOUTPUT | IP_NOIPNEWID, imo, so, mtu_p); } else #endif /* IPSEC_NAT_T */ {
CVS commit: othersrc/external/bsd/httpdev/dist
Module Name:othersrc Committed By: agc Date: Wed Feb 15 15:56:07 UTC 2012 Modified Files: othersrc/external/bsd/httpdev/dist: main.c Log Message: callers of targetop() check for the number of characters returned, so return the number of characters returned from targetop(). To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/httpdev/dist/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/httpdev/dist/main.c diff -u othersrc/external/bsd/httpdev/dist/main.c:1.1.1.1 othersrc/external/bsd/httpdev/dist/main.c:1.2 --- othersrc/external/bsd/httpdev/dist/main.c:1.1.1.1 Wed Feb 15 04:38:05 2012 +++ othersrc/external/bsd/httpdev/dist/main.c Wed Feb 15 15:56:07 2012 @@ -119,9 +119,9 @@ static int targetop(const char *uri, uint64_t offset, uint32_t length, char *buf, int writing) { if (writing) { - return http_post(buf, length, uri, offset, offset + length) == length; + return http_post(buf, length, uri, offset, offset + length); } else { - return http_get(buf, length, uri, offset, offset + length) == length; + return http_get(buf, length, uri, offset, offset + length); } }
CVS commit: src/lib/libc/include
Module Name:src Committed By: joerg Date: Wed Feb 15 15:49:46 UTC 2012 Modified Files: src/lib/libc/include: namespace.h Log Message: Make sure that membar_producer gets the proper namespace mangling for libc. To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/lib/libc/include/namespace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/include/namespace.h diff -u src/lib/libc/include/namespace.h:1.149 src/lib/libc/include/namespace.h:1.150 --- src/lib/libc/include/namespace.h:1.149 Mon Jul 4 07:54:38 2011 +++ src/lib/libc/include/namespace.h Wed Feb 15 15:49:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: namespace.h,v 1.149 2011/07/04 07:54:38 manu Exp $ */ +/* $NetBSD: namespace.h,v 1.150 2012/02/15 15:49:46 joerg Exp $ */ /*- * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -439,6 +439,7 @@ #define lockf _lockf #define lrand48 _lrand48 #define lseek _lseek +#define membar_producer _membar_producer #define mergesort _mergesort #define mi_vector_hash _mi_vector_hash #define mkstemp _mkstemp
CVS commit: src/sys/arch/usermode/usermode
Module Name:src Committed By: reinoud Date: Wed Feb 15 15:20:53 UTC 2012 Modified Files: src/sys/arch/usermode/usermode: trap.c Log Message: Prevent recursive IO signals. This prevents crashes when pieces of text are pasted in say an Xterm. Each char might create a SIGIO running out of stackspace very quickly! To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/arch/usermode/usermode/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/usermode/usermode/trap.c diff -u src/sys/arch/usermode/usermode/trap.c:1.62 src/sys/arch/usermode/usermode/trap.c:1.63 --- src/sys/arch/usermode/usermode/trap.c:1.62 Sun Jan 22 17:51:39 2012 +++ src/sys/arch/usermode/usermode/trap.c Wed Feb 15 15:20:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.62 2012/01/22 17:51:39 reinoud Exp $ */ +/* $NetBSD: trap.c,v 1.63 2012/02/15 15:20:53 reinoud Exp $ */ /*- * Copyright (c) 2011 Reinoud Zandijk @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.62 2012/01/22 17:51:39 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.63 2012/02/15 15:20:53 reinoud Exp $"); #include #include @@ -362,6 +362,11 @@ handle_signal(int sig, siginfo_t *info, thunk_sigemptyset(&jump_ucp.uc_sigmask); jump_ucp.uc_flags = _UC_STACK | _UC_CPU | _UC_SIGMASK; + + /* prevent recursive IO signals */ + if (sig == SIGIO) + thunk_sigaddset(&jump_ucp.uc_sigmask, SIGIO); + thunk_makecontext(&jump_ucp, (void (*)(void)) f, 3, (void *) from_userland, (void *) pc, (void *) va);
CVS commit: src/usr.sbin/postinstall
Module Name:src Committed By: joerg Date: Wed Feb 15 13:01:00 UTC 2012 Modified Files: src/usr.sbin/postinstall: postinstall Log Message: Clean up cat pages that are older than the corresponding man pages. Remove cat page directories that are empty. To generate a diff of this commit: cvs rdiff -u -r1.128 -r1.129 src/usr.sbin/postinstall/postinstall Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/postinstall/postinstall diff -u src/usr.sbin/postinstall/postinstall:1.128 src/usr.sbin/postinstall/postinstall:1.129 --- src/usr.sbin/postinstall/postinstall:1.128 Sat Dec 17 13:37:49 2011 +++ src/usr.sbin/postinstall/postinstall Wed Feb 15 13:01:00 2012 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall,v 1.128 2011/12/17 13:37:49 tsutsui Exp $ +# $NetBSD: postinstall,v 1.129 2012/02/15 13:01:00 joerg Exp $ # # Copyright (c) 2002-2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -1143,7 +1143,7 @@ do_rc() irdaattach iscsi_target isdnd isibootd \ kdc \ ldconfig local lpd lvm\ - mdnsd mixerctl mopd motd mountall mountcritlocal \ + makemandb mdnsd mixerctl mopd motd mountall mountcritlocal \ mountcritremote mountd moused mrouted \ named ndbootd network newsyslog nfsd nfslocking npf \ ntpd ntpdate \ @@ -1583,6 +1583,62 @@ do_atf() return ${failed} } +# +# catpages +# +obsolete_catpages() +{ + basedir="$2" + section="$3" + mandir="${basedir}/man${section}" + catdir="${basedir}/cat${section}" + test -d "$mandir" || return 0 + test -d "$catdir" || return 0 + (cd "$mandir" && find . -type f) | { + failed=0 + while read manpage; do + manpage="${manpage#./}" + case "$manpage" in + *.Z) + catname="$catdir/${manpage%.*.Z}.0" + ;; + *.gz) + catname="$catdir/${manpage%.*.gz}.0" + ;; + *) + catname="$catdir/${manpage%.*}.0" + ;; + esac + test -e "$catname" -a "$catname" -ot "$mandir/$manpage" || continue + if [ "$1" = "fix" ]; then + rm "$catname" + failed=$(( ${failed} + $? )) + echo "Removed obsolete cat page $catname" + else + echo "Obsolete cat page $catname" + failed=1 + fi + done + exit $failed + } +} + +additem catpages "remove outdated cat pages" +do_catpages() +{ + failed=0 + for manbase in /usr/share/man /usr/X11R6/man /usr/X11R7/man; do + for sec in 1 2 3 4 5 6 7 8 9; do + obsolete_catpages $1 ${DEST_DIR}${manbase} ${sec} + failed=$(( ${failed} + $? )) + if [ "$1" = "fix" ]; then +rmdir ${DEST_DIR}${manbase}/cat${sec}/* 2>/dev/null +rmdir ${DEST_DIR}${manbase}/cat${sec} 2>/dev/null + fi + done + done + return $failed +} # # obsolete
CVS commit: src/sys/arch/amigappc
Module Name:src Committed By: phx Date: Wed Feb 15 12:11:43 UTC 2012 Modified Files: src/sys/arch/amigappc/amigappc: machdep.c src/sys/arch/amigappc/conf: files.amigappc Log Message: Port amiga calls config_console() from machdep.c now, so we have to do the same. Otherwise no console is configured anymore. While being at it adapt files.amigappc to the latest changes in files.amiga. Ok by releng@. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/arch/amigappc/amigappc/machdep.c cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amigappc/conf/files.amigappc 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/amigappc/amigappc/machdep.c diff -u src/sys/arch/amigappc/amigappc/machdep.c:1.50 src/sys/arch/amigappc/amigappc/machdep.c:1.51 --- src/sys/arch/amigappc/amigappc/machdep.c:1.50 Thu Nov 24 03:35:56 2011 +++ src/sys/arch/amigappc/amigappc/machdep.c Wed Feb 15 12:11:42 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.50 2011/11/24 03:35:56 mrg Exp $ */ +/* $NetBSD: machdep.c,v 1.51 2012/02/15 12:11:42 phx Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,9 +32,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.50 2011/11/24 03:35:56 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.51 2012/02/15 12:11:42 phx Exp $"); #include +#include #include #include #include @@ -54,6 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include #include #include +#include #include #include #include @@ -642,10 +644,11 @@ void consinit(void) { + /* preconfigure graphics cards */ custom_chips_init(); - /* - ** Initialize the console before we print anything out. - */ + config_console(); + + /* Initialize the console before we print anything out. */ cninit(); } Index: src/sys/arch/amigappc/conf/files.amigappc diff -u src/sys/arch/amigappc/conf/files.amigappc:1.24 src/sys/arch/amigappc/conf/files.amigappc:1.25 --- src/sys/arch/amigappc/conf/files.amigappc:1.24 Fri Jan 14 12:54:39 2011 +++ src/sys/arch/amigappc/conf/files.amigappc Wed Feb 15 12:11:43 2012 @@ -1,4 +1,4 @@ -# $NetBSD: files.amigappc,v 1.24 2011/01/14 12:54:39 phx Exp $ +# $NetBSD: files.amigappc,v 1.25 2012/02/15 12:11:43 phx Exp $ # maxpartitions must be first item in files.${ARCH}.newconf maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL! @@ -33,8 +33,8 @@ defflagLEV6_DEFER defparam IOBZCLOCK -file dev/cons.cite | ser -file dev/cninit.cite | ser +file dev/cons.c +file dev/cninit.c file arch/amigappc/amigappc/amiga_init.c file arch/amigappc/amigappc/autoconf.c file arch/amigappc/amigappc/machdep.c @@ -149,11 +149,11 @@ file arch/amiga/dev/ite.c ite needs-fla file arch/amiga/dev/kbdmap.c ite file arch/amiga/dev/kf_custom.c kfont_custom file arch/amiga/dev/kf_iso8859_1_8x8.c kfont_cons_iso8859_1 & - ( ite | amidisplaycc ) + ( ite | wsdisplay ) file arch/amiga/dev/kf_iso8859_1_8x11.c kfont_cons_iso8859_1 & kfont_8x11 file arch/amiga/dev/kf_iso8859_2_8x8.c kfont_cons_iso8859_2 & - ( ite | amidisplaycc ) + ( ite | wsdisplay ) file arch/amiga/dev/kf_iso8859_2_8x11.c kfont_cons_iso8859_2 & kfont_8x11
CVS commit: src/sys/kern
Module Name:src Committed By: martin Date: Wed Feb 15 11:59:30 UTC 2012 Modified Files: src/sys/kern: kern_exit.c Log Message: Fix fallout from the new tests exercising all error paths: do not deactivate the pmap of a vmspace-less child of a posix spawn operation that never made it to userland. To generate a diff of this commit: cvs rdiff -u -r1.235 -r1.236 src/sys/kern/kern_exit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_exit.c diff -u src/sys/kern/kern_exit.c:1.235 src/sys/kern/kern_exit.c:1.236 --- src/sys/kern/kern_exit.c:1.235 Sun Oct 9 20:30:37 2011 +++ src/sys/kern/kern_exit.c Wed Feb 15 11:59:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exit.c,v 1.235 2011/10/09 20:30:37 chs Exp $ */ +/* $NetBSD: kern_exit.c,v 1.236 2012/02/15 11:59:30 martin Exp $ */ /*- * Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.235 2011/10/09 20:30:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.236 2012/02/15 11:59:30 martin Exp $"); #include "opt_ktrace.h" #include "opt_perfctrs.h" @@ -580,7 +580,12 @@ exit1(struct lwp *l, int rv) * case these resources are in the PCB. */ cpu_lwp_free(l, 1); - pmap_deactivate(l); + /* + * A new child of a posix_spawn operation might never have been + * to userland - no pmap deactivation is needed in this case + */ + if (__predict_true(l->l_proc->p_vmspace != NULL)) + pmap_deactivate(l); /* This process no longer needs to hold the kernel lock. */ #ifdef notyet
CVS commit: othersrc/external/bsd/httpdev/dist
Module Name:othersrc Committed By: wiz Date: Wed Feb 15 09:03:38 UTC 2012 Modified Files: othersrc/external/bsd/httpdev/dist: httpdev.8 Log Message: Remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/httpdev/dist/httpdev.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/httpdev/dist/httpdev.8 diff -u othersrc/external/bsd/httpdev/dist/httpdev.8:1.1.1.1 othersrc/external/bsd/httpdev/dist/httpdev.8:1.2 --- othersrc/external/bsd/httpdev/dist/httpdev.8:1.1.1.1 Wed Feb 15 04:38:05 2012 +++ othersrc/external/bsd/httpdev/dist/httpdev.8 Wed Feb 15 09:03:38 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: httpdev.8,v 1.1.1.1 2012/02/15 04:38:05 agc Exp $ +.\" $NetBSD: httpdev.8,v 1.2 2012/02/15 09:03:38 wiz Exp $ .\" .\" Copyright (c) 2012 Alistair Crooks .\" All rights reserved. @@ -75,7 +75,7 @@ type, host name, optional port, and full The second argument is the local mount point for the storage to be presented. The -.Fl n Ar name +.Fl n Ar name argument allows the name of the subdirectory of the mount point to be specified. .Sh EXAMPLES .Bd -literal @@ -92,9 +92,9 @@ lrw-r--r-- 1 agc agc 14 Feb lrw-r--r-- 1 agc agc 16 Feb 14 05:51 targetname -\*[Gt] nyftp.netbsd.org lrw-r--r-- 1 agc agc6 Feb 14 05:51 vendor -\*[Gt] NetBSD lrw-r--r-- 1 agc agc 18 Feb 14 05:51 version -\*[Gt] bozohttpd-20100920 -# file /mnt/nyftp.netbsd.org/storage +# file /mnt/nyftp.netbsd.org/storage /mnt/nyftp.netbsd.org/storage: # ISO 9660 CD-ROM filesystem data 'NETBSD_59964' (bootable) -# vnconfig vnd0 /mnt/nyftp.netbsd.org/storage +# vnconfig vnd0 /mnt/nyftp.netbsd.org/storage # mount -rt cd9660 /dev/vnd0a /cdrom # ls -al /cdrom total 6467