CVS commit: src/external/gpl3/gcc/dist/gcc/config/arm
Module Name:src Committed By: matt Date: Fri Jan 25 08:31:43 UTC 2013 Modified Files: src/external/gpl3/gcc/dist/gcc/config/arm: arm.h Log Message: Make GCC define __ARM_PCS and __ARM_PCS_VFP as defined by the ARM C Language Extentions (clang already defines them): __ARM_PCS is defined to 1 if the default procedure calling standard for the translation unit conforms to the base PCS defined in [AAPCS]. __ARM_PCS_VFP is defined to 1 if the default is to pass floating-point parameters in hardware floating-point registers using the VFP variant PCS defined in [AAPCS]. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 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.2 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.3 --- src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.2 Fri Jul 1 01:23:23 2011 +++ src/external/gpl3/gcc/dist/gcc/config/arm/arm.h Fri Jan 25 08:31:43 2013 @@ -94,7 +94,12 @@ extern char arm_arch_name[]; if (arm_arch_iwmmxt)\ builtin_define (__IWMMXT__); \ if (TARGET_AAPCS_BASED)\ - builtin_define (__ARM_EABI__); \ + { \ + builtin_define (__ARM_EABI__); \ + builtin_define (__ARM_PCS); \ + if (TARGET_HARD_FLOAT TARGET_VFP) \ + builtin_define (__ARM_PCS_VFP); \ + } \ } while (0) /* The various ARM cores. */
CVS commit: src/gnu/dist/gcc4/gcc/config/arm
Module Name:src Committed By: matt Date: Fri Jan 25 08:32:04 UTC 2013 Modified Files: src/gnu/dist/gcc4/gcc/config/arm: arm.h Log Message: Make GCC define __ARM_PCS and __ARM_PCS_VFP as defined by the ARM C Language Extentions (clang already defines them): __ARM_PCS is defined to 1 if the default procedure calling standard for the translation unit conforms to the base PCS defined in [AAPCS]. __ARM_PCS_VFP is defined to 1 if the default is to pass floating-point parameters in hardware floating-point registers using the VFP variant PCS defined in [AAPCS]. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/gcc4/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/gnu/dist/gcc4/gcc/config/arm/arm.h diff -u src/gnu/dist/gcc4/gcc/config/arm/arm.h:1.1.1.1 src/gnu/dist/gcc4/gcc/config/arm/arm.h:1.2 --- src/gnu/dist/gcc4/gcc/config/arm/arm.h:1.1.1.1 Thu Apr 20 09:50:52 2006 +++ src/gnu/dist/gcc4/gcc/config/arm/arm.h Fri Jan 25 08:32:04 2013 @@ -77,7 +77,12 @@ extern char arm_arch_name[]; if (arm_arch_iwmmxt)\ builtin_define (__IWMMXT__); \ if (TARGET_AAPCS_BASED)\ - builtin_define (__ARM_EABI__); \ + { \ + builtin_define (__ARM_EABI__); \ + builtin_define (__ARM_PCS); \ + if (TARGET_HARD_FLOAT TARGET_VFP) \ + builtin_define (__ARM_PCS_VFP); \ + } \ } while (0) /* The various ARM cores. */
CVS commit: [matt-nb6-plus] src/gnu/dist/gcc4/gcc/config/arm
Module Name:src Committed By: matt Date: Fri Jan 25 08:50:06 UTC 2013 Modified Files: src/gnu/dist/gcc4/gcc/config/arm [matt-nb6-plus]: arm.h Log Message: Pullup from HEAD: Make GCC define __ARM_PCS and __ARM_PCS_VFP as defined by the ARM C Language Extentions (clang already defines them): __ARM_PCS is defined to 1 if the default procedure calling standard for the translation unit conforms to the base PCS defined in [AAPCS]. __ARM_PCS_VFP is defined to 1 if the default is to pass floating-point parameters in hardware floating-point registers using the VFP variant PCS defined in [AAPCS]. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.1.1.1.46.1 src/gnu/dist/gcc4/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/gnu/dist/gcc4/gcc/config/arm/arm.h diff -u src/gnu/dist/gcc4/gcc/config/arm/arm.h:1.1.1.1 src/gnu/dist/gcc4/gcc/config/arm/arm.h:1.1.1.1.46.1 --- src/gnu/dist/gcc4/gcc/config/arm/arm.h:1.1.1.1 Thu Apr 20 09:50:52 2006 +++ src/gnu/dist/gcc4/gcc/config/arm/arm.h Fri Jan 25 08:50:06 2013 @@ -77,7 +77,12 @@ extern char arm_arch_name[]; if (arm_arch_iwmmxt)\ builtin_define (__IWMMXT__); \ if (TARGET_AAPCS_BASED)\ - builtin_define (__ARM_EABI__); \ + { \ + builtin_define (__ARM_EABI__); \ + builtin_define (__ARM_PCS); \ + if (TARGET_HARD_FLOAT TARGET_VFP) \ + builtin_define (__ARM_PCS_VFP); \ + } \ } while (0) /* The various ARM cores. */
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Fri Jan 25 08:52:16 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: _setjmp.S setjmp.S Log Message: Use __ARM_PCS_VFP to determine whether the VFP is being used. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/arm/gen/_setjmp.S cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/arm/gen/setjmp.S 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/arch/arm/gen/_setjmp.S diff -u src/lib/libc/arch/arm/gen/_setjmp.S:1.8 src/lib/libc/arch/arm/gen/_setjmp.S:1.9 --- src/lib/libc/arch/arm/gen/_setjmp.S:1.8 Fri Jan 11 13:55:25 2013 +++ src/lib/libc/arch/arm/gen/_setjmp.S Fri Jan 25 08:52:16 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: _setjmp.S,v 1.8 2013/01/11 13:55:25 matt Exp $ */ +/* $NetBSD: _setjmp.S,v 1.9 2013/01/25 08:52:16 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -32,7 +32,7 @@ * SUCH DAMAGE. */ -#if !defined(__SOFTFP__) !defined(__VFP_FP__) +#if !defined(__SOFTFP__) !defined(__VFP_FP__) !defined(__ARM_PCS) #error FPA is not supported anymore #endif @@ -56,12 +56,12 @@ ENTRY(_setjmp) ldr r1, .L_setjmp_magic str r1, [r0] -#ifndef __SOFTFP__ +#ifdef __ARM_PCS_VFP add r1, r0, #(_JB_REG_D8 * 4) vstmia r1, {d8-d15} vmrs r1, fpscr str r1, [r0, #(_JB_REG_FPSCR * 4)] -#endif +#endif /* __ARM_PCS_VFP */ add r0, r0, #(_JB_REG_R4 * 4) /* Store integer registers */ @@ -71,10 +71,10 @@ ENTRY(_setjmp) RET .L_setjmp_magic: -#ifdef __SOFTFP__ - .word _JB_MAGIC__SETJMP -#else +#ifdef __ARM_PCS_VFP .word _JB_MAGIC__SETJMP_VFP +#else + .word _JB_MAGIC__SETJMP #endif ENTRY(_longjmp) @@ -83,12 +83,12 @@ ENTRY(_longjmp) teq r2, r3 bne botch -#ifndef __SOFTFP__ +#ifdef __ARM_PCS_VFP add r1, r0, #(_JB_REG_D8 * 4) vldmia r1, {d8-d15} ldr r1, [r0, #(_JB_REG_FPSCR * 4)] vmsr fpscr, r1 -#endif +#endif /* __ARM_PCS_VFP */ add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */ Index: src/lib/libc/arch/arm/gen/setjmp.S diff -u src/lib/libc/arch/arm/gen/setjmp.S:1.10 src/lib/libc/arch/arm/gen/setjmp.S:1.11 --- src/lib/libc/arch/arm/gen/setjmp.S:1.10 Fri Jan 11 13:55:25 2013 +++ src/lib/libc/arch/arm/gen/setjmp.S Fri Jan 25 08:52:16 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: setjmp.S,v 1.10 2013/01/11 13:55:25 matt Exp $ */ +/* $NetBSD: setjmp.S,v 1.11 2013/01/25 08:52:16 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -32,7 +32,7 @@ * SUCH DAMAGE. */ -#if !defined(__SOFTFP__) !defined(__VFP_FP__) +#if !defined(__SOFTFP__) !defined(__VFP_FP__) !defined(__ARM_PCS) #error FPA is not supported anymore #endif @@ -61,12 +61,12 @@ ENTRY(__setjmp14) ldr r1, .Lsetjmp_magic str r1, [r0] -#ifndef __SOFTFP__ +#ifdef __ARM_PCS_VFP add r1, r0, #(_JB_REG_D8 * 4) vstmia r1, {d8-d15} vmrs r1, fpscr str r1, [r0, #(_JB_REG_FPSCR * 4)] -#endif /* !__SOFTFP__ */ +#endif /* __ARM_PCS_VFP */ /* Store integer registers */ add r0, r0, #(_JB_REG_R4 * 4) @@ -75,10 +75,10 @@ ENTRY(__setjmp14) RET .Lsetjmp_magic: -#ifdef __SOFTFP__ - .word _JB_MAGIC_SETJMP -#else +#ifdef __ARM_PCS_VFP .word _JB_MAGIC_SETJMP_VFP +#else + .word _JB_MAGIC_SETJMP #endif @@ -96,12 +96,12 @@ ENTRY(__longjmp14) bl PIC_SYM(_C_LABEL(__sigprocmask14), PLT) ldmfd sp!, {r0-r2, r14} -#ifndef __SOFTFP__ +#ifdef __ARM_PCS_VFP add r1, r0, #(_JB_REG_D8 * 4) vldmia r1, {d8-d15} ldr r1, [r0, #(_JB_REG_FPSCR * 4)] vmsr fpscr, r1 -#endif /* !__SOFTFP__ */ +#endif /* __ARM_PCS_VFP */ add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */
CVS commit: src/sys/netinet6
Module Name:src Committed By: kefren Date: Fri Jan 25 10:33:53 UTC 2013 Modified Files: src/sys/netinet6: ip6_output.c Log Message: don't return hlim when asked for multicast loop flag To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/sys/netinet6/ip6_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/netinet6/ip6_output.c diff -u src/sys/netinet6/ip6_output.c:1.150 src/sys/netinet6/ip6_output.c:1.151 --- src/sys/netinet6/ip6_output.c:1.150 Sat Jul 21 14:52:40 2012 +++ src/sys/netinet6/ip6_output.c Fri Jan 25 10:33:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_output.c,v 1.150 2012/07/21 14:52:40 gdt Exp $ */ +/* $NetBSD: ip6_output.c,v 1.151 2013/01/25 10:33:53 kefren Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ip6_output.c,v 1.150 2012/07/21 14:52:40 gdt Exp $); +__KERNEL_RCSID(0, $NetBSD: ip6_output.c,v 1.151 2013/01/25 10:33:53 kefren Exp $); #include opt_inet.h #include opt_inet6.h @@ -2554,7 +2554,7 @@ ip6_getmoptions(struct sockopt *sopt, st case IPV6_MULTICAST_LOOP: if (im6o == NULL) - optval = ip6_defmcasthlim; + optval = IPV6_DEFAULT_MULTICAST_LOOP; else optval = im6o-im6o_multicast_loop;
CVS commit: src/lib/libc/regex
Module Name:src Committed By: wiz Date: Fri Jan 25 11:51:42 UTC 2013 Modified Files: src/lib/libc/regex: re_format.7 Log Message: Replace dagger (\(dg) with hash mark (#) for marking up differences. Dagger wasn't displayed on terminals and replaced with a minus, which was hard to read. Requested by agc. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/regex/re_format.7 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/regex/re_format.7 diff -u src/lib/libc/regex/re_format.7:1.9 src/lib/libc/regex/re_format.7:1.10 --- src/lib/libc/regex/re_format.7:1.9 Tue Apr 21 14:46:02 2009 +++ src/lib/libc/regex/re_format.7 Fri Jan 25 11:51:42 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: re_format.7,v 1.9 2009/04/21 14:46:02 joerg Exp $ +.\ $NetBSD: re_format.7,v 1.10 2013/01/25 11:51:42 wiz Exp $ .\ .\ Copyright (c) 1992, 1993, 1994 .\ The Regents of the University of California. All rights reserved. @@ -83,15 +83,15 @@ and obsolete REs (roughly those of Obsolete REs mostly exist for backward compatibility in some old programs; they will be discussed at the end. 1003.2 leaves some aspects of RE syntax and semantics open; -`\(dg' marks decisions on these aspects that +`#' marks decisions on these aspects that may not be fully portable to other 1003.2 implementations. .Pp -A (modern) RE is one\(dg or more non-empty\(dg +A (modern) RE is one# or more non-empty# .Em branches , separated by `|'. It matches anything that matches one of the branches. .Pp -A branch is one\(dg or more +A branch is one# or more .Em pieces , concatenated. It matches a match for the first, followed by a match for the second, etc. @@ -99,7 +99,7 @@ It matches a match for the first, follow A piece is an .Em atom possibly followed -by a single\(dg `*', `+', `?', or +by a single# `*', `+', `?', or .Em bound . An atom followed by `*' matches a sequence of 0 or more matches of the atom. An atom followed by `+' matches a sequence of 1 or more matches of the atom. @@ -110,7 +110,7 @@ A is `{' followed by an unsigned decimal integer, possibly followed by `,' possibly followed by another unsigned decimal integer, always followed by `}'. -The integers must lie between 0 and RE_DUP_MAX (255\(dg) inclusive, +The integers must lie between 0 and RE_DUP_MAX (255#) inclusive, and if there are two of them, the first may not exceed the second. An atom followed by a bound containing one integer .Em i @@ -133,19 +133,19 @@ through (inclusive) matches of the atom. .Pp An atom is a regular expression enclosed in `()' (matching a match for the -regular expression), an empty set of `()' (matching the null string)\(dg, a +regular expression), an empty set of `()' (matching the null string)#, a .Em bracket expression (see below), `.' (matching any single character), `^' (matching the null string at the beginning of a line), `$' (matching the null string at the end of a line), a `\e' followed by one of the characters `^.[$()|*+?{\e' (matching that character taken as an ordinary character), -a `\e' followed by any other character\(dg +a `\e' followed by any other character# (matching that character taken as an ordinary character, -as if the `\e' had not been present\(dg), +as if the `\e' had not been present#), or a single character with no other significance (matching that character). A `{' followed by a character other than a digit is an ordinary -character, not the beginning of a bound\(dg. +character, not the beginning of a bound#. It is illegal to end an RE with `\e'. .Pp A @@ -161,7 +161,7 @@ for the full .Em range of characters between those two (inclusive) in the collating sequence, e.g. `[0-9]' in ASCII matches any decimal digit. -It is illegal\(dg for two ranges to share an endpoint, e.g. `a-c-e'. +It is illegal# for two ranges to share an endpoint, e.g. `a-c-e'. Ranges are very collating-sequence-dependent, and portable programs should avoid relying on them. .Pp @@ -194,7 +194,7 @@ of all collating elements equivalent to the treatment is as if the enclosing delimiters were `[.' and `.]'.) For example, if o and '\(^o' are the members of an equivalence class, then `[[=o=]]', `[[=\(^o'=]]', and `[o\(^o']' are all synonymous. -An equivalence class may not\(dg be an endpoint +An equivalence class may not# be an endpoint of a range. .Pp Within a bracket expression, the name of a @@ -214,7 +214,7 @@ These stand for the character classes de A locale may provide others. A character class may not be used as an endpoint of a range. .Pp -There are two special cases\(dg of bracket expressions: +There are two special cases# of bracket expressions: the bracket expressions `[[:\*[Lt]:]]' and `[[:\*[Gt]:]]' match the null string at the beginning and end of a word respectively. A word is defined as a sequence of word characters @@ -260,7 +260,7 @@ When it appears inside a bracket
CVS commit: src/usr.bin/tput
Module Name:src Committed By: roy Date: Fri Jan 25 12:12:30 UTC 2013 Modified Files: src/usr.bin/tput: tput.c Log Message: Remove debug accidently commited. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/tput/tput.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/tput/tput.c diff -u src/usr.bin/tput/tput.c:1.23 src/usr.bin/tput/tput.c:1.24 --- src/usr.bin/tput/tput.c:1.23 Thu Jan 24 10:41:29 2013 +++ src/usr.bin/tput/tput.c Fri Jan 25 12:12:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: tput.c,v 1.23 2013/01/24 10:41:29 roy Exp $ */ +/* $NetBSD: tput.c,v 1.24 2013/01/25 12:12:30 roy Exp $ */ /*- * Copyright (c) 1980, 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = @(#)tput.c 8.3 (Berkeley) 4/28/95; #endif -__RCSID($NetBSD: tput.c,v 1.23 2013/01/24 10:41:29 roy Exp $); +__RCSID($NetBSD: tput.c,v 1.24 2013/01/25 12:12:30 roy Exp $); #endif /* not lint */ #include termios.h @@ -172,10 +172,6 @@ process(const char *cap, const char *str *tmp != '\0') errx(2, errnum, i + 1, *argv, cap); } - if (piss[i]) - printf (str %d %s\n, i, strs[i]); - else - printf (num %d %ld\n, i, nums[i]); } /* And output */
CVS commit: src/usr.bin/tput
Module Name:src Committed By: roy Date: Fri Jan 25 12:27:13 UTC 2013 Modified Files: src/usr.bin/tput: tput.c Log Message: If char * long then print a suitable error when passing a string parameter. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/tput/tput.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/tput/tput.c diff -u src/usr.bin/tput/tput.c:1.24 src/usr.bin/tput/tput.c:1.25 --- src/usr.bin/tput/tput.c:1.24 Fri Jan 25 12:12:30 2013 +++ src/usr.bin/tput/tput.c Fri Jan 25 12:27:13 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: tput.c,v 1.24 2013/01/25 12:12:30 roy Exp $ */ +/* $NetBSD: tput.c,v 1.25 2013/01/25 12:27:13 roy Exp $ */ /*- * Copyright (c) 1980, 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = @(#)tput.c 8.3 (Berkeley) 4/28/95; #endif -__RCSID($NetBSD: tput.c,v 1.24 2013/01/25 12:12:30 roy Exp $); +__RCSID($NetBSD: tput.c,v 1.25 2013/01/25 12:27:13 roy Exp $); #endif /* not lint */ #include termios.h @@ -145,6 +145,8 @@ process(const char *cap, const char *str Unknown %% escape (%s) for capability `%s'; static const char errnum[] = Expected a numeric argument [%d] (%s) for capability `%s'; + static const char errcharlong[] = + Platform does not fit a string into a long for capability '%s'; int i, nparams, piss[TPARM_MAX]; long nums[TPARM_MAX]; char *strs[TPARM_MAX], *tmp; @@ -160,9 +162,11 @@ process(const char *cap, const char *str for (i = 0; i nparams; i++) { if (*++argv == NULL || *argv[0] == '\0') errx(2, errfew, nparams, cap); - if (piss[i]) + if (piss[i]) { + if (sizeof(char *) sizeof(long) /* CONSTCOND */) +errx(2, errcharlong, cap); strs[i] = *argv; - else { + } else { errno = 0; nums[i] = strtol(*argv, tmp, 0); if ((errno == ERANGE
CVS commit: src/lib/libterminfo
Module Name:src Committed By: roy Date: Fri Jan 25 12:30:06 UTC 2013 Modified Files: src/lib/libterminfo: terminfo.3 tparm.c Log Message: For platforms where we cannot fit a char * into a long, return NULL and set errno to ENOTSUPP. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libterminfo/terminfo.3 cvs rdiff -u -r1.12 -r1.13 src/lib/libterminfo/tparm.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/libterminfo/terminfo.3 diff -u src/lib/libterminfo/terminfo.3:1.8 src/lib/libterminfo/terminfo.3:1.9 --- src/lib/libterminfo/terminfo.3:1.8 Tue Oct 4 11:01:14 2011 +++ src/lib/libterminfo/terminfo.3 Fri Jan 25 12:30:05 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: terminfo.3,v 1.8 2011/10/04 11:01:14 roy Exp $ +.\ $NetBSD: terminfo.3,v 1.9 2013/01/25 12:30:05 roy Exp $ .\ .\ Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd October 4, 2011 +.Dd January 25, 2013 .Dt TERMINFO 3 .Os .Sh NAME @@ -187,6 +187,12 @@ a pointer inside a .Vt long can use them. +For platforms which don't support this, +.Dv NULL +is returned and +.Va errno +is set to +.Er ENOTSUPP . The string encoding and parameter application is described in .Xr terminfo 5 . .Pp Index: src/lib/libterminfo/tparm.c diff -u src/lib/libterminfo/tparm.c:1.12 src/lib/libterminfo/tparm.c:1.13 --- src/lib/libterminfo/tparm.c:1.12 Thu Jan 24 10:41:28 2013 +++ src/lib/libterminfo/tparm.c Fri Jan 25 12:30:05 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: tparm.c,v 1.12 2013/01/24 10:41:28 roy Exp $ */ +/* $NetBSD: tparm.c,v 1.13 2013/01/25 12:30:05 roy Exp $ */ /* * Copyright (c) 2009, 2011, 2013 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: tparm.c,v 1.12 2013/01/24 10:41:28 roy Exp $); +__RCSID($NetBSD: tparm.c,v 1.13 2013/01/25 12:30:05 roy Exp $); #include sys/param.h #include assert.h @@ -223,12 +223,25 @@ _ti_tiparm(TERMINAL *term, const char *s /* Put our parameters into variables */ memset(params, 0, sizeof(params)); for (l = 0; l max; l++) { - if (piss[l]) - params[l].string = va_arg(parms, char *); - else if (va_long) - params[l].num = va_arg(parms, long); - else - params[l].num = (long)va_arg(parms, int); + if (piss[l]) { + if (va_long) { +/* This only works if char * fits into a long + * on this platform. */ +if (sizeof(char *) = sizeof(long)/*CONSTCOND*/) + params[l].string = + (char *)va_arg(parms, long); +else { + errno = ENOTSUP; + return NULL; +} + } else +params[l].string = va_arg(parms, char *); + } else { + if (va_long) +params[l].num = va_arg(parms, long); + else +params[l].num = (long)va_arg(parms, int); + } } memset(stack, 0, sizeof(stack));
CVS commit: src/lib/libterminfo
Module Name:src Committed By: roy Date: Fri Jan 25 12:52:45 UTC 2013 Modified Files: src/lib/libterminfo: genman term.h terminfo.5.in Log Message: Add descriptions for terminfo keys to term.h These are extracted by genman and placed into the compiled terminfo.5 Fixes PR lib/47090 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libterminfo/genman cvs rdiff -u -r1.12 -r1.13 src/lib/libterminfo/term.h cvs rdiff -u -r1.17 -r1.18 src/lib/libterminfo/terminfo.5.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libterminfo/genman diff -u src/lib/libterminfo/genman:1.4 src/lib/libterminfo/genman:1.5 --- src/lib/libterminfo/genman:1.4 Tue Oct 12 12:57:51 2010 +++ src/lib/libterminfo/genman Fri Jan 25 12:52:45 2013 @@ -1,7 +1,7 @@ #!/bin/sh -# $NetBSD: genman,v 1.4 2010/10/12 12:57:51 christos Exp $ +# $NetBSD: genman,v 1.5 2013/01/25 12:52:45 roy Exp $ -# Copyright (c) 2009 The NetBSD Foundation, Inc. +# Copyright (c) 2009, 2013 The NetBSD Foundation, Inc. # # This code is derived from software contributed to The NetBSD Foundation # by Roy Marples. @@ -47,7 +47,8 @@ gentab() $ti | $TOOL_SORT | while read name code foo; do cap=$($TOOL_SED -ne s/.*{ \\(..\)\, TICODE_$code }.*/\1/p \ $tc | head -n 1) - echo .It Li \$name\ Ta Sy \\\$code\ Ta Sy \\\$cap\ + desc=$($TOOL_SED -ne s/ \* $name\: \(.*\)/\1/p $ti) + echo .It \\\$name\ Ta Sy \\\$code\ Ta Sy \\\$cap\ Ta \\\$desc\ done } Index: src/lib/libterminfo/term.h diff -u src/lib/libterminfo/term.h:1.12 src/lib/libterminfo/term.h:1.13 --- src/lib/libterminfo/term.h:1.12 Tue May 29 00:27:59 2012 +++ src/lib/libterminfo/term.h Fri Jan 25 12:52:45 2013 @@ -1,7 +1,7 @@ -/* $NetBSD: term.h,v 1.12 2012/05/29 00:27:59 dholland Exp $ */ +/* $NetBSD: term.h,v 1.13 2013/01/25 12:52:45 roy Exp $ */ /* - * Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc. + * Copyright (c) 2009, 2010, 2011, 2013 The NetBSD Foundation, Inc. * * This code is derived from software contributed to The NetBSD Foundation * by Roy Marples. @@ -153,6 +153,48 @@ enum TIFLAGS { #define transparent_underline t_transparent_underline(cur_term) #define xon_xoff t_xon_xoff(cur_term) +/* + * BOOLEAN DESCRIPTIONS + * + * auto_left_margin: cub1 wraps from column 0 to last column + * auto_right_margin: Terminal has automatic margins + * back_color_erase: Screen erased with background colour + * can_change: Terminal can re-define existing colour + * ceol_standout_glitch: Standout not erased by overwriting (hp) + * col_addr_glitch: Only positive motion for hpa/mhba caps + * cpi_changes_res: Changing character pitch changes resolution + * cr_cancels_micro_mode: Using cr turns off micro mode + * dest_tabs_magic_smso: Destructive tabs, magic smso char (t1061) + * eat_newline_glitch: Newline ignored after 80 columns (Concept) + * erase_overstrike: Can erase overstrikes with a blank line + * generic_type: Generic line type (e.g. dialup, switch) + * hard_copy: Hardcopy terminal + * hard_cursor: Cursor is hard to see + * has_meta_key: Has a meta key (shift, sets parity bit) + * has_print_wheel: Printer needs operator to change character set + * has_status_line: Has extra status line + * hue_light_saturation: Terminal only uses HLS colour notion (Tektronix) + * insert_null_glitch: Insert mode distinguishes nulls + * lpi_changes_yes: Changing line pitch changes resolution + * memory_above: Display may be retained above the screen + * memory_below: Display may be retained below the screen + * move_insert_mode: Safe to move while in insert mode + * move_standout_mode: Safe to move in standout modes + * needs_xon_xoff: Padding won't work, xon/xoff required + * no_esc_ctlc: Beehive (f1=escape, f2=ctrl C) + * no_pad_char: Pad character doesn't exist + * non_dest_scroll_region: Scrolling region is nondestructive + * non_rev_rmcup: smcup does not reverse rmcup + * over_strike: Terminal overstrikes on hard-copy terminal + * prtr_silent: Printer won't echo on screen + * row_addr_glitch: Only positive motion for vpa/mvpa caps + * semi_auto_right_margin: Printing in last column causes cr + * status_line_esc_ok: Escape can be used on the status line + * tilde_glitch: Hazeltine; can't print tilde (~) + * transparent_underline: Underline character overstrikes + * xon_xoff: Terminal uses xon/xoff handshaking +*/ + /* Define available terminfo numbers */ enum TINUMS { TICODE_bitwin, @@ -259,6 +301,44 @@ enum TINUMS { #define wide_char_size t_wide_char_size(cur_term) #define width_status_line t_width_status_line(cur_term) +/* + * NUMBER DESCRIPTIONS + * + * bit_image_entwining: Number of passes for each bit-map row + * bit_image_type: Type of bit image device + * buffer_capacity: Number of bytes buffered before printing + * buttons: Number of buttons on the mouse + * columns: Number of columns in a line + * dot_horz_spacing: Spacing of dots
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Fri Jan 25 13:17:40 UTC 2013 Modified Files: src/sys/arch/arm/arm32: vm_machdep.c Log Message: Shut up noisy debug unless pmap_debug_level 0 To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/arm/arm32/vm_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/vm_machdep.c diff -u src/sys/arch/arm/arm32/vm_machdep.c:1.64 src/sys/arch/arm/arm32/vm_machdep.c:1.65 --- src/sys/arch/arm/arm32/vm_machdep.c:1.64 Tue Dec 18 06:30:18 2012 +++ src/sys/arch/arm/arm32/vm_machdep.c Fri Jan 25 13:17:39 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.64 2012/12/18 06:30:18 matt Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.65 2013/01/25 13:17:39 skrll Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -44,7 +44,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.64 2012/12/18 06:30:18 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: vm_machdep.c,v 1.65 2013/01/25 13:17:39 skrll Exp $); #include opt_armfpe.h #include opt_pmap_debug.h @@ -118,7 +118,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp struct pcb * const pcb2 = lwp_getpcb(l2); #ifdef PMAP_DEBUG - if (pmap_debug_level = 0) + if (pmap_debug_level 0) printf(cpu_lwp_fork: %p %p %p %p\n, l1, l2, curlwp, lwp0); #endif /* PMAP_DEBUG */ @@ -148,7 +148,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp #endif /* STACKCHECKS */ #ifdef PMAP_DEBUG - if (pmap_debug_level = 0) { + if (pmap_debug_level 0) { printf(l1: pcb=%p pid=%d pmap=%p\n, pcb1, l1-l_lid, l1-l_proc-p_vmspace-vm_map.pmap); printf(l2: pcb=%p pid=%d pmap=%p\n, @@ -218,7 +218,7 @@ vmapbuf(struct buf *bp, vsize_t len) #ifdef PMAP_DEBUG - if (pmap_debug_level = 0) + if (pmap_debug_level 0) printf(vmapbuf: bp=%08x buf=%08x len=%08x\n, (u_int)bp, (u_int)bp-b_data, (u_int)len); #endif /* PMAP_DEBUG */ @@ -261,7 +261,7 @@ vunmapbuf(struct buf *bp, vsize_t len) vaddr_t addr, off; #ifdef PMAP_DEBUG - if (pmap_debug_level = 0) + if (pmap_debug_level 0) printf(vunmapbuf: bp=%08x buf=%08x len=%08x\n, (u_int)bp, (u_int)bp-b_data, (u_int)len); #endif /* PMAP_DEBUG */
CVS commit: src/external/broadcom/rpi-firmware/dist
Module Name:src Committed By: skrll Date: Fri Jan 25 13:20:25 UTC 2013 Modified Files: src/external/broadcom/rpi-firmware/dist: bootcode.bin fixup.dat fixup_cd.dat start.elf start_cd.elf Log Message: Latest firmware including EDID support. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/broadcom/rpi-firmware/dist/bootcode.bin \ src/external/broadcom/rpi-firmware/dist/fixup.dat \ src/external/broadcom/rpi-firmware/dist/fixup_cd.dat \ src/external/broadcom/rpi-firmware/dist/start.elf \ src/external/broadcom/rpi-firmware/dist/start_cd.elf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/broadcom/rpi-firmware/dist/bootcode.bin Index: src/external/broadcom/rpi-firmware/dist/fixup.dat Index: src/external/broadcom/rpi-firmware/dist/fixup_cd.dat Index: src/external/broadcom/rpi-firmware/dist/start.elf Index: src/external/broadcom/rpi-firmware/dist/start_cd.elf
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: jmcneill Date: Fri Jan 25 13:32:21 UTC 2013 Modified Files: src/sys/arch/evbarm/rpi: rpi_machdep.c Log Message: dont crash if edid data is missing or bad To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/evbarm/rpi/rpi_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/rpi/rpi_machdep.c diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.30 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.31 --- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.30 Mon Jan 21 20:42:22 2013 +++ src/sys/arch/evbarm/rpi/rpi_machdep.c Fri Jan 25 13:32:21 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rpi_machdep.c,v 1.30 2013/01/21 20:42:22 jakllsch Exp $ */ +/* $NetBSD: rpi_machdep.c,v 1.31 2013/01/25 13:32:21 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.30 2013/01/21 20:42:22 jakllsch Exp $); +__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.31 2013/01/25 13:32:21 jmcneill Exp $); #include opt_evbarm_boardtype.h @@ -609,7 +609,8 @@ rpi_fb_get_edid_mode(uint32_t *pwidth, u } if (!vcprop_buffer_success_p(vb_edid.vb_hdr) || - !vcprop_tag_success_p(vb_edid.vbt_edid.tag)) + !vcprop_tag_success_p(vb_edid.vbt_edid.tag) || + vb_edid.vbt_edid.status != 0) return false; memset(edid_data, 0, sizeof(edid_data)); @@ -620,8 +621,10 @@ rpi_fb_get_edid_mode(uint32_t *pwidth, u edid_print(ei); #endif - *pwidth = ei.edid_preferred_mode-hdisplay; - *pheight = ei.edid_preferred_mode-vdisplay; + if (ei.edid_preferred_mode) { + *pwidth = ei.edid_preferred_mode-hdisplay; + *pheight = ei.edid_preferred_mode-vdisplay; + } return true; }
CVS commit: src/bin/csh
Module Name:src Committed By: christos Date: Fri Jan 25 14:20:58 UTC 2013 Modified Files: src/bin/csh: Makefile Log Message: Obey SMALLPROG and don't enable the editor To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/bin/csh/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/csh/Makefile diff -u src/bin/csh/Makefile:1.36 src/bin/csh/Makefile:1.37 --- src/bin/csh/Makefile:1.36 Wed Jan 23 11:39:03 2013 +++ src/bin/csh/Makefile Fri Jan 25 09:20:57 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.36 2013/01/23 16:39:03 christos Exp $ +# $NetBSD: Makefile,v 1.37 2013/01/25 14:20:57 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # # C Shell with process control; VM/UNIX VAX Makefile @@ -14,7 +14,9 @@ DFLAGS=-DBUILTIN -DFILEC -DNLS -DSHORT_S # should implement internally # - Does not handle escaped prompts. # - Does not do completion +.ifndef SMALLPROG DFLAGS+=-DEDIT +.endif CPPFLAGS+=-I${.CURDIR} -I. ${DFLAGS} SRCS= alloc.c char.c const.c csh.c dir.c dol.c err.c exec.c exp.c file.c \ func.c glob.c hist.c init.c lex.c misc.c parse.c printf.c proc.c \
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: hannken Date: Fri Jan 25 17:12:33 UTC 2013 Modified Files: src/sys/arch/sparc64/sparc64: pmap.c Log Message: Update the DEBUG section at the tail of pmap_clear_modify(). Nothing prevents page modification after the modify bit was cleared but before the DEBUG section checks pmap_is_modified(), so remove this check. For the same reason modified and changed may differ, so only check modified implies changed here. Ok: Matthew Green m...@netbsd.org To generate a diff of this commit: cvs rdiff -u -r1.279 -r1.280 src/sys/arch/sparc64/sparc64/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/pmap.c diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.279 src/sys/arch/sparc64/sparc64/pmap.c:1.280 --- src/sys/arch/sparc64/sparc64/pmap.c:1.279 Thu Jan 3 09:40:55 2013 +++ src/sys/arch/sparc64/sparc64/pmap.c Fri Jan 25 17:12:33 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.279 2013/01/03 09:40:55 martin Exp $ */ +/* $NetBSD: pmap.c,v 1.280 2013/01/25 17:12:33 hannken Exp $ */ /* * * Copyright (C) 1996-1999 Eduardo Horvath. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.279 2013/01/03 09:40:55 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.280 2013/01/25 17:12:33 hannken Exp $); #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ #define HWREF @@ -2577,17 +2577,13 @@ pmap_clear_modify(struct vm_page *pg) pv_check(); mutex_exit(pmap_lock); #ifdef DEBUG - if (pmap_is_modified(pg)) { - printf(pmap_clear_modify(): %p still modified!\n, pg); - Debugger(); - } DPRINTF(PDB_CHANGEPROT|PDB_REF, (pmap_clear_modify: pg %p %s\n, pg, (changed ? was modified : was not modified))); - if (modified != changed) { + if (modified modified != changed) { printf(pmap_clear_modify: modified %d changed %d\n, modified, changed); Debugger(); - } else return (modified); + } #endif return (changed); }
CVS commit: src/lib/libterminfo
Module Name:src Committed By: roy Date: Fri Jan 25 17:28:50 UTC 2013 Modified Files: src/lib/libterminfo: term.h terminfo.3 tparm.c Log Message: Provide a disabled implentation of tlparm and ti_tlparm for completeness. This also improves the readability of _ti_tiparm. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/lib/libterminfo/term.h \ src/lib/libterminfo/tparm.c cvs rdiff -u -r1.9 -r1.10 src/lib/libterminfo/terminfo.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/libterminfo/term.h diff -u src/lib/libterminfo/term.h:1.13 src/lib/libterminfo/term.h:1.14 --- src/lib/libterminfo/term.h:1.13 Fri Jan 25 12:52:45 2013 +++ src/lib/libterminfo/term.h Fri Jan 25 17:28:50 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: term.h,v 1.13 2013/01/25 12:52:45 roy Exp $ */ +/* $NetBSD: term.h,v 1.14 2013/01/25 17:28:50 roy Exp $ */ /* * Copyright (c) 2009, 2010, 2011, 2013 The NetBSD Foundation, Inc. @@ -1974,12 +1974,20 @@ int ti_puts(const TERMINAL *, const cha int (*)(int, void *), void *); int ti_putp(const TERMINAL *, const char *); -/* Using tparm can be kunkly, so provide a variadic function */ +/* Using tparm can be kunkly, so provide a variadic function + * Numbers have to be passed as int */ /* This is not standard, but ncurses also provides this */ char * tiparm(const char *, ...); /* And a thread safe version */ char * ti_tiparm(TERMINAL *, const char *, ...); +#ifdef TPARM_TLPARM +/* Same as the above, but numbers have to be passed as long */ +char * tlparm(const char *, ...); +/* And a thread safe version */ +char * ti_tlparm(TERMINAL *, const char *, ...); +#endif + /* Default to X/Open tparm, but allow it to be variadic also */ #ifdef TPARM_VARARGS # define tparm tiparm Index: src/lib/libterminfo/tparm.c diff -u src/lib/libterminfo/tparm.c:1.13 src/lib/libterminfo/tparm.c:1.14 --- src/lib/libterminfo/tparm.c:1.13 Fri Jan 25 12:30:05 2013 +++ src/lib/libterminfo/tparm.c Fri Jan 25 17:28:50 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: tparm.c,v 1.13 2013/01/25 12:30:05 roy Exp $ */ +/* $NetBSD: tparm.c,v 1.14 2013/01/25 17:28:50 roy Exp $ */ /* * Copyright (c) 2009, 2011, 2013 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: tparm.c,v 1.13 2013/01/25 12:30:05 roy Exp $); +__RCSID($NetBSD: tparm.c,v 1.14 2013/01/25 17:28:50 roy Exp $); #include sys/param.h #include assert.h @@ -44,6 +44,10 @@ __RCSID($NetBSD: tparm.c,v 1.13 2013/01 #define LONG_STR_MAX ((CHAR_BIT * sizeof(long)) / 3) #define BUFINC 128 /* Size to increament the terminal buffer by */ +#define VA_LONG_LONG 1 +#define VA_CHAR_INT 2 +//#define VA_CHAR_LONG 3 + static TERMINAL *dumbterm; /* For non thread safe functions */ typedef struct { @@ -178,7 +182,7 @@ _ti_parm_analyse(const char *str, int *p } static char * -_ti_tiparm(TERMINAL *term, const char *str, int va_long, va_list parms) +_ti_tiparm(TERMINAL *term, const char *str, int va_type, va_list parms) { char c, fmt[64], *fp, *ostr; long val, val2; @@ -224,7 +228,7 @@ _ti_tiparm(TERMINAL *term, const char *s memset(params, 0, sizeof(params)); for (l = 0; l max; l++) { if (piss[l]) { - if (va_long) { + if (va_type == VA_LONG_LONG) { /* This only works if char * fits into a long * on this platform. */ if (sizeof(char *) = sizeof(long)/*CONSTCOND*/) @@ -237,10 +241,10 @@ _ti_tiparm(TERMINAL *term, const char *s } else params[l].string = va_arg(parms, char *); } else { - if (va_long) -params[l].num = va_arg(parms, long); - else + if (va_type == VA_CHAR_INT) params[l].num = (long)va_arg(parms, int); + else +params[l].num = va_arg(parms, long); } } @@ -548,7 +552,7 @@ ti_tiparm(TERMINAL *term, const char *st _DIAGASSERT(str != NULL); va_start(va, str); - ret = _ti_tiparm(term, str, 0, va); + ret = _ti_tiparm(term, str, VA_CHAR_INT, va); va_end(va); return ret; } @@ -562,16 +566,28 @@ tiparm(const char *str, ...) _DIAGASSERT(str != NULL); va_start(va, str); - ret = _ti_tiparm(NULL, str, 0, va); + ret = _ti_tiparm(NULL, str, VA_CHAR_INT, va); va_end(va); return ret; } -/* Same as tiparm, but accepts long instead of int for the numeric params. - * Currently there is no need for this to be a public interface and is only - * consumed by tparm. If we need this to be public, and I really cannot - * imagine why, then we would need ti_tlparm() as well. */ -static char * +#ifdef VA_CHAR_LONG +char * +ti_tlparm(TERMINAL *term, const char *str, ...) +{ + va_list va; + char *ret; + + _DIAGASSERT(term != NULL); + _DIAGASSERT(str != NULL); + + va_start(va, str); + ret = _ti_tiparm(term, str, VA_CHAR_LONG, va); + va_end(va); + return ret; +} + +char * tlparm(const char *str, ...) { va_list va; @@ -580,7 +596,22 @@ tlparm(const char *str, ...) _DIAGASSERT(str != NULL); va_start(va, str); -
CVS commit: src/bin/csh
Module Name:src Committed By: he Date: Fri Jan 25 19:07:15 UTC 2013 Modified Files: src/bin/csh: Makefile Log Message: When using -ledit, also use -lterminfo, to allow static linking. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/bin/csh/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/csh/Makefile diff -u src/bin/csh/Makefile:1.37 src/bin/csh/Makefile:1.38 --- src/bin/csh/Makefile:1.37 Fri Jan 25 14:20:57 2013 +++ src/bin/csh/Makefile Fri Jan 25 19:07:14 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.37 2013/01/25 14:20:57 christos Exp $ +# $NetBSD: Makefile,v 1.38 2013/01/25 19:07:14 he Exp $ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # # C Shell with process control; VM/UNIX VAX Makefile @@ -64,7 +64,7 @@ COPTS.printf.c = -Wno-format-nonliteral COPTS.proc.c = -Wno-format-nonliteral .if !empty(DFLAGS:M*EDIT) -LDADD+=-ledit -lutil +LDADD+=-ledit -lterminfo -lutil DPADD+=${LIBEDIT} ${LIBUTIL} .else LDADD+=-lutil
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: matt Date: Fri Jan 25 22:38:00 UTC 2013 Modified Files: src/sys/arch/arm/broadcom: bcm53xx_reg.h Log Message: Fix a few cp errors. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/broadcom/bcm53xx_reg.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/broadcom/bcm53xx_reg.h diff -u src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.12 src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.13 --- src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.12 Wed Dec 12 00:00:38 2012 +++ src/sys/arch/arm/broadcom/bcm53xx_reg.h Fri Jan 25 22:37:59 2013 @@ -237,14 +237,14 @@ #define MIIMGT_MDCDIV __BITS(6,0) #define MIICMD 0x004 #define MIICMD_SB __BITS(31,30) -#define MIICMD_SB_DEF __SHIFTIN(1, MIICMD_OP) +#define MIICMD_SB_DEF __SHIFTIN(1, MIICMD_SB) #define MIICMD_OP __BITS(29,28) #define MIICMD_OP_RD __SHIFTIN(2, MIICMD_OP) #define MIICMD_OP_WR __SHIFTIN(1, MIICMD_OP) #define MIICMD_PHY __BITS(27,23) #define MIICMD_REG __BITS(22,18) #define MIICMD_TA __BITS(17,16) -#define MIICMD_TA_DEF __SHIFTIN(2, MIICMD_OP) +#define MIICMD_TA_DEF __SHIFTIN(2, MIICMD_TA) #define MIICMD_DATA __BITS(15,0) #define MIICMD_RD_DEF (MIICMD_SB_DEF|MIICMD_OP_RD|MIICMD_TA_DEF)
CVS commit: src/usr.sbin/makefs
Module Name:src Committed By: christos Date: Sat Jan 26 00:19:39 UTC 2013 Modified Files: src/usr.sbin/makefs: ffs.c src/usr.sbin/makefs/ffs: buf.c buf.h ffs_alloc.c ffs_balloc.c Log Message: make the buffer functions look exactly like the kernel ones and add other cruft to make the kernel files compile. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/usr.sbin/makefs/ffs.c cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/makefs/ffs/buf.c cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/makefs/ffs/buf.h cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/makefs/ffs/ffs_alloc.c cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/makefs/ffs/ffs_balloc.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/ffs.c diff -u src/usr.sbin/makefs/ffs.c:1.53 src/usr.sbin/makefs/ffs.c:1.54 --- src/usr.sbin/makefs/ffs.c:1.53 Wed Jan 23 20:10:47 2013 +++ src/usr.sbin/makefs/ffs.c Fri Jan 25 19:19:39 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.c,v 1.53 2013/01/24 01:10:47 christos Exp $ */ +/* $NetBSD: ffs.c,v 1.54 2013/01/26 00:19:39 christos Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -71,7 +71,7 @@ #include sys/cdefs.h #if defined(__RCSID) !defined(__lint) -__RCSID($NetBSD: ffs.c,v 1.53 2013/01/24 01:10:47 christos Exp $); +__RCSID($NetBSD: ffs.c,v 1.54 2013/01/26 00:19:39 christos Exp $); #endif /* !__lint */ #include sys/param.h @@ -945,7 +945,7 @@ ffs_write_file(union dinode *din, uint32 errno = bwrite(bp); if (errno != 0) goto bad_ffs_write_file; - brelse(bp); + brelse(bp, 0); if (!isfile) p += chunk; } Index: src/usr.sbin/makefs/ffs/buf.c diff -u src/usr.sbin/makefs/ffs/buf.c:1.12 src/usr.sbin/makefs/ffs/buf.c:1.13 --- src/usr.sbin/makefs/ffs/buf.c:1.12 Sun Jun 20 18:20:18 2004 +++ src/usr.sbin/makefs/ffs/buf.c Fri Jan 25 19:19:39 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: buf.c,v 1.12 2004/06/20 22:20:18 jmc Exp $ */ +/* $NetBSD: buf.c,v 1.13 2013/01/26 00:19:39 christos Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -41,7 +41,7 @@ #include sys/cdefs.h #if defined(__RCSID) !defined(__lint) -__RCSID($NetBSD: buf.c,v 1.12 2004/06/20 22:20:18 jmc Exp $); +__RCSID($NetBSD: buf.c,v 1.13 2013/01/26 00:19:39 christos Exp $); #endif /* !__lint */ #include sys/param.h @@ -66,10 +66,12 @@ extern int sectorsize; /* XXX: from ffs TAILQ_HEAD(buftailhead,buf) buftail; int -bread(int fd, struct fs *fs, daddr_t blkno, int size, struct buf **bpp) +bread(struct vnode *vp, daddr_t blkno, int size, struct kauth_cred *u1 __unused, + int u2 __unused, struct buf **bpp) { off_t offset; ssize_t rv; + struct fs *fs = vp-fs; assert (fs != NULL); assert (bpp != NULL); @@ -77,7 +79,7 @@ bread(int fd, struct fs *fs, daddr_t blk if (debug DEBUG_BUF_BREAD) printf(bread: fs %p blkno %lld size %d\n, fs, (long long)blkno, size); - *bpp = getblk(fd, fs, blkno, size); + *bpp = getblk(vp, blkno, size, 0, 0); offset = (*bpp)-b_blkno * sectorsize; /* XXX */ if (debug DEBUG_BUF_BREAD) printf(bread: bp %p blkno %lld offset %lld bcount %ld\n, @@ -101,7 +103,7 @@ bread(int fd, struct fs *fs, daddr_t blk } void -brelse(struct buf *bp) +brelse(struct buf *bp, int u1 __unused) { assert (bp != NULL); @@ -180,12 +182,16 @@ bcleanup(void) } struct buf * -getblk(int fd, struct fs *fs, daddr_t blkno, int size) +getblk(struct vnode *vp, daddr_t blkno, int size, int u1 __unused, +int u2 __unused) { static int buftailinitted; struct buf *bp; void *n; + int fd = vp-fd; + struct fs *fs = vp-fs; + blkno += vp-offset; assert (fs != NULL); if (debug DEBUG_BUF_GETBLK) printf(getblk: fs %p blkno %lld size %d\n, fs, Index: src/usr.sbin/makefs/ffs/buf.h diff -u src/usr.sbin/makefs/ffs/buf.h:1.2 src/usr.sbin/makefs/ffs/buf.h:1.3 --- src/usr.sbin/makefs/ffs/buf.h:1.2 Thu Nov 1 22:12:49 2001 +++ src/usr.sbin/makefs/ffs/buf.h Fri Jan 25 19:19:39 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: buf.h,v 1.2 2001/11/02 03:12:49 lukem Exp $ */ +/* $NetBSD: buf.h,v 1.3 2013/01/26 00:19:39 christos Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -41,6 +41,28 @@ #include sys/param.h #include sys/queue.h +#include stdio.h +#include string.h +#include errno.h +#include time.h +#include stddef.h +#include stdlib.h +#include err.h + +struct componentname { + char *cn_nameptr; + size_t cn_namelen; +}; + +struct vnode { + int fd; + void *fs; + void *v_data; + int offset; +}; + +#define vput(a) ((void)(a)) + struct buf { void * b_data; long b_bufsize; @@ -54,12 +76,41 @@ struct buf { }; void bcleanup(void); -int bread(int, struct fs *, daddr_t, int, struct buf **); -void brelse(struct buf *); +int bread(struct vnode *, daddr_t, int, struct kauth_cred *, +int, struct buf **); +void brelse(struct buf *, int); int bwrite(struct buf *); -struct buf * getblk(int, struct fs *, daddr_t, int); +struct buf * getblk(struct vnode *,
CVS commit: src/usr.sbin/makefs
Module Name:src Committed By: christos Date: Sat Jan 26 00:20:40 UTC 2013 Modified Files: src/usr.sbin/makefs: msdos.c src/usr.sbin/makefs/msdos: Makefile.inc Added Files: src/usr.sbin/makefs: msdos.h src/usr.sbin/makefs/msdos: msdosfs_denode.c msdosfs_vfsops.c msdosfs_vnops.c Log Message: add more msdos stuff. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/makefs/msdos.c cvs rdiff -u -r0 -r1.1 src/usr.sbin/makefs/msdos.h cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/makefs/msdos/Makefile.inc cvs rdiff -u -r0 -r1.1 src/usr.sbin/makefs/msdos/msdosfs_denode.c \ src/usr.sbin/makefs/msdos/msdosfs_vfsops.c \ src/usr.sbin/makefs/msdos/msdosfs_vnops.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/msdos.c diff -u src/usr.sbin/makefs/msdos.c:1.5 src/usr.sbin/makefs/msdos.c:1.6 --- src/usr.sbin/makefs/msdos.c:1.5 Wed Jan 23 20:10:47 2013 +++ src/usr.sbin/makefs/msdos.c Fri Jan 25 19:20:40 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: msdos.c,v 1.5 2013/01/24 01:10:47 christos Exp $ */ +/* $NetBSD: msdos.c,v 1.6 2013/01/26 00:20:40 christos Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include sys/cdefs.h #if defined(__RCSID) !defined(__lint) -__RCSID($NetBSD: msdos.c,v 1.5 2013/01/24 01:10:47 christos Exp $); +__RCSID($NetBSD: msdos.c,v 1.6 2013/01/26 00:20:40 christos Exp $); #endif /* !__lint */ #include sys/param.h @@ -54,10 +54,17 @@ __RCSID($NetBSD: msdos.c,v 1.5 2013/01/ #include stdlib.h #include string.h #include unistd.h +#include dirent.h +#include ffs/buf.h +#include fs/msdosfs/denode.h #include makefs.h +#include msdos.h #include mkfs_msdos.h +static int msdos_populate_dir(const char *, struct denode *, fsnode *, +fsnode *, fsinfo_t *); + void msdos_prep_opts(fsinfo_t *fsopts) { @@ -128,6 +135,14 @@ void msdos_makefs(const char *image, const char *dir, fsnode *root, fsinfo_t *fsopts) { struct msdos_options *msdos_opt = fsopts-fs_specific; + struct vnode vp, rootvp; + struct timeval start; + struct msdosfsmount *pmp; + + assert(image != NULL); + assert(dir != NULL); + assert(root != NULL); + assert(fsopts != NULL); /* * XXX: pick up other options from the msdos specific ones? @@ -135,51 +150,94 @@ msdos_makefs(const char *image, const ch */ msdos_opt-create_size = MAX(msdos_opt-create_size, fsopts-minsize); + /* create image */ + printf(Creating `%s'\n, image); + TIMER_START(start); if (mkfs_msdos(image, NULL, msdos_opt) == -1) return; -#ifdef notyet - struct fs *superblock; - struct timeval start; + TIMER_RESULTS(start, mkfs_msdos); - assert(image != NULL); - assert(dir != NULL); - assert(root != NULL); - assert(fsopts != NULL); + vp.fd = open(image, O_RDWR); + vp.fs = msdos_opt; + vp.offset = 1; + + if ((pmp = msdosfs_mount(vp, 0)) == NULL) + err(1, msdosfs_mount); + + if (msdosfs_root(pmp, rootvp) != 0) + err(1, msdosfs_root); if (debug DEBUG_FS_MAKEFS) printf(msdos_makefs: image %s directory %s root %p\n, image, dir, root); - /* validate tree and options */ - TIMER_START(start); - msdos_validate(dir, root, fsopts); - TIMER_RESULTS(start, msdos_validate); - printf(Calculated size of `%s': %lld bytes, %lld inodes\n, image, (long long)fsopts-size, (long long)fsopts-inodes); - /* create image */ + /* populate image */ + printf(Populating `%s'\n, image); TIMER_START(start); - if (msdos_create_image(image, fsopts) == -1) + if (msdos_populate_dir(dir, VTODE(rootvp), root, root, fsopts) == -1) errx(1, Image file `%s' not created., image); - TIMER_RESULTS(start, msdos_create_image); - - fsopts-curinode = ROOTINO; + TIMER_RESULTS(start, msdos_populate_dir); if (debug DEBUG_FS_MAKEFS) putchar('\n'); - /* populate image */ - printf(Populating `%s'\n, image); - TIMER_START(start); - if (! msdos_populate_dir(dir, root, fsopts)) - errx(1, Image file `%s' not populated., image); - TIMER_RESULTS(start, msdos_populate_dir); - /* ensure no outstanding buffers remain */ if (debug DEBUG_FS_MAKEFS) bcleanup(); printf(Image `%s' complete\n, image); -#endif +} + +static int +msdos_populate_dir(const char *path, struct denode *dir, fsnode *root, +fsnode *parent, fsinfo_t *fsopts) +{ + fsnode *cur; + char pbuf[MAXPATHLEN]; + + assert(dir != NULL); + assert(root != NULL); + assert(fsopts != NULL); + + for (cur = root-next; cur != NULL; cur = cur-next) { + if ((size_t)snprintf(pbuf, sizeof(pbuf), %s/%s, path, + cur-name) = sizeof(pbuf)) { + warnx(path %s too long, pbuf); + return -1; + } + + if ((cur-inode-flags FI_ALLOCATED) == 0) { + cur-inode-flags |= FI_ALLOCATED; + if (cur != root) { +fsopts-curinode++; +cur-inode-ino = fsopts-curinode; +cur-parent = parent; + } + } + + if (cur-inode-flags FI_WRITTEN) { + continue; // hard link + } +
CVS commit: src/sys/fs/msdosfs
Module Name:src Committed By: christos Date: Sat Jan 26 00:21:49 UTC 2013 Modified Files: src/sys/fs/msdosfs: denode.h direntry.h fat.h msdosfs_conv.c msdosfs_fat.c msdosfs_lookup.c msdosfsmount.h Log Message: expose more stuff if MAKEFS is defined for the headers, and arrange for the source file to be compilable from userland. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/fs/msdosfs/denode.h cvs rdiff -u -r1.5 -r1.6 src/sys/fs/msdosfs/direntry.h cvs rdiff -u -r1.7 -r1.8 src/sys/fs/msdosfs/fat.h \ src/sys/fs/msdosfs/msdosfs_conv.c cvs rdiff -u -r1.23 -r1.24 src/sys/fs/msdosfs/msdosfs_fat.c cvs rdiff -u -r1.27 -r1.28 src/sys/fs/msdosfs/msdosfs_lookup.c cvs rdiff -u -r1.17 -r1.18 src/sys/fs/msdosfs/msdosfsmount.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/fs/msdosfs/denode.h diff -u src/sys/fs/msdosfs/denode.h:1.20 src/sys/fs/msdosfs/denode.h:1.21 --- src/sys/fs/msdosfs/denode.h:1.20 Sun Nov 4 12:57:59 2012 +++ src/sys/fs/msdosfs/denode.h Fri Jan 25 19:21:49 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: denode.h,v 1.20 2012/11/04 17:57:59 jakllsch Exp $ */ +/* $NetBSD: denode.h,v 1.21 2013/01/26 00:21:49 christos Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -231,7 +231,7 @@ struct denode { #define de_forw de_chain[0] #define de_back de_chain[1] -#ifdef _KERNEL +#if defined(_KERNEL) || defined(MAKEFS) #define VTODE(vp) ((struct denode *)(vp)-v_data) #define DETOV(de) ((de)-de_vnode) @@ -287,6 +287,8 @@ int msdosfs_pathconf (void *); /* * Internal service routine prototypes. */ +struct componentname; +struct direntry; int msdosfs_update(struct vnode *, const struct timespec *, const struct timespec *, int); int createde(struct denode *, struct denode *, @@ -312,5 +314,5 @@ int msdosfs_fh_enter(struct msdosfsmount int msdosfs_fh_remove(struct msdosfsmount *, uint32_t, uint32_t); int msdosfs_fh_lookup(struct msdosfsmount *, uint32_t, uint32_t, uint32_t *); void msdosfs_fh_destroy(struct msdosfsmount *); -#endif /* _KERNEL */ +#endif /* _KERNEL || MAKEFS */ #endif /* _MSDOSFS_DENODE_H_ */ Index: src/sys/fs/msdosfs/direntry.h diff -u src/sys/fs/msdosfs/direntry.h:1.5 src/sys/fs/msdosfs/direntry.h:1.6 --- src/sys/fs/msdosfs/direntry.h:1.5 Sat Dec 3 12:34:43 2005 +++ src/sys/fs/msdosfs/direntry.h Fri Jan 25 19:21:49 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: direntry.h,v 1.5 2005/12/03 17:34:43 christos Exp $ */ +/* $NetBSD: direntry.h,v 1.6 2013/01/26 00:21:49 christos Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -120,7 +120,8 @@ struct winentry { #define DD_YEAR_MASK 0xFE00 /* year - 1980 */ #define DD_YEAR_SHIFT 9 -#ifdef _KERNEL +#if defined(_KERNEL) || defined(MAKEFS) +struct dirent; void unix2dostime(const struct timespec *tsp, int gmtoff, u_int16_t *ddp, u_int16_t *dtp, u_int8_t *dhp); void dos2unixtime(u_int dd, u_int dt, u_int dh, int gmtoff, @@ -135,5 +136,5 @@ int winChkName(const u_char *un, int unl int win2unixfn(struct winentry *wep, struct dirent *dp, int chksum); u_int8_t winChksum(u_int8_t *name); int winSlotCnt(const u_char *un, int unlen); -#endif /* _KERNEL */ +#endif /* _KERNEL || MAKEFS */ #endif /* _MSDOSFS_DIRENTRY_H_ */ Index: src/sys/fs/msdosfs/fat.h diff -u src/sys/fs/msdosfs/fat.h:1.7 src/sys/fs/msdosfs/fat.h:1.8 --- src/sys/fs/msdosfs/fat.h:1.7 Sun Nov 4 12:57:59 2012 +++ src/sys/fs/msdosfs/fat.h Fri Jan 25 19:21:49 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: fat.h,v 1.7 2012/11/04 17:57:59 jakllsch Exp $ */ +/* $NetBSD: fat.h,v 1.8 2013/01/26 00:21:49 christos Exp $ */ /*- * Copyright (C) 1994, 1997 Wolfgang Solfrank. @@ -92,7 +92,7 @@ #define MSDOSFSEOF(cn, fatmask) \ (((cn) CLUST_EOFS) == (CLUST_EOFS (fatmask))) -#ifdef _KERNEL +#if defined(_KERNEL) || defined(MAKEFS) /* * These are the values for the function argument to the function * fatentry(). @@ -115,5 +115,5 @@ void fc_purge(struct denode *, u_int); void fc_lookup(struct denode *, u_long, u_long *, u_long *); int fillinusemap(struct msdosfsmount *); int freeclusterchain(struct msdosfsmount *, u_long); -#endif /* _KERNEL */ +#endif /* _KERNEL || MAKEFS */ #endif /* _MSDOSFS_FAT_H_ */ Index: src/sys/fs/msdosfs/msdosfs_conv.c diff -u src/sys/fs/msdosfs/msdosfs_conv.c:1.7 src/sys/fs/msdosfs/msdosfs_conv.c:1.8 --- src/sys/fs/msdosfs/msdosfs_conv.c:1.7 Sun Mar 15 13:15:57 2009 +++ src/sys/fs/msdosfs/msdosfs_conv.c Fri Jan 25 19:21:49 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: msdosfs_conv.c,v 1.7 2009/03/15 17:15:57 cegger Exp $ */ +/* $NetBSD: msdosfs_conv.c,v 1.8 2013/01/26 00:21:49 christos Exp $ */ /*- * Copyright (C) 1995, 1997 Wolfgang Solfrank. @@ -47,8 +47,12 @@ * October 1992 */ +#if HAVE_NBTOOL_CONFIG_H +#include nbtool_config.h +#endif + #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: msdosfs_conv.c,v 1.7 2009/03/15 17:15:57 cegger Exp $);
CVS commit: src/usr.sbin/makefs
Module Name:src Committed By: christos Date: Sat Jan 26 00:31:50 UTC 2013 Modified Files: src/usr.sbin/makefs: Makefile msdos.h src/usr.sbin/makefs/msdos: msdosfs_vfsops.c msdosfs_vnops.c Log Message: add debugging, fix warnings. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/makefs/Makefile cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/makefs/msdos.h cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/makefs/msdos/msdosfs_vfsops.c \ src/usr.sbin/makefs/msdos/msdosfs_vnops.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/Makefile diff -u src/usr.sbin/makefs/Makefile:1.33 src/usr.sbin/makefs/Makefile:1.34 --- src/usr.sbin/makefs/Makefile:1.33 Wed Jan 23 17:47:18 2013 +++ src/usr.sbin/makefs/Makefile Fri Jan 25 19:31:49 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2013/01/23 22:47:18 christos Exp $ +# $NetBSD: Makefile,v 1.34 2013/01/26 00:31:49 christos Exp $ # WARNS?= 5 @@ -18,6 +18,7 @@ MKNODSRC= ${NETBSDSRCDIR}/sbin/mknod MTREESRC= ${NETBSDSRCDIR}/usr.sbin/mtree CPPFLAGS+= -I${.CURDIR} -I${MKNODSRC} -I${MTREESRC} -DMAKEFS +CPPFLAGS+= -DMSDOSFS_DEBUG .PATH: ${MKNODSRC} ${MTREESRC} .include ${.CURDIR}/cd9660/Makefile.inc Index: src/usr.sbin/makefs/msdos.h diff -u src/usr.sbin/makefs/msdos.h:1.1 src/usr.sbin/makefs/msdos.h:1.2 --- src/usr.sbin/makefs/msdos.h:1.1 Fri Jan 25 19:20:40 2013 +++ src/usr.sbin/makefs/msdos.h Fri Jan 25 19:31:49 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: msdos.h,v 1.1 2013/01/26 00:20:40 christos Exp $ */ +/* $NetBSD: msdos.h,v 1.2 2013/01/26 00:31:49 christos Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -33,9 +33,10 @@ */ struct vnode; +struct denode; struct msdosfsmount *msdosfs_mount(struct vnode *, int); int msdosfs_root(struct msdosfsmount *, struct vnode *); -struct denode * msdosfs_mkfile(const char *, struct denode *, fsnode *); +struct denode *msdosfs_mkfile(const char *, struct denode *, fsnode *); struct denode *msdosfs_mkdire(const char *, struct denode *, fsnode *); Index: src/usr.sbin/makefs/msdos/msdosfs_vfsops.c diff -u src/usr.sbin/makefs/msdos/msdosfs_vfsops.c:1.1 src/usr.sbin/makefs/msdos/msdosfs_vfsops.c:1.2 --- src/usr.sbin/makefs/msdos/msdosfs_vfsops.c:1.1 Fri Jan 25 19:20:40 2013 +++ src/usr.sbin/makefs/msdos/msdosfs_vfsops.c Fri Jan 25 19:31:50 2013 @@ -50,7 +50,7 @@ #endif #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: msdosfs_vfsops.c,v 1.1 2013/01/26 00:20:40 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: msdosfs_vfsops.c,v 1.2 2013/01/26 00:31:50 christos Exp $); #include sys/param.h #include sys/systm.h @@ -71,9 +71,10 @@ __KERNEL_RCSID(0, $NetBSD: msdosfs_vfso #include errno.h #include stdlib.h #include string.h + +#include makefs.h #include msdos.h #include mkfs_msdos.h -#define NOCRED NULL #ifdef MSDOSFS_DEBUG #define DPRINTF(a) printf a @@ -97,7 +98,7 @@ msdosfs_mount(struct vnode *devvp, int f uint64_t psize = m-create_size; unsigned secsize = 512; - if ((error = bread(devvp, 1, secsize, NOCRED, 0, bp)) != 0) + if ((error = bread(devvp, 1, secsize, NULL, 0, bp)) != 0) goto error_exit; bsp = (union bootsector *)bp-b_data; @@ -327,7 +328,7 @@ msdosfs_mount(struct vnode *devvp, int f * padded at the end or in the middle? */ if ((error = bread(devvp, de_bn2kb(pmp, pmp-pm_fsinfo), - pmp-pm_BytesPerSec, NOCRED, 0, bp)) != 0) + pmp-pm_BytesPerSec, NULL, 0, bp)) != 0) goto error_exit; fp = (struct fsinfo *)bp-b_data; if (!memcmp(fp-fsisig1, RRaA, 4) Index: src/usr.sbin/makefs/msdos/msdosfs_vnops.c diff -u src/usr.sbin/makefs/msdos/msdosfs_vnops.c:1.1 src/usr.sbin/makefs/msdos/msdosfs_vnops.c:1.2 --- src/usr.sbin/makefs/msdos/msdosfs_vnops.c:1.1 Fri Jan 25 19:20:40 2013 +++ src/usr.sbin/makefs/msdos/msdosfs_vnops.c Fri Jan 25 19:31:50 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: msdosfs_vnops.c,v 1.1 2013/01/26 00:20:40 christos Exp $ */ +/* $NetBSD: msdosfs_vnops.c,v 1.2 2013/01/26 00:31:50 christos Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -48,7 +48,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: msdosfs_vnops.c,v 1.1 2013/01/26 00:20:40 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: msdosfs_vnops.c,v 1.2 2013/01/26 00:31:50 christos Exp $); #include sys/param.h #include sys/mman.h @@ -115,7 +115,8 @@ msdosfs_mkfile(const char *path, struct cn.cn_namelen = strlen(node-name); #ifdef MSDOSFS_DEBUG - printf(msdosfs_create(cn %s, vap 0%o\n, node-name, st-st_mode); + printf(msdosfs_create(name %s, mode 0%o size %zu\n, node-name, + st-st_mode, (size_t)st-st_size); #endif /* @@ -197,7 +198,8 @@ msdosfs_wfile(const char *path, struct d if ((fd = open(path, O_RDONLY)) == -1) err(1, open %s, path); - if ((dat = mmap(0, nsize, PROT_READ, MAP_FILE, fd, 0)) == MAP_FAILED) + if ((dat = mmap(0, nsize, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0)) + ==
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Sat Jan 26 07:04:23 UTC 2013 Added Files: src/lib/libc/arch/arm/gen: __aeabi_dcmpun.c __aeabi_fcmpun.c Log Message: Add __aeabi_[fd]cmpun for IEEE unordered compares (requires by ARM RTABI). To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/lib/libc/arch/arm/gen/__aeabi_dcmpun.c \ src/lib/libc/arch/arm/gen/__aeabi_fcmpun.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/lib/libc/arch/arm/gen/__aeabi_dcmpun.c diff -u /dev/null src/lib/libc/arch/arm/gen/__aeabi_dcmpun.c:1.1 --- /dev/null Sat Jan 26 07:04:23 2013 +++ src/lib/libc/arch/arm/gen/__aeabi_dcmpun.c Sat Jan 26 07:04:22 2013 @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include sys/cdefs.h +#if defined(LIBC_SCCS) !defined(lint) +__RCSID($NetBSD: __aeabi_dcmpun.c,v 1.1 2013/01/26 07:04:22 matt Exp $); +#endif /* LIBC_SCCS and not lint */ + +#include arm/aeabi.h +#include arm/ieee.h + +#include math.h + +/* + * result (1, 0) denotes (?, =) [2], use for C99 isunordered() + */ + +int +__aeabi_dcmpun(double x, double y) +{ + const union ieee_double_u ux = { .dblu_d = x }; + const union ieee_double_u uy = { .dblu_d = y }; + + return (ux.dblu_dbl.dbl_exp == DBL_EXP_INFNAN + (ux.dblu_dbl.dbl_frach|ux.dblu_dbl.dbl_fracl) != 0) + || (uy.dblu_dbl.dbl_exp == DBL_EXP_INFNAN + (uy.dblu_dbl.dbl_frach|uy.dblu_dbl.dbl_fracl) != 0); +} Index: src/lib/libc/arch/arm/gen/__aeabi_fcmpun.c diff -u /dev/null src/lib/libc/arch/arm/gen/__aeabi_fcmpun.c:1.1 --- /dev/null Sat Jan 26 07:04:23 2013 +++ src/lib/libc/arch/arm/gen/__aeabi_fcmpun.c Sat Jan 26 07:04:22 2013 @@ -0,0 +1,54 @@ +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include sys/cdefs.h +#if defined(LIBC_SCCS) !defined(lint) +__RCSID($NetBSD: __aeabi_fcmpun.c,v 1.1 2013/01/26 07:04:22 matt Exp $); +#endif /* LIBC_SCCS and not lint */ + +#include arm/aeabi.h +#include arm/ieee.h +
CVS commit: src/lib/libc/arch/arm/softfloat
Module Name:src Committed By: matt Date: Sat Jan 26 07:08:14 UTC 2013 Modified Files: src/lib/libc/arch/arm/softfloat: arm-gcc.h Log Message: Appease clang by making 64-bit literals use ULL To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/arm/softfloat/arm-gcc.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/arch/arm/softfloat/arm-gcc.h diff -u src/lib/libc/arch/arm/softfloat/arm-gcc.h:1.3 src/lib/libc/arch/arm/softfloat/arm-gcc.h:1.4 --- src/lib/libc/arch/arm/softfloat/arm-gcc.h:1.3 Sat Dec 24 21:11:16 2005 +++ src/lib/libc/arch/arm/softfloat/arm-gcc.h Sat Jan 26 07:08:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: arm-gcc.h,v 1.3 2005/12/24 21:11:16 perry Exp $ */ +/* $NetBSD: arm-gcc.h,v 1.4 2013/01/26 07:08:14 matt Exp $ */ /* --- @@ -71,7 +71,7 @@ name for the 64-bit integer type. Some defined as the identity macro: `#define LIT64( a ) a'. --- */ -#define LIT64( a ) a##LL +#define LIT64( a ) a##ULL #endif /*
CVS commit: src/lib/libc/arch/arm
Module Name:src Committed By: matt Date: Sat Jan 26 07:09:42 UTC 2013 Modified Files: src/lib/libc/arch/arm: Makefile.inc src/lib/libc/arch/arm/gen: Makefile.inc Log Message: When building for earm*, compile __aeabi_[df]cmpun.c and __aeabi_[il]div0.c To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/arch/arm/Makefile.inc cvs rdiff -u -r1.20 -r1.21 src/lib/libc/arch/arm/gen/Makefile.inc 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/arch/arm/Makefile.inc diff -u src/lib/libc/arch/arm/Makefile.inc:1.17 src/lib/libc/arch/arm/Makefile.inc:1.18 --- src/lib/libc/arch/arm/Makefile.inc:1.17 Fri Jan 11 13:55:25 2013 +++ src/lib/libc/arch/arm/Makefile.inc Sat Jan 26 07:09:41 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.17 2013/01/11 13:55:25 matt Exp $ +# $NetBSD: Makefile.inc,v 1.18 2013/01/26 07:09:41 matt Exp $ .include bsd.own.mk @@ -9,7 +9,6 @@ CPPFLAGS += -I. .if ${MACHINE_ARCH} == earm || ${MACHINE_ARCH} == earmeb SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S SRCS+= __aeabi_lcmp.c __aeabi_ulcmp.c -#SRCS+= __aeabi_idiv0.c __aeabi_ldiv0.c SRCS+= fixunsgen_ieee754.c fixunssfsi_ieee754.c SRCS+= fixunsgen64_ieee754.c fixunsdfsi_ieee754.c .endif Index: src/lib/libc/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.20 src/lib/libc/arch/arm/gen/Makefile.inc:1.21 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.20 Tue Oct 30 12:42:37 2012 +++ src/lib/libc/arch/arm/gen/Makefile.inc Sat Jan 26 07:09:41 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.20 2012/10/30 12:42:37 christos Exp $ +# $NetBSD: Makefile.inc,v 1.21 2013/01/26 07:09:41 matt Exp $ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \ fabs.c flt_rounds.c modsi3.S umodsi3.S divide.S divsi3.S udivsi3.S @@ -11,6 +11,11 @@ SRCS+= isinff_ieee754.c isinfd_ieee754.c SRCS+= isnanf_ieee754.c isnand_ieee754.c SRCS+= signbitf_ieee754.c signbitd_ieee754.c +.if ${MACHINE_ARCH:Mearm*} != +SRCS+= __aeabi_fcmpun.c __aeabi_dcmpun.c +SRCS+= __aeabi_idiv0.c __aeabi_ldiv0.c +.endif + SRCS+= nanf.c SRCS+= setjmp.S
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: matt Date: Sat Jan 26 07:49:11 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/string: strchr_arm.S Log Message: Fix bug in detecting EOS/match on armv6+. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/string/strchr_arm.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/strchr_arm.S diff -u src/common/lib/libc/arch/arm/string/strchr_arm.S:1.2 src/common/lib/libc/arch/arm/string/strchr_arm.S:1.3 --- src/common/lib/libc/arch/arm/string/strchr_arm.S:1.2 Tue Jan 15 16:52:35 2013 +++ src/common/lib/libc/arch/arm/string/strchr_arm.S Sat Jan 26 07:49:11 2013 @@ -29,7 +29,7 @@ #include machine/asm.h -RCSID($NetBSD: strchr_arm.S,v 1.2 2013/01/15 16:52:35 matt Exp $) +RCSID($NetBSD: strchr_arm.S,v 1.3 2013/01/26 07:49:11 matt Exp $) #ifdef __ARMEL__ #define BYTE0 0x00ff @@ -92,6 +92,8 @@ ENTRY(strchr) */ mvns ip, ip /* did we encounter a NUL? */ beq .Lfind_match /* no, find the match */ + bics r3, r3, ip /* clear match for the NUL(s) */ + beq .Lnomatch /* any left set? if not, no match */ movs ip, ip, lshi #8 /* replicate NUL bit to other bytes */ orrne ip, ip, lshi #8 /* replicate NUL bit to other bytes */ orrne ip, ip, lshi #8 /* replicate NUL bit to other bytes */
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Sat Jan 26 07:52:17 UTC 2013 Modified Files: src/sys/dev/usb: if_smsc.c Log Message: Simplify the code by only checking for total_len pktlen once. The second check was actually wrong - found by matt@ and clang. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/if_smsc.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/usb/if_smsc.c diff -u src/sys/dev/usb/if_smsc.c:1.6 src/sys/dev/usb/if_smsc.c:1.7 --- src/sys/dev/usb/if_smsc.c:1.6 Tue Jan 22 12:40:43 2013 +++ src/sys/dev/usb/if_smsc.c Sat Jan 26 07:52:16 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if_smsc.c,v 1.6 2013/01/22 12:40:43 jmcneill Exp $ */ +/* $NetBSD: if_smsc.c,v 1.7 2013/01/26 07:52:16 skrll Exp $ */ /* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */ /* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */ @@ -1295,11 +1295,7 @@ smsc_rxeof(usbd_xfer_handle xfer, usbd_p } buf += sizeof(rxhdr); - - if ((total_len - pktlen) 0) - total_len = 0; - else - total_len -= pktlen; + total_len -= pktlen; m = smsc_newbuf(); if (m == NULL) {