CVS commit: src/sys/arch/evbarm/gumstix
Module Name:src Committed By: kiyohara Date: Thu Sep 23 06:54:46 UTC 2010 Modified Files: src/sys/arch/evbarm/gumstix: gumstix_machdep.c Log Message: If GUMSTIX_NETBSD_ARGS_CONSOLE is defined, argument 'console=ttyS0,speed' that u-boot passes Linux will be interpreted. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbarm/gumstix/gumstix_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/evbarm/gumstix/gumstix_machdep.c diff -u src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.32 src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.33 --- src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.32 Mon Aug 30 05:37:30 2010 +++ src/sys/arch/evbarm/gumstix/gumstix_machdep.c Thu Sep 23 06:54:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: gumstix_machdep.c,v 1.32 2010/08/30 05:37:30 kiyohara Exp $ */ +/* $NetBSD: gumstix_machdep.c,v 1.33 2010/09/23 06:54:46 kiyohara Exp $ */ /* * Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation. * All rights reserved. @@ -1203,6 +1203,17 @@ #if NCOM 0 +#ifdef GUMSTIX_NETBSD_ARGS_CONSOLE + /* Maybe passed Linux's bootargs 'console=ttyS?,speed...' */ + if (strncmp(console, ttyS, 4) == 0 console[5] == ',') { + int i; + + comcnspeed = 0; + for (i = 6; i strlen(console) isdigit(console[i]); i++) + comcnspeed = comcnspeed * 10 + (console[i] - '0'); + } +#endif + #if defined(GUMSTIX) #ifdef FFUARTCONSOLE @@ -1212,7 +1223,8 @@ } else #endif #if defined(GUMSTIX_NETBSD_ARGS_CONSOLE) - if (console[0] == '\0' || strcasecmp(console, ffuart) == 0) + if (console[0] == '\0' || strcasecmp(console, ffuart) == 0 || + strncmp(console, ttyS0,, 6) == 0) #endif { int rv;
CVS commit: src/sys/arch/evbarm/gumstix
Module Name:src Committed By: kiyohara Date: Thu Sep 23 07:01:42 UTC 2010 Modified Files: src/sys/arch/evbarm/gumstix: gumstix_machdep.c Log Message: Remove #ifdef NPRCM. Always include omap2_prcm.h. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/evbarm/gumstix/gumstix_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/evbarm/gumstix/gumstix_machdep.c diff -u src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.33 src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.34 --- src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.33 Thu Sep 23 06:54:46 2010 +++ src/sys/arch/evbarm/gumstix/gumstix_machdep.c Thu Sep 23 07:01:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: gumstix_machdep.c,v 1.33 2010/09/23 06:54:46 kiyohara Exp $ */ +/* $NetBSD: gumstix_machdep.c,v 1.34 2010/09/23 07:01:41 kiyohara Exp $ */ /* * Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation. * All rights reserved. @@ -173,9 +173,7 @@ #include arm/arm32/machdep.h #include arm/omap/omap2_gpmcreg.h -#if NPRCM 0 #include arm/omap/omap2_prcm.h -#endif #include arm/omap/omap2_reg.h #include arm/omap/omap_var.h #include arm/omap/omap_com.h
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: kiyohara Date: Thu Sep 23 07:08:57 UTC 2010 Modified Files: src/sys/arch/evbarm/conf: files.evbarm files.g42xxeb files.gumstix Log Message: Move 'include files.sdmmc' to files.evbarm. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbarm/conf/files.evbarm cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/files.g42xxeb cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbarm/conf/files.gumstix 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/files.evbarm diff -u src/sys/arch/evbarm/conf/files.evbarm:1.21 src/sys/arch/evbarm/conf/files.evbarm:1.22 --- src/sys/arch/evbarm/conf/files.evbarm:1.21 Mon Mar 17 09:30:02 2008 +++ src/sys/arch/evbarm/conf/files.evbarm Thu Sep 23 07:08:57 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files.evbarm,v 1.21 2008/03/17 09:30:02 kiyohara Exp $ +# $NetBSD: files.evbarm,v 1.22 2010/09/23 07:08:57 kiyohara Exp $ # # First try for arm-specific configuration info # @@ -35,6 +35,7 @@ include dev/pci/files.pci # PCI devices include dev/cardbus/files.cardbus # and CardBus devices include dev/pcmcia/files.pcmcia # PCMCIA devices +include dev/sdmmc/files.sdmmc # SD/MMC devices include dev/scsipi/files.scsipi # SCSI devices include dev/usb/files.usb # USB devices Index: src/sys/arch/evbarm/conf/files.g42xxeb diff -u src/sys/arch/evbarm/conf/files.g42xxeb:1.6 src/sys/arch/evbarm/conf/files.g42xxeb:1.7 --- src/sys/arch/evbarm/conf/files.g42xxeb:1.6 Sat Mar 13 11:37:47 2010 +++ src/sys/arch/evbarm/conf/files.g42xxeb Thu Sep 23 07:08:57 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files.g42xxeb,v 1.6 2010/03/13 11:37:47 bsh Exp $ +# $NetBSD: files.g42xxeb,v 1.7 2010/09/23 07:08:57 kiyohara Exp $ # # Genetec corp. G4255EB evaluation board configuration info # @@ -8,9 +8,6 @@ # CPU support and integrated peripherals include arch/arm/xscale/files.pxa2x0 -# Machine-independent SD/MMC drivers -include dev/sdmmc/files.sdmmc - # G4250EBX on-board devices (including CPLD) device obio {[addr=-1], [intr=-1]} attach obio at pxaip Index: src/sys/arch/evbarm/conf/files.gumstix diff -u src/sys/arch/evbarm/conf/files.gumstix:1.16 src/sys/arch/evbarm/conf/files.gumstix:1.17 --- src/sys/arch/evbarm/conf/files.gumstix:1.16 Sat Jul 10 08:17:48 2010 +++ src/sys/arch/evbarm/conf/files.gumstix Thu Sep 23 07:08:57 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files.gumstix,v 1.16 2010/07/10 08:17:48 kiyohara Exp $ +# $NetBSD: files.gumstix,v 1.17 2010/09/23 07:08:57 kiyohara Exp $ # # Gumstix. Inc. Gumstix boards configuration info # @@ -31,8 +31,6 @@ attach gxiic at pxaip file arch/evbarm/gumstix/gxiic.c gxiic -include dev/sdmmc/files.sdmmc - # MMC/SD controller attach pxamci at pxaip with gxmci file arch/evbarm/gumstix/gxmci.c gxmci
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: kiyohara Date: Thu Sep 23 07:21:05 UTC 2010 Modified Files: src/sys/arch/evbarm/conf: GUMSTIX Log Message: + Remove crypto, swcrypto. No need. + Enable tap. It needs Bluetooth PAN. + Enable bridge for PAN/netDUO. + Enable dmoverio. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/evbarm/conf/GUMSTIX 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/GUMSTIX diff -u src/sys/arch/evbarm/conf/GUMSTIX:1.52 src/sys/arch/evbarm/conf/GUMSTIX:1.53 --- src/sys/arch/evbarm/conf/GUMSTIX:1.52 Sat Aug 28 04:59:22 2010 +++ src/sys/arch/evbarm/conf/GUMSTIX Thu Sep 23 07:21:05 2010 @@ -1,4 +1,4 @@ -# $NetBSD: GUMSTIX,v 1.52 2010/08/28 04:59:22 kiyohara Exp $ +# $NetBSD: GUMSTIX,v 1.53 2010/09/23 07:21:05 kiyohara Exp $ # # GUMSTIX -- Gumstix. Inc. gumstix platforms kernel # @@ -348,9 +348,6 @@ # Pseudo-Devices -pseudo-device crypto # /dev/crypto device -pseudo-device swcrypto # software crypto implementation - # disk/mass storage pseudo-devices #pseudo-device bio # RAID control device driver #pseudo-device ccd 4 # concatenated/striped disk devices @@ -383,14 +380,14 @@ #pseudo-device sl # Serial Line IP #pseudo-device strip # Starmode Radio IP (Metricom) #pseudo-device irframetty # IrDA frame line discipline -#pseudo-device tap # virtual Ethernet +pseudo-device tap # virtual Ethernet #pseudo-device tun # network tunneling over tty #pseudo-device gre # generic L3 over IP tunnel #pseudo-device gif # IPv[46] over IPv[46] tunnel (RFC 1933) #pseudo-device faith # IPv[46] TCP relay translation i/f #pseudo-device stf # 6to4 IPv6 over IPv4 encapsulation #pseudo-device vlan # IEEE 802.1q encapsulation -#pseudo-device bridge # simple inter-network bridging +pseudo-device bridge # simple inter-network bridging #options BRIDGE_IPF # bridge uses IP/IPv6 pfil hooks too #pseudo-device agr # IEEE 802.3ad link aggregation #pseudo-device pf # PF packet filter @@ -420,8 +417,8 @@ #pseudo-device wsfont # data mover pseudo-devices -#pseudo-device swdmover # softare dmover(9) back-end -#pseudo-device dmoverio # /dev/dmover dmover(9) interface +pseudo-device swdmover # softare dmover(9) back-end +pseudo-device dmoverio # /dev/dmover dmover(9) interface # userland interface to drivers, including autoconf and properties retrieval pseudo-device drvctl
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: kiyohara Date: Thu Sep 23 07:31:15 UTC 2010 Modified Files: src/sys/arch/arm/arm: cpufunc.c Log Message: Replace some whitespaces to Tab. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/arch/arm/arm/cpufunc.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/cpufunc.c diff -u src/sys/arch/arm/arm/cpufunc.c:1.99 src/sys/arch/arm/arm/cpufunc.c:1.100 --- src/sys/arch/arm/arm/cpufunc.c:1.99 Mon Jul 5 06:54:48 2010 +++ src/sys/arch/arm/arm/cpufunc.c Thu Sep 23 07:31:10 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.99 2010/07/05 06:54:48 kiyohara Exp $ */ +/* $NetBSD: cpufunc.c,v 1.100 2010/09/23 07:31:10 kiyohara Exp $ */ /* * arm7tdmi support code Copyright (c) 2001 John Fremlin @@ -45,11 +45,11 @@ * * C functions for supporting CPU / MMU / TLB specific operations. * - * Created : 30/01/97 + * Created : 30/01/97 */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.99 2010/07/05 06:54:48 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: cpufunc.c,v 1.100 2010/09/23 07:31:10 kiyohara Exp $); #include opt_compat_netbsd.h #include opt_cpuoptions.h @@ -1168,17 +1168,17 @@ static inline u_int get_cachesize_cp15(int cssr) { -u_int csid; + u_int csid; #if (CPU_CORTEX) 0 -__asm volatile(.arch\tarmv7a); -__asm volatile(mcr p15, 2, %0, c0, c0, 0 :: r (cssr)); -__asm volatile(isb); /* sync to the new cssr */ + __asm volatile(.arch\tarmv7a); + __asm volatile(mcr p15, 2, %0, c0, c0, 0 :: r (cssr)); + __asm volatile(isb); /* sync to the new cssr */ #else -__asm volatile(mcr p15, 1, %0, c0, c0, 2 :: r (cssr)); + __asm volatile(mcr p15, 1, %0, c0, c0, 2 :: r (cssr)); #endif -__asm volatile(mrc p15, 1, %0, c0, c0, 0 : =r (csid)); -return csid; + __asm volatile(mrc p15, 1, %0, c0, c0, 0 : =r (csid)); + return csid; } #endif @@ -1571,13 +1571,13 @@ } #endif /* CPU_FA526 */ #ifdef CPU_IXP12X0 -if (cputype == CPU_ID_IXP1200) { -cpufuncs = ixp12x0_cpufuncs; -cpu_reset_needs_v4_MMU_disable = 1; -get_cachetype_table(); -pmap_pte_init_sa1(); -return 0; -} + if (cputype == CPU_ID_IXP1200) { + cpufuncs = ixp12x0_cpufuncs; + cpu_reset_needs_v4_MMU_disable = 1; + get_cachetype_table(); + pmap_pte_init_sa1(); + return 0; + } #endif /* CPU_IXP12X0 */ #ifdef CPU_XSCALE_80200 if (cputype == CPU_ID_80200) { @@ -1688,7 +1688,7 @@ #endif /* __CPU_XSCALE_PXA2XX */ #ifdef CPU_XSCALE_IXP425 if (cputype == CPU_ID_IXP425_533 || cputype == CPU_ID_IXP425_400 || -cputype == CPU_ID_IXP425_266) { + cputype == CPU_ID_IXP425_266) { ixp425_icu_init(); cpufuncs = xscale_cpufuncs; @@ -2511,10 +2511,10 @@ #if defined(PROCESS_ID_IS_CURCPU) /* set curcpu() */ -__asm(mcr\tp15, 0, %0, c13, c0, 4 : : r(cpu_info_store)); + __asm(mcr\tp15, 0, %0, c13, c0, 4 : : r(cpu_info_store)); #elif defined(PROCESS_ID_IS_CURLWP) /* set curlwp() */ -__asm(mcr\tp15, 0, %0, c13, c0, 4 : : r(lwp0)); + __asm(mcr\tp15, 0, %0, c13, c0, 4 : : r(lwp0)); #endif cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_SYST_ENABLE @@ -2575,10 +2575,10 @@ #if defined(PROCESS_ID_IS_CURCPU) /* set curcpu() */ -__asm(mcr\tp15, 0, %0, c13, c0, 4 : : r(cpu_info_store)); + __asm(mcr\tp15, 0, %0, c13, c0, 4 : : r(cpu_info_store)); #elif defined(PROCESS_ID_IS_CURLWP) /* set curlwp() */ -__asm(mcr\tp15, 0, %0, c13, c0, 4 : : r(lwp0)); + __asm(mcr\tp15, 0, %0, c13, c0, 4 : : r(lwp0)); #endif cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_IC_ENABLE @@ -2672,10 +2672,10 @@ #if defined(PROCESS_ID_IS_CURCPU) /* set curcpu() */ -__asm(mcr\tp15, 0, %0, c13, c0, 4 : : r(cpu_info_store)); + __asm(mcr\tp15, 0, %0, c13, c0, 4 : : r(cpu_info_store)); #elif defined(PROCESS_ID_IS_CURLWP) /* set curlwp() */ -__asm(mcr\tp15, 0, %0, c13, c0, 4 : : r(lwp0)); + __asm(mcr\tp15, 0, %0, c13, c0, 4 : : r(lwp0)); #endif cpuid = cpu_id();
CVS commit: src/tests/fs/common/nfsrpc
Module Name:src Committed By: he Date: Thu Sep 23 09:38:14 UTC 2010 Modified Files: src/tests/fs/common/nfsrpc: clnt_bcast.c namespace.h rpc_generic.c rpcb_clnt.c svc.c svc_dg.c svc_vc.c Log Message: Do symbol renaming for these bits as well, so that we don't get link-time errors caused by conflicts with normal user-space libraries when we link statically. The tests still pass for i386 after this set of changes, and this now builds for sun2 (after a few more changes). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/fs/common/nfsrpc/clnt_bcast.c \ src/tests/fs/common/nfsrpc/namespace.h \ src/tests/fs/common/nfsrpc/rpc_generic.c \ src/tests/fs/common/nfsrpc/rpcb_clnt.c \ src/tests/fs/common/nfsrpc/svc_dg.c cvs rdiff -u -r1.3 -r1.4 src/tests/fs/common/nfsrpc/svc.c cvs rdiff -u -r1.2 -r1.3 src/tests/fs/common/nfsrpc/svc_vc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/common/nfsrpc/clnt_bcast.c diff -u src/tests/fs/common/nfsrpc/clnt_bcast.c:1.1 src/tests/fs/common/nfsrpc/clnt_bcast.c:1.2 --- src/tests/fs/common/nfsrpc/clnt_bcast.c:1.1 Mon Jul 26 15:56:45 2010 +++ src/tests/fs/common/nfsrpc/clnt_bcast.c Thu Sep 23 09:38:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: clnt_bcast.c,v 1.1 2010/07/26 15:56:45 pooka Exp $ */ +/* $NetBSD: clnt_bcast.c,v 1.2 2010/09/23 09:38:14 he Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = @(#)clnt_bcast.c 1.15 89/04/21 Copyr 1988 Sun Micro; #else -__RCSID($NetBSD: clnt_bcast.c,v 1.1 2010/07/26 15:56:45 pooka Exp $); +__RCSID($NetBSD: clnt_bcast.c,v 1.2 2010/09/23 09:38:14 he Exp $); #endif #endif @@ -113,6 +113,11 @@ * also here it will get two responses ... inefficient and clumsy. */ +#ifdef __weak_alias +__weak_alias(rpc_broadcast_exp,_rpc_broadcast_exp) +__weak_alias(rpc_broadcast,_rpc_broadcast) +#endif + struct broadif { int index; struct sockaddr_storage broadaddr; Index: src/tests/fs/common/nfsrpc/namespace.h diff -u src/tests/fs/common/nfsrpc/namespace.h:1.1 src/tests/fs/common/nfsrpc/namespace.h:1.2 --- src/tests/fs/common/nfsrpc/namespace.h:1.1 Mon Jul 26 15:56:45 2010 +++ src/tests/fs/common/nfsrpc/namespace.h Thu Sep 23 09:38:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: namespace.h,v 1.1 2010/07/26 15:56:45 pooka Exp $ */ +/* $NetBSD: namespace.h,v 1.2 2010/09/23 09:38:14 he Exp $ */ /*- * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -52,4 +52,40 @@ #define svcraw_lock __rpc_svcraw_lock #define xprtlist_lock __rpc_xprtlist_lock +/* NFS server stuff */ +#define svc_dg_create _svc_dg_create + +#define rpc_broadcast _rpc_broadcast +#define rpc_broadcast_exp _rpc_broadcast_exp + +#define svc_fd_create _svc_fd_create +#define svc_vc_create _svc_vc_create +#define svc_getreq _svc_getreq +#define svc_getreqset _svc_getreqset +#define svc_getreq_common _svc_getreq_common +#define svc_register_svc_register +#define svc_reg _svc_reg +#define svc_unreg _svc_unreg +#define svc_sendreply _svc_sendreply +#define svc_unregister _svc_unregister +#define svcerr_auth _svcerr_auth +#define svcerr_decode _svcerr_decode +#define svcerr_noproc _svcerr_noproc +#define svcerr_noprog _svcerr_noprog +#define svcerr_progvers _svcerr_progvers +#define svcerr_systemerr_svcerr_systemerr +#define svcerr_weakauth _svcerr_weakauth +#define xprt_register _xprt_register +#define xprt_unregister _xprt_unregister +#define rpc_control _rpc_control + +#define taddr2uaddr _taddr2uaddr +#define uaddr2taddr _uaddr2taddr + +#define rpcb_set _rpcb_set +#define rpcb_unset _rpcb_unset +#define rpcb_getmaps _rpcb_getmaps +#define rpcb_taddr2uaddr _rpcb_taddr2uaddr +#define rpcb_uaddr2taddr _rpcb_uaddr2taddr + #endif /* _NAMESPACE_H_ */ Index: src/tests/fs/common/nfsrpc/rpc_generic.c diff -u src/tests/fs/common/nfsrpc/rpc_generic.c:1.1 src/tests/fs/common/nfsrpc/rpc_generic.c:1.2 --- src/tests/fs/common/nfsrpc/rpc_generic.c:1.1 Mon Jul 26 15:56:45 2010 +++ src/tests/fs/common/nfsrpc/rpc_generic.c Thu Sep 23 09:38:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_generic.c,v 1.1 2010/07/26 15:56:45 pooka Exp $ */ +/* $NetBSD: rpc_generic.c,v 1.2 2010/09/23 09:38:14 he Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -41,7 +41,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: rpc_generic.c,v 1.1 2010/07/26 15:56:45 pooka Exp $); +__RCSID($NetBSD: rpc_generic.c,v 1.2 2010/09/23 09:38:14 he Exp $); #endif #include namespace.h @@ -69,6 +69,11 @@ #include rump/rump.h #include rump/rump_syscalls.h +#ifdef __weak_alias +__weak_alias(taddr2uaddr,_taddr2uaddr)
CVS commit: src/tests/fs
Module Name:src Committed By: he Date: Thu Sep 23 09:39:14 UTC 2010 Modified Files: src/tests/fs/ffs: Makefile src/tests/fs/nfs: Makefile src/tests/fs/vfs: Makefile Log Message: Reorder the library specifications, so that we don't depend on the library dependencies recorded in shared libraries, allowing these to be linked statically as well. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tests/fs/ffs/Makefile cvs rdiff -u -r1.3 -r1.4 src/tests/fs/nfs/Makefile cvs rdiff -u -r1.11 -r1.12 src/tests/fs/vfs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/fs/ffs/Makefile diff -u src/tests/fs/ffs/Makefile:1.11 src/tests/fs/ffs/Makefile:1.12 --- src/tests/fs/ffs/Makefile:1.11 Mon Jul 19 16:32:01 2010 +++ src/tests/fs/ffs/Makefile Thu Sep 23 09:39:14 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2010/07/19 16:32:01 pooka Exp $ +# $NetBSD: Makefile,v 1.12 2010/09/23 09:39:14 he Exp $ # .include bsd.own.mk @@ -14,9 +14,8 @@ LDADD+=-lrumpdev_fss # snapshot dev LDADD+=-lrumpdev_disk -lrumpdev # disk device LDADD+=-lrumpvfs_fifofs -lrumpnet_local -lrumpnet_net -lrumpnet # fifos -LDADD+=-lrumpvfs -lrump -lrumpuser -lpthread # base - VFSTESTDIR != cd ${.CURDIR}/../common ${PRINTOBJDIR} LDADD+=-L${VFSTESTDIR} -lvfstest +LDADD+=-lrumpvfs -lrump -lrumpuser -lpthread # base .include bsd.test.mk Index: src/tests/fs/nfs/Makefile diff -u src/tests/fs/nfs/Makefile:1.3 src/tests/fs/nfs/Makefile:1.4 --- src/tests/fs/nfs/Makefile:1.3 Wed Jul 28 19:23:01 2010 +++ src/tests/fs/nfs/Makefile Thu Sep 23 09:39:14 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2010/07/28 19:23:01 pooka Exp $ +# $NetBSD: Makefile,v 1.4 2010/09/23 09:39:14 he Exp $ # .include bsd.own.mk @@ -9,15 +9,16 @@ TESTS_C= t_mountd -LDADD+=-lrumpfs_ffs # ffs +VFSTESTDIR != cd ${.CURDIR}/../common ${PRINTOBJDIR} +LDADD+=-L${VFSTESTDIR} -lvfstest + LDADD+=-lrumpfs_nfs # NFS +LDADD+=-lrumpfs_ffs -lrumpvfs # ffs LDADD+=-lrumpdev_disk -lrumpdev # disk device -LDADD+=-lrumpnet_shmif -lrumpnet_netinet -lrumpnet_net -lrumpnet -LDADD+=-lrumpvfs -lrump -lrumpuser -lpthread# base +LDADD+=-lrumpnet_shmif # shmif +LDADD+=-lrumpnet_netinet -lrumpnet_net -lrumpnet +LDADD+=-lrump -lrumpuser -lpthread # base LDADD+=-lutil -VFSTESTDIR != cd ${.CURDIR}/../common ${PRINTOBJDIR} -LDADD+=-L${VFSTESTDIR} -lvfstest - .include bsd.test.mk Index: src/tests/fs/vfs/Makefile diff -u src/tests/fs/vfs/Makefile:1.11 src/tests/fs/vfs/Makefile:1.12 --- src/tests/fs/vfs/Makefile:1.11 Thu Aug 19 02:36:02 2010 +++ src/tests/fs/vfs/Makefile Thu Sep 23 09:39:14 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2010/08/19 02:36:02 pooka Exp $ +# $NetBSD: Makefile,v 1.12 2010/09/23 09:39:14 he Exp $ # .include bsd.own.mk @@ -17,18 +17,20 @@ LDADD+=-lrumpfs_ffs # ffs LDADD+=-lrumpfs_lfs # lfs LDADD+=-lrumpfs_msdos # msdos -LDADD+=-lrumpfs_nfs # NFS LDADD+=-lrumpfs_syspuffs # puffs LDADD+=-lrumpdev_putter -lrumpdev# \ putter LDADD+=-lrumpfs_sysvbfs # sysvbfs LDADD+=-lrumpfs_tmpfs # tmpfs LDADD+=-lrumpdev_disk -lrumpdev # disk device -LDADD+=-lrumpnet_shmif -lrumpnet_netinet -lrumpnet_net -lrumpnet -LDADD+=-lrumpvfs -lrump -lrumpuser -lpthread # base -LDADD+=-lutil VFSTESTDIR != cd ${.CURDIR}/../common ${PRINTOBJDIR} LDADD+=-L${VFSTESTDIR} -lvfstest +LDADD+=-lrumpfs_nfs # NFS +LDADD+=-lrumpnet_shmif -lrumpnet_netinet -lrumpnet_net -lrumpnet +LDADD+=-lrumpvfs -lrump -lrumpuser -lpthread # base + +LDADD+=-lutil + .include bsd.test.mk
CVS commit: src/external/bsd/iscsi/initiator
Module Name:src Committed By: he Date: Thu Sep 23 09:40:23 UTC 2010 Modified Files: src/external/bsd/iscsi/initiator: Makefile Log Message: Don't depend on shared library dependencies; we also need -lpuffs here. This allows us to link statically. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/iscsi/initiator/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/iscsi/initiator/Makefile diff -u src/external/bsd/iscsi/initiator/Makefile:1.2 src/external/bsd/iscsi/initiator/Makefile:1.3 --- src/external/bsd/iscsi/initiator/Makefile:1.2 Thu Jun 25 13:47:11 2009 +++ src/external/bsd/iscsi/initiator/Makefile Thu Sep 23 09:40:23 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2009/06/25 13:47:11 agc Exp $ +# $NetBSD: Makefile,v 1.3 2010/09/23 09:40:23 he Exp $ .sinclude ${.CURDIR}/../Makefile.inc @@ -11,8 +11,8 @@ PROG=iscsi-initiator SRCS=iscsi-initiator.c virtdir.c libkmod.c -LDADD+= -lrefuse -liscsi -DPADD+= ${LIBREFUSE} ${LIBISCSI} +LDADD+= -lrefuse -liscsi -lpuffs +DPADD+= ${LIBREFUSE} ${LIBISCSI} ${LIBPUFFS} CPPFLAGS+= -I${ISCSIDIST}/include CPPFLAGS+= -pthread LDFLAGS+= -pthread
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: he Date: Thu Sep 23 09:42:18 UTC 2010 Modified Files: src/distrib/sets/lists/tests: mi Added Files: src/distrib/sets/lists/tests: shl.mi Log Message: Move shared library bits of the tests out to shl.mi, so that sun2, which only does static linking, can complete the build. To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/distrib/sets/lists/tests/mi cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/tests/shl.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.144 src/distrib/sets/lists/tests/mi:1.145 --- src/distrib/sets/lists/tests/mi:1.144 Thu Sep 9 22:20:09 2010 +++ src/distrib/sets/lists/tests/mi Thu Sep 23 09:42:17 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.144 2010/09/09 22:20:09 christos Exp $ +# $NetBSD: mi,v 1.145 2010/09/23 09:42:17 he Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -281,7 +281,6 @@ ./usr/libdata/debug/usr/tests/lib/csu/h_initfini1.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/csu/h_initfini2.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/csu/h_initfini3.debug tests-lib-debug debug,atf -./usr/libdata/debug/usr/tests/lib/csu/libh_initfini3_dso.so.1.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libc tests-lib-debug ./usr/libdata/debug/usr/tests/lib/libc/gentests-lib-debug ./usr/libdata/debug/usr/tests/lib/libc/gen/t_glob_star.debug tests-lib-debug debug,atf @@ -1420,10 +1419,6 @@ ./usr/tests/lib/csu/h_initfini1 tests-lib-tests atf ./usr/tests/lib/csu/h_initfini2 tests-lib-tests atf ./usr/tests/lib/csu/h_initfini3 tests-lib-tests atf -./usr/tests/lib/csu/h_initfini3_dso.so tests-lib-tests atf -./usr/tests/lib/csu/h_initfini3_dso.so.1 tests-lib-tests atf -./usr/tests/lib/csu/libh_initfini3_dso.so tests-obsolete obsolete -./usr/tests/lib/csu/libh_initfini3_dso.so.1 tests-obsolete obsolete ./usr/tests/lib/csu/t_crt0 tests-lib-tests atf ./usr/tests/lib/libctests-lib-tests ./usr/tests/lib/libc/Atffile tests-lib-tests atf Added files: Index: src/distrib/sets/lists/tests/shl.mi diff -u /dev/null src/distrib/sets/lists/tests/shl.mi:1.1 --- /dev/null Thu Sep 23 09:42:18 2010 +++ src/distrib/sets/lists/tests/shl.mi Thu Sep 23 09:42:18 2010 @@ -0,0 +1,13 @@ +# $NetBSD: shl.mi,v 1.1 2010/09/23 09:42:18 he Exp $ +# +./usr/libdata/debug/usr/tests/lib/csu/h_initfini3_dso.so.1.debug tests-lib-debug debug,atf +./usr/libdata/debug/usr/tests/lib/csu/libh_initfini3_dso.so.1.debug tests-obsolete obsolete +./usr/tests/lib/csu/h_initfini3_dso.so.1 tests-lib-tests atf +./usr/tests/lib/csu/libh_initfini3_dso.so.1 tests-obsolete obsolete +./usr/tests/util/id/libfake.so.0 tests-obsolete obsolete +./usr/tests/util/id/libfake.so.0.0 tests-obsolete obsolete +./usr/libdata/debug/usr/tests/lib/csu/libh_initfini3_dso.so.1.debug tests-lib-debug debug,atf +./usr/tests/lib/csu/h_initfini3_dso.so tests-lib-tests atf +./usr/tests/lib/csu/h_initfini3_dso.so.1 tests-lib-tests atf +./usr/tests/lib/csu/libh_initfini3_dso.so tests-obsolete obsolete +./usr/tests/lib/csu/libh_initfini3_dso.so.1 tests-obsolete obsolete
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: kiyohara Date: Thu Sep 23 12:03:27 UTC 2010 Modified Files: src/sys/dev/sdmmc: ld_sdmmc.c sdmmc_mem.c sdmmcvar.h Log Message: Print bus width and clock for feature(High speed support). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sdmmc/ld_sdmmc.c \ src/sys/dev/sdmmc/sdmmcvar.h cvs rdiff -u -r1.10 -r1.11 src/sys/dev/sdmmc/sdmmc_mem.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/sdmmc/ld_sdmmc.c diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.5 src/sys/dev/sdmmc/ld_sdmmc.c:1.6 --- src/sys/dev/sdmmc/ld_sdmmc.c:1.5 Mon Sep 20 09:03:33 2010 +++ src/sys/dev/sdmmc/ld_sdmmc.c Thu Sep 23 12:03:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_sdmmc.c,v 1.5 2010/09/20 09:03:33 kiyohara Exp $ */ +/* $NetBSD: ld_sdmmc.c,v 1.6 2010/09/23 12:03:27 kiyohara Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ld_sdmmc.c,v 1.5 2010/09/20 09:03:33 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: ld_sdmmc.c,v 1.6 2010/09/23 12:03:27 kiyohara Exp $); #include rnd.h @@ -146,8 +146,16 @@ { struct ld_sdmmc_softc *sc = (struct ld_sdmmc_softc *)arg; struct ld_softc *ld = sc-sc_ld; + struct sdmmc_softc *ssc = device_private(device_parent(ld-sc_dv)); ldattach(ld); + aprint_normal_dev(ld-sc_dv, %d-bit width, bus clock, + sc-sc_sf-width); + if ((ssc-sc_busclk / 1000) != 0) + aprint_normal( %u.%03u MHz\n, + ssc-sc_busclk / 1000, ssc-sc_busclk % 1000); + else + aprint_normal( %u KHz\n, ssc-sc_busclk % 1000); kthread_exit(0); } Index: src/sys/dev/sdmmc/sdmmcvar.h diff -u src/sys/dev/sdmmc/sdmmcvar.h:1.5 src/sys/dev/sdmmc/sdmmcvar.h:1.6 --- src/sys/dev/sdmmc/sdmmcvar.h:1.5 Wed Sep 22 04:32:53 2010 +++ src/sys/dev/sdmmc/sdmmcvar.h Thu Sep 23 12:03:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmcvar.h,v 1.5 2010/09/22 04:32:53 kiyohara Exp $ */ +/* $NetBSD: sdmmcvar.h,v 1.6 2010/09/23 12:03:27 kiyohara Exp $ */ /* $OpenBSD: sdmmcvar.h,v 1.13 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -161,6 +161,7 @@ /* common members */ struct sdmmc_softc *sc; /* card slot softc */ uint16_t rca; /* relative card address */ + int width; /* bus width */ int flags; #define SFF_ERROR 0x0001 /* function is poo; ignore it */ #define SFF_SDHC 0x0002 /* SD High Capacity card */ Index: src/sys/dev/sdmmc/sdmmc_mem.c diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.10 src/sys/dev/sdmmc/sdmmc_mem.c:1.11 --- src/sys/dev/sdmmc/sdmmc_mem.c:1.10 Tue Sep 21 04:53:53 2010 +++ src/sys/dev/sdmmc/sdmmc_mem.c Thu Sep 23 12:03:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc_mem.c,v 1.10 2010/09/21 04:53:53 kiyohara Exp $ */ +/* $NetBSD: sdmmc_mem.c,v 1.11 2010/09/23 12:03:27 kiyohara Exp $ */ /* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -46,7 +46,7 @@ /* Routines for SD/MMC memory cards. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sdmmc_mem.c,v 1.10 2010/09/21 04:53:53 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: sdmmc_mem.c,v 1.11 2010/09/23 12:03:27 kiyohara Exp $); #include sys/param.h #include sys/kernel.h @@ -453,6 +453,7 @@ } /* change bus width if supported */ + sf-width = 1; if (ISSET(sc-sc_flags, SMF_SD_MODE)) { error = sdmmc_mem_send_scr(sc, sf, sf-raw_scr); if (error) { @@ -470,7 +471,9 @@ if (error) { DPRINTF((%s: can't change bus width (%d bit)\n, SDMMCDEVNAME(sc), 4)); +goto out; } + sf-width = 4; } } else if (sf-csd.mmcver = MMC_CSD_MMCVER_4_0) { if (ISSET(sc-sc_caps, SMC_CAPS_8BIT_MODE)) { @@ -497,6 +500,8 @@ } /* : need bus test? (using by CMD14 CMD19) */ + + sf-width = width; } }
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: njoly Date: Thu Sep 23 12:49:31 UTC 2010 Modified Files: src/lib/libc/stdlib: getenv.3 Log Message: Add empty line in ERRORS section. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libc/stdlib/getenv.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdlib/getenv.3 diff -u src/lib/libc/stdlib/getenv.3:1.19 src/lib/libc/stdlib/getenv.3:1.20 --- src/lib/libc/stdlib/getenv.3:1.19 Mon Sep 26 10:56:54 2005 +++ src/lib/libc/stdlib/getenv.3 Thu Sep 23 12:49:31 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: getenv.3,v 1.19 2005/09/26 10:56:54 wiz Exp $ +.\ $NetBSD: getenv.3,v 1.20 2010/09/23 12:49:31 njoly Exp $ .\ .\ Copyright (c) 1988, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -165,6 +165,7 @@ .Fn putenv failed because they were unable to allocate memory for the environment. .El +.Pp The function .Fn getenv_r can return the following errors:
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: joerg Date: Thu Sep 23 13:03:35 UTC 2010 Modified Files: src/libexec/ld.elf_so: headers.c Log Message: Avoid casting from d_val to plttype of different signedness. Just two booleans for the same purpose. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/libexec/ld.elf_so/headers.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/ld.elf_so/headers.c diff -u src/libexec/ld.elf_so/headers.c:1.29 src/libexec/ld.elf_so/headers.c:1.30 --- src/libexec/ld.elf_so/headers.c:1.29 Mon Apr 5 14:01:26 2010 +++ src/libexec/ld.elf_so/headers.c Thu Sep 23 13:03:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: headers.c,v 1.29 2010/04/05 14:01:26 joerg Exp $ */ +/* $NetBSD: headers.c,v 1.30 2010/09/23 13:03:35 joerg Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: headers.c,v 1.29 2010/04/05 14:01:26 joerg Exp $); +__RCSID($NetBSD: headers.c,v 1.30 2010/09/23 13:03:35 joerg Exp $); #endif /* not lint */ #include err.h @@ -69,7 +69,8 @@ Elf_Dyn*dynp; Needed_Entry **needed_tail = obj-needed; const Elf_Dyn *dyn_rpath = NULL; - Elf_Sword plttype = DT_NULL; + bool use_pltrel = false; + bool use_pltrela = false; Elf_Addrrelsz = 0, relasz = 0; Elf_Addr pltrel = 0, pltrelsz = 0; Elf_Addr init = 0, fini = 0; @@ -112,8 +113,9 @@ break; case DT_PLTREL: - plttype = dynp-d_un.d_val; - assert(plttype == DT_REL || plttype == DT_RELA); + use_pltrel = dynp-d_un.d_val == DT_REL; + use_pltrela = dynp-d_un.d_val == DT_RELA; + assert(use_pltrel || use_pltrela); break; case DT_SYMTAB: @@ -248,7 +250,7 @@ obj-rellim = (const Elf_Rel *)((const uint8_t *)obj-rel + relsz); obj-relalim = (const Elf_Rela *)((const uint8_t *)obj-rela + relasz); - if (plttype == DT_REL) { + if (use_pltrel) { obj-pltrel = (const Elf_Rel *)(obj-relocbase + pltrel); obj-pltrellim = (const Elf_Rel *)(obj-relocbase + pltrel + pltrelsz); obj-pltrelalim = 0; @@ -258,7 +260,7 @@ obj-rellim obj-pltrel obj-rellim = obj-pltrellim) obj-rellim = obj-pltrel; - } else if (plttype == DT_RELA) { + } else if (use_pltrela) { obj-pltrela = (const Elf_Rela *)(obj-relocbase + pltrel); obj-pltrellim = 0; obj-pltrelalim = (const Elf_Rela *)(obj-relocbase + pltrel + pltrelsz);
CVS commit: src
Module Name:src Committed By: manu Date: Thu Sep 23 16:02:34 UTC 2010 Modified Files: src/lib/libperfuse: debug.c ops.c perfuse.c perfuse_if.h perfuse_priv.h subr.c src/usr.sbin/perfused: perfused.c Log Message: == file close operations == - use PUFFS_KFLAG_WTCACHE to puffs_init so that all writes are immediatly send to the filesystem, and we do not have anymore write after inactive. As a consequence, we can close files at inactive stage, and there is not any concern left with files opened at create time. We also do not have anymore to open ourselves in readdir and fsync. - Fsync on close (inactive stage). That makes sure we will not need to do these operations once the file is closed (FUSE want an open file). short sircuit the request that come after the close, bu not fsinc'ing closed files, - Use PUFFS_KFLAG_IAONDEMAND to get less inactive calls == Removed nodes == - more ENOENT retunred for operations on removed node (but there are probably some still missing): getattr, ooen, setattr, fsync - set PND_REMOVE before sending the UNLINK/RMDIR operations so that we avoid races during UNLINK completion. Also set PND_REMOVED on node we overwirte in rename == Filehandle fixes == - queue open operation to avoid getting two fh for one file - set FH in getattr, if the file is open - Just requires a read FH for fsyncdir, as we always opendir in read mode. Ok, this is misleading :-) == Misc == - do not set FUSE_FATTR_ATIME_NOW in setattr, as we provide the time - short circuit nilpotent operations in setattr - add a filename diagnostic flag to dump file names To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libperfuse/debug.c cvs rdiff -u -r1.16 -r1.17 src/lib/libperfuse/ops.c cvs rdiff -u -r1.7 -r1.8 src/lib/libperfuse/perfuse.c cvs rdiff -u -r1.8 -r1.9 src/lib/libperfuse/perfuse_if.h cvs rdiff -u -r1.11 -r1.12 src/lib/libperfuse/perfuse_priv.h cvs rdiff -u -r1.5 -r1.6 src/lib/libperfuse/subr.c cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/perfused/perfused.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/debug.c diff -u src/lib/libperfuse/debug.c:1.2 src/lib/libperfuse/debug.c:1.3 --- src/lib/libperfuse/debug.c:1.2 Wed Sep 15 01:51:43 2010 +++ src/lib/libperfuse/debug.c Thu Sep 23 16:02:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: debug.c,v 1.2 2010/09/15 01:51:43 manu Exp $ */ +/* $NetBSD: debug.c,v 1.3 2010/09/23 16:02:34 manu Exp $ */ /*- * Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved. @@ -79,7 +79,13 @@ { 0, UNKNOWN }, }; -const char *perfuse_qtypestr[] = { READDIR, READ, WRITE, AFTERWRITE }; +const char *perfuse_qtypestr[] = { + READDIR, + READ, + WRITE, + AFTERWRITE, + OPEN +}; const char * perfuse_opname(opcode) Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.16 src/lib/libperfuse/ops.c:1.17 --- src/lib/libperfuse/ops.c:1.16 Mon Sep 20 07:00:21 2010 +++ src/lib/libperfuse/ops.c Thu Sep 23 16:02:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.16 2010/09/20 07:00:21 manu Exp $ */ +/* $NetBSD: ops.c,v 1.17 2010/09/23 16:02:34 manu Exp $ */ /*- * Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved. @@ -180,9 +180,10 @@ ps = puffs_getspecific(pu); #ifdef PERFUSE_DEBUG - if ((perfuse_diagflags PDF_FUSE) (opc != 0)) - DPRINTF(file = \%s\\n, - (char *)PNPATH((struct puffs_node *)opc)); + if ((perfuse_diagflags PDF_FILENAME) (opc != 0)) + DPRINTF(file = \%s\ flags = 0x%x\n, + (char *)PNPATH((struct puffs_node *)opc), + PERFUSE_NODE_DATA(opc)-pnd_flags); #endif error = ps-ps_xchg_msg(pu, pm, len, wait); @@ -324,6 +325,11 @@ if (pnp != NULL) *pnp = pn; +#ifdef PERFUSE_DEBUG + if (perfuse_diagflags PDF_FILENAME) + DPRINTF(%s: opc = %p, looked up opc = %p, file = \%s\\n, + __func__, (void *)opc, pn, (char *)PNPATH(pn)); +#endif out: ps-ps_destroy_msg(pm); @@ -989,13 +995,6 @@ if (error != 0) return error; - /* - * This node has been open in the filesystem, - * but not by the kernel. We will have to close - * it on our own to avoid a leak - */ - PERFUSE_NODE_DATA(opc)-pnd_flags |= PND_OPENFS; - return 0; } @@ -1030,17 +1029,9 @@ * so that we can reuse it later */ pn = perfuse_new_pn(pu, opc); - perfuse_new_fh(pu, (puffs_cookie_t)pn, foo-fh, FWRITE); + perfuse_new_fh((puffs_cookie_t)pn, foo-fh, FWRITE); PERFUSE_NODE_DATA(pn)-pnd_ino = feo-nodeid; -#ifdef PERFUSE_DEBUG - if (perfuse_diagflags PDF_FH) - DPRINTF(%s: opc = %p, file = \%s\, - ino = %PRId64, rfh = 0x%PRIx64\n, - __func__, (void *)pn, (char *)PCNPATH(pcn), - feo-nodeid, foo-fh); -#endif - fuse_attr_to_vap(ps, pn-pn_va, feo-attr); puffs_newinfo_setcookie(pni, pn); @@ -1049,12 +1040,13 @@ */ PERFUSE_NODE_DATA(opc)-pnd_flags |= PND_DIRTY; - /* - * This node has been open in the filesystem, - * but not by the kernel. We will have to
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: christos Date: Thu Sep 23 16:02:41 UTC 2010 Modified Files: src/lib/libc/stdlib: setenv.c Log Message: PR/43899: Nicolas Joly: setenv(3)/unsetenv(3) memory leak. Partial fix: Don't allocate a new string if the length is equal to the old length, because presumably the old string was also nul terminated so it has the extra byte needed. The real fix is to keep an adjunct array of bits, one for each environment variable and keep track if the entry was allocated or not so that we can free it in unsetenv. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/lib/libc/stdlib/setenv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdlib/setenv.c diff -u src/lib/libc/stdlib/setenv.c:1.32 src/lib/libc/stdlib/setenv.c:1.33 --- src/lib/libc/stdlib/setenv.c:1.32 Wed Dec 2 04:34:51 2009 +++ src/lib/libc/stdlib/setenv.c Thu Sep 23 12:02:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: setenv.c,v 1.32 2009/12/02 09:34:51 enami Exp $ */ +/* $NetBSD: setenv.c,v 1.33 2010/09/23 16:02:41 christos Exp $ */ /* * Copyright (c) 1987, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)setenv.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: setenv.c,v 1.32 2009/12/02 09:34:51 enami Exp $); +__RCSID($NetBSD: setenv.c,v 1.33 2010/09/23 16:02:41 christos Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -82,7 +82,7 @@ if ((c = __findenv(name, offset)) != NULL) { if (!rewrite) goto good; - if (strlen(c) = l_value) /* old larger; copy over */ + if (strlen(c) l_value) /* old larger; copy over */ goto copy; } else { /* create new slot */ size = (size_t)(sizeof(char *) * (offset + 2));
CVS commit: src/tests/lib/libc/stdlib
Module Name:src Committed By: christos Date: Thu Sep 23 17:38:08 UTC 2010 Modified Files: src/tests/lib/libc/stdlib: Makefile Added Files: src/tests/lib/libc/stdlib: t_environment.c Log Message: unit test for environment. Grr, someone should make fixing the sets easier otherwise people are not going to want to write unit-tests. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/stdlib/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/stdlib/t_environment.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/stdlib/Makefile diff -u src/tests/lib/libc/stdlib/Makefile:1.1 src/tests/lib/libc/stdlib/Makefile:1.2 --- src/tests/lib/libc/stdlib/Makefile:1.1 Mon Jul 20 13:03:38 2009 +++ src/tests/lib/libc/stdlib/Makefile Thu Sep 23 13:38:08 2010 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.1 2009/07/20 17:03:38 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2010/09/23 17:38:08 christos Exp $ .include bsd.own.mk TESTSDIR= ${TESTSBASE}/lib/libc/stdlib -TESTS_C+= t_mi_vector_hash +TESTS_C+= t_mi_vector_hash t_environment .include bsd.test.mk Added files: Index: src/tests/lib/libc/stdlib/t_environment.c diff -u /dev/null src/tests/lib/libc/stdlib/t_environment.c:1.1 --- /dev/null Thu Sep 23 13:38:08 2010 +++ src/tests/lib/libc/stdlib/t_environment.c Thu Sep 23 13:38:08 2010 @@ -0,0 +1,74 @@ +/* $NetBSD: t_environment.c,v 1.1 2010/09/23 17:38:08 christos Exp $ */ +/*- + * Copyright (c) 2010 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in + *the documentation and/or other materials provided with the + *distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include sys/cdefs.h +__RCSID($NetBSD: t_environment.c,v 1.1 2010/09/23 17:38:08 christos Exp $); + +#include atf-c.h +#include stdio.h +#include stdlib.h +#include string.h + +ATF_TC(t_environment); + +ATF_TC_HEAD(t_environment, tc) +{ + atf_tc_set_md_var(tc, descr, + Test setenv(3), getenv(3), unsetenv(3)); +} + +ATF_TC_BODY(t_environment, tc) +{ + size_t i; + char name[1024]; + char value[1024]; + for (i = 0; i 10240; i++) { + snprintf(name, sizeof(name), var%zu, i); + snprintf(value, sizeof(value), value%ld, lrand48()); + setenv(name, value, 1); + ATF_CHECK_STREQ(getenv(name), value); + } + + for (i = 0; i 10240; i++) { + snprintf(name, sizeof(name), var%zu, i); + unsetenv(name); + ATF_CHECK(getenv(name) == NULL); + } +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, t_environment); + + return atf_no_error(); +}
CVS commit: src/sys/net
Module Name:src Committed By: christos Date: Thu Sep 23 21:16:42 UTC 2010 Modified Files: src/sys/net: if.c Log Message: prevent integer oveflow. From Maksymilian Arciemowicz To generate a diff of this commit: cvs rdiff -u -r1.244 -r1.245 src/sys/net/if.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/net/if.c diff -u src/sys/net/if.c:1.244 src/sys/net/if.c:1.245 --- src/sys/net/if.c:1.244 Sat Jun 12 04:12:03 2010 +++ src/sys/net/if.c Thu Sep 23 17:16:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.244 2010/06/12 08:12:03 skrll Exp $ */ +/* $NetBSD: if.c,v 1.245 2010/09/23 21:16:42 christos Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if.c,v 1.244 2010/06/12 08:12:03 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: if.c,v 1.245 2010/09/23 21:16:42 christos Exp $); #include opt_inet.h @@ -981,7 +981,7 @@ unit = 0; while (cp - name IFNAMSIZ *cp) { - if (*cp '0' || *cp '9' || unit INT_MAX / 10) { + if (*cp '0' || *cp '9' || unit = INT_MAX / 10) { /* Bogus unit number. */ return NULL; }
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Thu Sep 23 21:34:14 UTC 2010 Modified Files: src/doc: 3RDPARTY Log Message: GNU grep-2.7 out. To generate a diff of this commit: cvs rdiff -u -r1.777 -r1.778 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.777 src/doc/3RDPARTY:1.778 --- src/doc/3RDPARTY:1.777 Sun Sep 5 20:27:19 2010 +++ src/doc/3RDPARTY Thu Sep 23 21:34:14 2010 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.777 2010/09/05 20:27:19 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.778 2010/09/23 21:34:14 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -390,7 +390,7 @@ Package: grep Version: 2.5.1 -Current Vers: 2.5.4 +Current Vers: 2.7 Maintainer: FSF Archive Site: ftp://ftp.gnu.org/gnu/grep/ Home Page: http://www.gnu.org/software/grep/