CVS commit: src/external/gpl3/binutils/dist/bfd
Module Name:src Committed By: dogcow Date: Mon Sep 7 19:46:45 UTC 2020 Modified Files: src/external/gpl3/binutils/dist/bfd: Makefile.am Makefile.in Log Message: Fix `build.sh tools -j1` compilation, where bfd.h wasn't generated early enough. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/binutils/dist/bfd/Makefile.am cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/binutils/dist/bfd/Makefile.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/dist/bfd/Makefile.am diff -u src/external/gpl3/binutils/dist/bfd/Makefile.am:1.7 src/external/gpl3/binutils/dist/bfd/Makefile.am:1.8 --- src/external/gpl3/binutils/dist/bfd/Makefile.am:1.7 Fri Apr 3 23:48:45 2020 +++ src/external/gpl3/binutils/dist/bfd/Makefile.am Mon Sep 7 19:46:45 2020 @@ -363,6 +363,7 @@ BFD32_BACKENDS = \ i386bsd.lo \ i386lynx.lo \ i386msdos.lo \ + i386netbsd.lo \ mach-o.lo \ mach-o-i386.lo \ mach-o-arm.lo \ @@ -499,6 +500,7 @@ BFD32_BACKENDS_CFILES = \ i386bsd.c \ i386lynx.c \ i386msdos.c \ + i386netbsd.c \ mach-o.c \ mach-o-i386.c \ mach-o-arm.c \ Index: src/external/gpl3/binutils/dist/bfd/Makefile.in diff -u src/external/gpl3/binutils/dist/bfd/Makefile.in:1.8 src/external/gpl3/binutils/dist/bfd/Makefile.in:1.9 --- src/external/gpl3/binutils/dist/bfd/Makefile.in:1.8 Fri Apr 3 23:48:45 2020 +++ src/external/gpl3/binutils/dist/bfd/Makefile.in Mon Sep 7 19:46:45 2020 @@ -792,6 +792,7 @@ BFD32_BACKENDS = \ i386bsd.lo \ i386lynx.lo \ i386msdos.lo \ + i386netbsd.lo \ mach-o.lo \ mach-o-i386.lo \ mach-o-arm.lo \ @@ -930,6 +931,7 @@ BFD32_BACKENDS_CFILES = \ i386bsd.c \ i386lynx.c \ i386msdos.c \ + i386netbsd.c \ mach-o.c \ mach-o-i386.c \ mach-o-arm.c \ @@ -1537,6 +1539,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386bsd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386lynx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386msdos.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386netbsd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ihex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/irix-core.Plo@am__quote@
CVS commit: src/sys/kern
Module Name:src Committed By: dogcow Date: Tue Feb 11 06:09:48 UTC 2020 Modified Files: src/sys/kern: kern_lwp.c Log Message: fix compilation failure for arches without l_pcu_valid ok riastradh To generate a diff of this commit: cvs rdiff -u -r1.224 -r1.225 src/sys/kern/kern_lwp.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_lwp.c diff -u src/sys/kern/kern_lwp.c:1.224 src/sys/kern/kern_lwp.c:1.225 --- src/sys/kern/kern_lwp.c:1.224 Tue Feb 11 03:14:49 2020 +++ src/sys/kern/kern_lwp.c Tue Feb 11 06:09:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_lwp.c,v 1.224 2020/02/11 03:14:49 riastradh Exp $ */ +/* $NetBSD: kern_lwp.c,v 1.225 2020/02/11 06:09:48 dogcow Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2019, 2020 @@ -211,7 +211,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.224 2020/02/11 03:14:49 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.225 2020/02/11 06:09:48 dogcow Exp $"); #include "opt_ddb.h" #include "opt_lockdebug.h" @@ -890,7 +890,9 @@ lwp_create(lwp_t *l1, proc_t *p2, vaddr_ * the MD cpu_lwp_fork() can copy the saved state to the new LWP. */ pcu_save_all(l1); +#if PCU_UNIT_COUNT > 0 l2->l_pcu_valid = l1->l_pcu_valid; +#endif uvm_lwp_setuarea(l2, uaddr); uvm_lwp_fork(l1, l2, stack, stacksize, func, (arg != NULL) ? arg : l2);
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: dogcow Date: Mon Apr 29 02:49:35 UTC 2019 Modified Files: src/usr.sbin/acpitools/acpidump: acpi.c Log Message: acpica 20190405 changed some internal macros; update code to match To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/usr.sbin/acpitools/acpidump/acpi.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/acpitools/acpidump/acpi.c diff -u src/usr.sbin/acpitools/acpidump/acpi.c:1.44 src/usr.sbin/acpitools/acpidump/acpi.c:1.45 --- src/usr.sbin/acpitools/acpidump/acpi.c:1.44 Sat Feb 9 16:00:41 2019 +++ src/usr.sbin/acpitools/acpidump/acpi.c Mon Apr 29 02:49:35 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.44 2019/02/09 16:00:41 msaitoh Exp $ */ +/* $NetBSD: acpi.c,v 1.45 2019/04/29 02:49:35 dogcow Exp $ */ /*- * Copyright (c) 1998 Doug Rabson @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: acpi.c,v 1.44 2019/02/09 16:00:41 msaitoh Exp $"); +__RCSID("$NetBSD: acpi.c,v 1.45 2019/04/29 02:49:35 dogcow Exp $"); #include #include @@ -3855,7 +3855,7 @@ static void acpi_print_sdt(ACPI_TABLE_HEADER *sdp) { printf(" "); - acpi_print_string(sdp->Signature, ACPI_NAME_SIZE); + acpi_print_string(sdp->Signature, ACPI_NAMESEG_SIZE); printf(": Length=%d, Revision=%d, Checksum=%d", sdp->Length, sdp->Revision, sdp->Checksum); if (acpi_checksum(sdp, sdp->Length)) @@ -3866,7 +3866,7 @@ acpi_print_sdt(ACPI_TABLE_HEADER *sdp) acpi_print_string(sdp->OemTableId, ACPI_OEM_TABLE_ID_SIZE); printf(", OEM Revision=0x%x,\n", sdp->OemRevision); printf("\tCreator ID="); - acpi_print_string(sdp->AslCompilerId, ACPI_NAME_SIZE); + acpi_print_string(sdp->AslCompilerId, ACPI_NAMESEG_SIZE); printf(", Creator Revision=0x%x\n", sdp->AslCompilerRevision); }
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: dogcow Date: Fri May 2 23:49:11 UTC 2014 Modified Files: src/sys/arch/evbarm/conf: ADI_BRH_INSTALL CP3100_INSTALL GUMSTIX_INSTALL INTEGRATOR_INSTALL KUROBOX_PRO_INSTALL MV2120_INSTALL NETWALKER_INSTALL TEAMASA_NPWR_INSTALL TS7200_INSTALL TWINTAIL_INSTALL Log Message: as suggested by gimpy et al, no config the netbsd-device kernels. Reduces `build.sh release` by about a gig. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/ADI_BRH_INSTALL \ src/sys/arch/evbarm/conf/CP3100_INSTALL \ src/sys/arch/evbarm/conf/INTEGRATOR_INSTALL cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/GUMSTIX_INSTALL cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/KUROBOX_PRO_INSTALL \ src/sys/arch/evbarm/conf/MV2120_INSTALL \ src/sys/arch/evbarm/conf/NETWALKER_INSTALL \ src/sys/arch/evbarm/conf/TEAMASA_NPWR_INSTALL \ src/sys/arch/evbarm/conf/TS7200_INSTALL cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/TWINTAIL_INSTALL 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/evbarm/conf/ADI_BRH_INSTALL diff -u src/sys/arch/evbarm/conf/ADI_BRH_INSTALL:1.1 src/sys/arch/evbarm/conf/ADI_BRH_INSTALL:1.2 --- src/sys/arch/evbarm/conf/ADI_BRH_INSTALL:1.1 Tue Apr 8 20:49:01 2003 +++ src/sys/arch/evbarm/conf/ADI_BRH_INSTALL Fri May 2 23:49:10 2014 @@ -1,4 +1,4 @@ -# $NetBSD: ADI_BRH_INSTALL,v 1.1 2003/04/08 20:49:01 thorpej Exp $ +# $NetBSD: ADI_BRH_INSTALL,v 1.2 2014/05/02 23:49:10 dogcow Exp $ # # ADI_BRH_INSTALL -- BRH kernel with installation-sized # ramdisk @@ -6,3 +6,6 @@ include arch/evbarm/conf/ADI_BRH include arch/evbarm/conf/INSTALL +no config netbsd-fxp0 +no config netbsd-wd0 +no config netbsd-sd0 Index: src/sys/arch/evbarm/conf/CP3100_INSTALL diff -u src/sys/arch/evbarm/conf/CP3100_INSTALL:1.1 src/sys/arch/evbarm/conf/CP3100_INSTALL:1.2 --- src/sys/arch/evbarm/conf/CP3100_INSTALL:1.1 Thu Nov 9 00:28:37 2006 +++ src/sys/arch/evbarm/conf/CP3100_INSTALL Fri May 2 23:49:10 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CP3100_INSTALL,v 1.1 2006/11/09 00:28:37 scw Exp $ +# $NetBSD: CP3100_INSTALL,v 1.2 2014/05/02 23:49:10 dogcow Exp $ # # CP3100_INSTALL -- CP3100 kernel with installation-sized ramdisk # @@ -7,3 +7,6 @@ include arch/evbarm/conf/CP3100 include arch/evbarm/conf/INSTALL options BOOTHOWTO=RB_SINGLE +no config netbsd-wm0 +no config netbsd-wd0 +no config netbsd-sd0 Index: src/sys/arch/evbarm/conf/INTEGRATOR_INSTALL diff -u src/sys/arch/evbarm/conf/INTEGRATOR_INSTALL:1.1 src/sys/arch/evbarm/conf/INTEGRATOR_INSTALL:1.2 --- src/sys/arch/evbarm/conf/INTEGRATOR_INSTALL:1.1 Tue Apr 8 20:49:02 2003 +++ src/sys/arch/evbarm/conf/INTEGRATOR_INSTALL Fri May 2 23:49:10 2014 @@ -1,4 +1,4 @@ -# $NetBSD: INTEGRATOR_INSTALL,v 1.1 2003/04/08 20:49:02 thorpej Exp $ +# $NetBSD: INTEGRATOR_INSTALL,v 1.2 2014/05/02 23:49:10 dogcow Exp $ # # INTEGRATOR_INSTALL -- INTEGRATOR kernel with installation-sized # ramdisk @@ -6,3 +6,5 @@ include arch/evbarm/conf/INTEGRATOR include arch/evbarm/conf/INSTALL +no config netbsd-fxp0 +no config netbsd-sd0 Index: src/sys/arch/evbarm/conf/GUMSTIX_INSTALL diff -u src/sys/arch/evbarm/conf/GUMSTIX_INSTALL:1.4 src/sys/arch/evbarm/conf/GUMSTIX_INSTALL:1.5 --- src/sys/arch/evbarm/conf/GUMSTIX_INSTALL:1.4 Thu May 1 18:43:45 2014 +++ src/sys/arch/evbarm/conf/GUMSTIX_INSTALL Fri May 2 23:49:10 2014 @@ -1,4 +1,4 @@ -# $NetBSD: GUMSTIX_INSTALL,v 1.4 2014/05/01 18:43:45 martin Exp $ +# $NetBSD: GUMSTIX_INSTALL,v 1.5 2014/05/02 23:49:10 dogcow Exp $ # # GUMSTIX_INSTALL -- GUMSTIX kernel with installation-sized # ramdisk @@ -9,3 +9,5 @@ include arch/evbarm/conf/INSTALL options BOOTHOWTO=RB_SINGLE no makeoptions DEBUG +no config netbsd-sm0 +no config netbsd-smsh0 Index: src/sys/arch/evbarm/conf/KUROBOX_PRO_INSTALL diff -u src/sys/arch/evbarm/conf/KUROBOX_PRO_INSTALL:1.2 src/sys/arch/evbarm/conf/KUROBOX_PRO_INSTALL:1.3 --- src/sys/arch/evbarm/conf/KUROBOX_PRO_INSTALL:1.2 Thu May 1 18:43:45 2014 +++ src/sys/arch/evbarm/conf/KUROBOX_PRO_INSTALL Fri May 2 23:49:10 2014 @@ -1,4 +1,4 @@ -# $NetBSD: KUROBOX_PRO_INSTALL,v 1.2 2014/05/01 18:43:45 martin Exp $ +# $NetBSD: KUROBOX_PRO_INSTALL,v 1.3 2014/05/02 23:49:10 dogcow Exp $ # # KUROBOX_PRO_INSTALL -- KUROBOX_PRO kernel with installation-sized # ramdisk @@ -7,3 +7,4 @@ include arch/evbarm/conf/KUROBOX_PRO include arch/evbarm/conf/INSTALL no makeoptions DEBUG +no config netbsd-wd0 Index: src/sys/arch/evbarm/conf/MV2120_INSTALL diff -u src/sys/arch/evbarm/conf/MV2120_INSTALL:1.2 src/sys/arch/evbarm/conf/MV2120_INSTALL:1.3 --- src/sys/arch/evbarm/conf/MV2120_INSTALL:1.2 Thu May 1 18:43:45 2014 +++ src/sys/arch/evbarm/conf/MV2120_INSTALL Fri May 2 23:49:10 2014 @@ -1,4 +1,4 @@ -# $NetBSD: MV2120_INSTALL,v 1.2 2014/05/01 18:43:45 martin Exp $ +# $NetBSD: MV2120_INSTALL,v 1.3 2014/05/02 23:49:10 dogcow Exp
CVS commit: src/external/gpl3/gcc/dist/gcc/config/arm
Module Name:src Committed By: dogcow Date: Wed Apr 30 02:04:11 UTC 2014 Modified Files: src/external/gpl3/gcc/dist/gcc/config/arm: arm.h Log Message: fix munged patch: xcompilation on linux/non-arm systems - netbsd/arm works again. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config/arm/arm.h diff -u src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.6 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.7 --- src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.6 Mon Mar 3 03:28:55 2014 +++ src/external/gpl3/gcc/dist/gcc/config/arm/arm.h Wed Apr 30 02:04:11 2014 @@ -2319,7 +2319,7 @@ extern int making_const_table; /* -mcpu=native handling only makes sense with compiler running on an ARM chip. */ -#if defined(__linux__) +#if defined(__arm__) defined(__linux__) extern const char *host_detect_local_cpu (int argc, const char **argv); # define EXTRA_SPEC_FUNCTIONS \ { local_cpu_detect, host_detect_local_cpu },
CVS commit: src/sys/kern
Module Name:src Committed By: dogcow Date: Sun Feb 2 08:25:23 UTC 2014 Modified Files: src/sys/kern: kern_exec.c Log Message: Delete duplicate symbol definition introduced in 1.371. Now builds again. To generate a diff of this commit: cvs rdiff -u -r1.371 -r1.372 src/sys/kern/kern_exec.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_exec.c diff -u src/sys/kern/kern_exec.c:1.371 src/sys/kern/kern_exec.c:1.372 --- src/sys/kern/kern_exec.c:1.371 Sun Feb 2 04:28:42 2014 +++ src/sys/kern/kern_exec.c Sun Feb 2 08:25:23 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.371 2014/02/02 04:28:42 manu Exp $ */ +/* $NetBSD: kern_exec.c,v 1.372 2014/02/02 08:25:23 dogcow Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.371 2014/02/02 04:28:42 manu Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.372 2014/02/02 08:25:23 dogcow Exp $); #include opt_exec.h #include opt_execfmt.h @@ -178,7 +178,6 @@ void syscall(void); /* NetBSD emul struct */ struct emul emul_netbsd = { .e_name = netbsd, - .e_path = NULL, #ifdef EMUL_NATIVEROOT .e_path = EMUL_NATIVEROOT, #else
CVS commit: src/usr.sbin/makefs/chfs
Module Name:src Committed By: dogcow Date: Fri Apr 27 20:58:54 UTC 2012 Modified Files: src/usr.sbin/makefs/chfs: chfs_mkfs.c Log Message: As this code is used by tools, and thus needs to be portable, eliminate all the mucking around for an undocumented, seemingly unused field and use 0. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/makefs/chfs/chfs_mkfs.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/makefs/chfs/chfs_mkfs.c diff -u src/usr.sbin/makefs/chfs/chfs_mkfs.c:1.4 src/usr.sbin/makefs/chfs/chfs_mkfs.c:1.5 --- src/usr.sbin/makefs/chfs/chfs_mkfs.c:1.4 Fri Apr 20 13:28:27 2012 +++ src/usr.sbin/makefs/chfs/chfs_mkfs.c Fri Apr 27 20:58:54 2012 @@ -209,11 +209,7 @@ write_dirent(fsinfo_t *fsopts, fsnode *n } fdirent.version = htole64(version++); -#ifdef HAVE_STRUCT_STAT_ST_MTIMENSEC - fdirent.mctime = htole32(node-inode-st.st_mtimensec); -#else - fdirent.mctime = htole32(node-inode-st.st_mtimespec.tv_nsec); -#endif + fdirent.mctime = 0; fdirent.nsize = htole32(strlen(name)); fdirent.dtype = htole32(IFTOCHT(node-type S_IFMT)); fdirent.name_crc = htole32(crc32(0, (uint8_t *)name, fdirent.nsize));
CVS commit: src/sys/dev/pci
Module Name:src Committed By: dogcow Date: Thu Aug 26 10:21:56 UTC 2010 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add several Broadcom BCM43xx devices. To generate a diff of this commit: cvs rdiff -u -r1.1048 -r1.1049 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.1048 src/sys/dev/pci/pcidevs:1.1049 --- src/sys/dev/pci/pcidevs:1.1048 Sun Aug 1 18:45:24 2010 +++ src/sys/dev/pci/pcidevs Thu Aug 26 10:21:56 2010 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1048 2010/08/01 18:45:24 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1049 2010/08/26 10:21:56 dogcow Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -1567,6 +1567,8 @@ product BROADCOM BCM4307 0x4307 BCM4307 product BROADCOM BCM4311 0x4311 BCM4311 product BROADCOM BCM4312 0x4312 BCM4312 +product BROADCOM BCM4313 0x4313 BCM4313 +product BROADCOM BCM4315 0x4315 BCM4315 product BROADCOM BCM4318 0x4318 BCM4318 AirForce One 54g product BROADCOM BCM4319 0x4319 BCM4319 product BROADCOM BCM4306 0x4320 BCM4306 @@ -1575,6 +1577,11 @@ product BROADCOM BCM4309 0x4324 BCM4309 product BROADCOM BCM43XG 0x4325 BCM43XG product BROADCOM BCM4328 0x4328 BCM4328 802.11a/b/g/n +product BROADCOM BCM4329 0x4329 BCM4329 802.11b/g/n +product BROADCOM BCM432A 0x432a BCM432A 802.11 +product BROADCOM BCM432B 0x432b BCM432B 802.11a/b/g/n +product BROADCOM BCM432C 0x432c BCM432C 802.11b/g/n +product BROADCOM BCM432D 0x432d BCM432D 802.11 product BROADCOM BCM4401 0x4401 BCM4401 10/100 Ethernet product BROADCOM 5801 0x5801 5801 Security Processor product BROADCOM 5802 0x5802 5802 Security Processor
CVS commit: src/libexec/httpd
Module Name:src Committed By: dogcow Date: Mon Aug 16 10:00:56 UTC 2010 Modified Files: src/libexec/httpd: dir-index-bozo.c Log Message: readdir - scandir and requisite changes, so that bozohttpd now sorts directory listings. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/libexec/httpd/dir-index-bozo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/dir-index-bozo.c diff -u src/libexec/httpd/dir-index-bozo.c:1.8 src/libexec/httpd/dir-index-bozo.c:1.9 --- src/libexec/httpd/dir-index-bozo.c:1.8 Mon May 10 03:37:45 2010 +++ src/libexec/httpd/dir-index-bozo.c Mon Aug 16 10:00:56 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dir-index-bozo.c,v 1.8 2010/05/10 03:37:45 mrg Exp $ */ +/* $NetBSD: dir-index-bozo.c,v 1.9 2010/08/16 10:00:56 dogcow Exp $ */ /* $eterna: dir-index-bozo.c,v 1.17 2010/05/10 02:51:28 mrg Exp $ */ @@ -61,13 +61,13 @@ { bozohttpd_t *httpd = request-hr_httpd; struct stat sb; - struct dirent *de; + struct dirent **de; struct tm *tm; DIR *dp; char buf[MAXPATHLEN]; char spacebuf[48]; char *file = NULL; - int l, i; + int l, j, i; if (!isindex || !httpd-dir_indexing) return 0; @@ -123,11 +123,11 @@ directory_hr(httpd); bozo_printf(httpd, pre); - while ((de = readdir(dp)) != NULL) { + for (j = scandir(dirname, de, NULL, alphasort); j--; de++) { int nostat = 0; - char *name = de-d_name; + char *name = (*de)-d_name; - if (strcmp(name, .) == 0 || + if (strcmp(name, .) == 0 || (strcmp(name, ..) != 0 httpd-hide_dots name[0] == '.')) continue; @@ -183,15 +183,18 @@ bozo_printf(httpd, \r\n); } + if (de) + free(de); closedir(dp); bozo_printf(httpd, /pre); directory_hr(httpd); bozo_printf(httpd, /body/html\r\n\r\n); bozo_flush(httpd, stdout); - + done: if (file) free(file); return 1; } #endif /* NO_DIRINDEX_SUPPORT */ +
CVS commit: src/libexec/httpd
Module Name:src Committed By: dogcow Date: Mon Aug 16 18:32:45 UTC 2010 Modified Files: src/libexec/httpd: dir-index-bozo.c Log Message: ...and free() memory malloc()ed by scandir so we don't leak. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/libexec/httpd/dir-index-bozo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/dir-index-bozo.c diff -u src/libexec/httpd/dir-index-bozo.c:1.9 src/libexec/httpd/dir-index-bozo.c:1.10 --- src/libexec/httpd/dir-index-bozo.c:1.9 Mon Aug 16 10:00:56 2010 +++ src/libexec/httpd/dir-index-bozo.c Mon Aug 16 18:32:44 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dir-index-bozo.c,v 1.9 2010/08/16 10:00:56 dogcow Exp $ */ +/* $NetBSD: dir-index-bozo.c,v 1.10 2010/08/16 18:32:44 dogcow Exp $ */ /* $eterna: dir-index-bozo.c,v 1.17 2010/05/10 02:51:28 mrg Exp $ */ @@ -61,13 +61,13 @@ { bozohttpd_t *httpd = request-hr_httpd; struct stat sb; - struct dirent **de; + struct dirent **de, **deo; struct tm *tm; DIR *dp; char buf[MAXPATHLEN]; char spacebuf[48]; char *file = NULL; - int l, j, i; + int l, k, j, i; if (!isindex || !httpd-dir_indexing) return 0; @@ -123,7 +123,8 @@ directory_hr(httpd); bozo_printf(httpd, pre); - for (j = scandir(dirname, de, NULL, alphasort); j--; de++) { + for (j = k = scandir(dirname, de, NULL, alphasort), deo = de; + j--; de++) { int nostat = 0; char *name = (*de)-d_name; @@ -183,9 +184,10 @@ bozo_printf(httpd, \r\n); } - if (de) - free(de); closedir(dp); + while (k--) + free(deo[k]); + free(deo); bozo_printf(httpd, /pre); directory_hr(httpd); bozo_printf(httpd, /body/html\r\n\r\n);
CVS commit: src/external/bsd/wpa/dist/src/drivers
Module Name:src Committed By: dogcow Date: Thu Aug 5 14:03:17 UTC 2010 Modified Files: src/external/bsd/wpa/dist/src/drivers: driver_bsd.c Log Message: Fix build on big-endian hosts. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/wpa/dist/src/drivers/driver_bsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/wpa/dist/src/drivers/driver_bsd.c diff -u src/external/bsd/wpa/dist/src/drivers/driver_bsd.c:1.2 src/external/bsd/wpa/dist/src/drivers/driver_bsd.c:1.3 --- src/external/bsd/wpa/dist/src/drivers/driver_bsd.c:1.2 Wed Aug 4 17:12:34 2010 +++ src/external/bsd/wpa/dist/src/drivers/driver_bsd.c Thu Aug 5 14:03:17 2010 @@ -626,6 +626,9 @@ } #ifdef WORDS_BIGENDIAN +#ifndef WPA_KEY_RSC_LEN +#define WPA_KEY_RSC_LEN 8 +#endif { /* * wk.ik_keytsc is in host byte order (big endian), need to
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: dogcow Date: Tue Jun 22 14:54:11 UTC 2010 Modified Files: src/usr.bin/mkubootimage: crc32.c mkubootimage.c Log Message: nbtool.h'ify; fixes cross-compilation. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/mkubootimage/crc32.c \ 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/crc32.c diff -u src/usr.bin/mkubootimage/crc32.c:1.1 src/usr.bin/mkubootimage/crc32.c:1.2 --- src/usr.bin/mkubootimage/crc32.c:1.1 Fri Jun 18 18:55:48 2010 +++ src/usr.bin/mkubootimage/crc32.c Tue Jun 22 14:54:11 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: crc32.c,v 1.1 2010/06/18 18:55:48 jmcneill Exp $ */ +/* $NetBSD: crc32.c,v 1.2 2010/06/22 14:54:11 dogcow Exp $ */ /*- * Copyright (c) 2002 Marcel Moolenaar @@ -28,8 +28,12 @@ * CRC32 code derived from work by Gary S. Brown. */ +#if HAVE_NBTOOL_CONFIG_H +#include nbtool_config.h +#endif + #include sys/cdefs.h -__RCSID($NetBSD: crc32.c,v 1.1 2010/06/18 18:55:48 jmcneill Exp $); +__RCSID($NetBSD: crc32.c,v 1.2 2010/06/22 14:54:11 dogcow Exp $); #include sys/types.h #include stdint.h Index: src/usr.bin/mkubootimage/mkubootimage.c diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.1 src/usr.bin/mkubootimage/mkubootimage.c:1.2 --- src/usr.bin/mkubootimage/mkubootimage.c:1.1 Fri Jun 18 18:55:48 2010 +++ src/usr.bin/mkubootimage/mkubootimage.c Tue Jun 22 14:54:11 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mkubootimage.c,v 1.1 2010/06/18 18:55:48 jmcneill Exp $ */ +/* $NetBSD: mkubootimage.c,v 1.2 2010/06/22 14:54:11 dogcow Exp $ */ /*- * Copyright (c) 2010 Jared D. McNeill jmcne...@invisible.ca @@ -25,8 +25,12 @@ * SUCH DAMAGE. */ +#if HAVE_NBTOOL_CONFIG_H +#include nbtool_config.h +#endif + #include sys/cdefs.h -__RCSID($NetBSD: mkubootimage.c,v 1.1 2010/06/18 18:55:48 jmcneill Exp $); +__RCSID($NetBSD: mkubootimage.c,v 1.2 2010/06/22 14:54:11 dogcow Exp $); #include sys/mman.h #include sys/stat.h
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: dogcow Date: Tue Mar 16 22:01:18 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi Log Message: Fix entries whose filenames do not actually end with .sh. (Hi, jmmv!) To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.62 src/distrib/sets/lists/tests/mi:1.63 --- src/distrib/sets/lists/tests/mi:1.62 Mon Mar 15 19:03:33 2010 +++ src/distrib/sets/lists/tests/mi Tue Mar 16 22:01:18 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.62 2010/03/15 19:03:33 jmmv Exp $ +# $NetBSD: mi,v 1.63 2010/03/16 22:01:18 dogcow Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -963,8 +963,8 @@ ./usr/tests/sys/Atffile tests-sys-tests atf ./usr/tests/sys/rctests-sys-tests ./usr/tests/sys/rc/Atffile tests-sys-tests atf -./usr/tests/sys/rc/h_args.sh tests-sys-tests atf -./usr/tests/sys/rc/h_simple.sh tests-sys-tests atf +./usr/tests/sys/rc/h_args tests-sys-tests atf +./usr/tests/sys/rc/h_simple tests-sys-tests atf ./usr/tests/sys/rc/t_rc_d_cli tests-sys-tests atf ./usr/tests/syscalltests-syscall-tests ./usr/tests/syscall/Atffile tests-syscall-tests atf
CVS commit: src/sbin/savecore
Module Name:src Committed By: dogcow Date: Tue Aug 18 04:02:40 UTC 2009 Modified Files: src/sbin/savecore: savecore.c Log Message: Instead of exiting with an obscure error message if -N /kernelname isn't specified, blithely assume the kernel will consume around 20 megs. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sbin/savecore/savecore.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/savecore/savecore.c diff -u src/sbin/savecore/savecore.c:1.80 src/sbin/savecore/savecore.c:1.81 --- src/sbin/savecore/savecore.c:1.80 Mon Apr 6 12:32:30 2009 +++ src/sbin/savecore/savecore.c Tue Aug 18 04:02:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: savecore.c,v 1.80 2009/04/06 12:32:30 lukem Exp $ */ +/* $NetBSD: savecore.c,v 1.81 2009/08/18 04:02:39 dogcow Exp $ */ /*- * Copyright (c) 1986, 1992, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)savecore.c 8.5 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: savecore.c,v 1.80 2009/04/06 12:32:30 lukem Exp $); +__RCSID($NetBSD: savecore.c,v 1.81 2009/08/18 04:02:39 dogcow Exp $); #endif #endif /* not lint */ @@ -911,11 +911,9 @@ struct statvfs fsbuf; char mbuf[100], path[MAXPATHLEN]; - if (stat(kernel, st) 0) { - syslog(LOG_ERR, %s: %m, kernel); - exit(1); - } - kernelsize = st.st_blocks * S_BLKSIZE; + /* XXX assume a reasonable default, unless we find a kernel. */ + kernelsize = 20 * 1024 * 1024; + if (!stat(kernel, st)) kernelsize = st.st_blocks * S_BLKSIZE; if (statvfs(dirname, fsbuf) 0) { syslog(LOG_ERR, %s: %m, dirname); exit(1);
CVS commit: src/usr.bin/elf2aout
Module Name:src Committed By: dogcow Date: Sat Apr 18 10:12:42 UTC 2009 Modified Files: src/usr.bin/elf2aout: elf2aout.c Log Message: Fix sign/unsigned and discards qualifiers. Based on patch by mlelstv. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.bin/elf2aout/elf2aout.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/elf2aout/elf2aout.c diff -u src/usr.bin/elf2aout/elf2aout.c:1.11 src/usr.bin/elf2aout/elf2aout.c:1.12 --- src/usr.bin/elf2aout/elf2aout.c:1.11 Fri Apr 23 02:55:11 2004 +++ src/usr.bin/elf2aout/elf2aout.c Sat Apr 18 10:12:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: elf2aout.c,v 1.11 2004/04/23 02:55:11 simonb Exp $ */ +/* $NetBSD: elf2aout.c,v 1.12 2009/04/18 10:12:42 dogcow Exp $ */ /* * Copyright (c) 1995 @@ -56,7 +56,7 @@ void combine __P((struct sect *, struct sect *, int)); int phcmp __P((const void *, const void *)); -char *saveRead __P((int file, off_t offset, off_t len, char *name)); +char *saveRead __P((int file, off_t offset, off_t len, const char *name)); void copy __P((int, int, off_t, off_t)); void translate_syms __P((int, int, off_t, off_t, off_t, off_t)); @@ -334,7 +334,7 @@ cur = SYMS_PER_PASS; remaining -= cur; if ((i = read(in, inbuf, cur * sizeof(Elf32_Sym))) - != cur * sizeof(Elf32_Sym)) { + != cur * (long)sizeof(Elf32_Sym)) { if (i 0) perror(translate_syms); else @@ -378,7 +378,7 @@ } /* Write out the symbols... */ if ((i = write(out, outbuf, cur * sizeof(struct nlist))) - != cur * sizeof(struct nlist)) { + != cur * (long)sizeof(struct nlist)) { fprintf(stderr, translate_syms: write: %s\n, strerror(errno)); exit(1); } @@ -413,7 +413,7 @@ remaining = size; while (remaining) { cur = remaining; - if (cur sizeof ibuf) + if (cur (long)sizeof ibuf) cur = sizeof ibuf; remaining -= cur; if ((count = read(in, ibuf, cur)) != cur) { @@ -455,9 +455,9 @@ phcmp(vh1, vh2) const void *vh1, *vh2; { - Elf32_Phdr *h1, *h2; - h1 = (Elf32_Phdr *) vh1; - h2 = (Elf32_Phdr *) vh2; + const Elf32_Phdr *h1, *h2; + h1 = (const Elf32_Phdr *) vh1; + h2 = (const Elf32_Phdr *) vh2; if (h1-p_vaddr h2-p_vaddr) return 1; @@ -469,7 +469,7 @@ } char * -saveRead(int file, off_t offset, off_t len, char *name) +saveRead(int file, off_t offset, off_t len, const char *name) { char *tmp; int count;
CVS commit: src/usr.bin/crunch/crunchide
Module Name:src Committed By: dogcow Date: Wed Apr 15 02:07:20 UTC 2009 Modified Files: src/usr.bin/crunch/crunchide: exec_aout.c Log Message: more signed/unsigned comparison fixes To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.bin/crunch/crunchide/exec_aout.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/crunch/crunchide/exec_aout.c diff -u src/usr.bin/crunch/crunchide/exec_aout.c:1.9 src/usr.bin/crunch/crunchide/exec_aout.c:1.10 --- src/usr.bin/crunch/crunchide/exec_aout.c:1.9 Wed Jun 14 06:49:20 2000 +++ src/usr.bin/crunch/crunchide/exec_aout.c Wed Apr 15 02:07:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_aout.c,v 1.9 2000/06/14 06:49:20 cgd Exp $ */ +/* $NetBSD: exec_aout.c,v 1.10 2009/04/15 02:07:20 dogcow Exp $ */ /* * Copyright (c) 1997 Christopher G. Demetriou. All rights reserved. @@ -29,7 +29,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: exec_aout.c,v 1.9 2000/06/14 06:49:20 cgd Exp $); +__RCSID($NetBSD: exec_aout.c,v 1.10 2009/04/15 02:07:20 dogcow Exp $); #endif #include unistd.h @@ -83,7 +83,7 @@ if(fstat(inf, infstat) == -1) return 0; -if(infstat.st_size sizeof eh) +if(infstat.st_size (ssize_t)sizeof eh) return 0; if(read(inf, eh, sizeof eh) != sizeof eh) return 0;