CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Thu Jan 24 08:22:38 UTC 2013 Modified Files: src/sys/dev/usb: uaudio.c Log Message: oops, turn uaudiodebug off by default again. To generate a diff of this commit: cvs rdiff -u -r1.134 -r1.135 src/sys/dev/usb/uaudio.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/uaudio.c diff -u src/sys/dev/usb/uaudio.c:1.134 src/sys/dev/usb/uaudio.c:1.135 --- src/sys/dev/usb/uaudio.c:1.134 Tue Jan 22 12:40:43 2013 +++ src/sys/dev/usb/uaudio.c Thu Jan 24 08:22:38 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: uaudio.c,v 1.134 2013/01/22 12:40:43 jmcneill Exp $ */ +/* $NetBSD: uaudio.c,v 1.135 2013/01/24 08:22:38 mrg Exp $ */ /* * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uaudio.c,v 1.134 2013/01/22 12:40:43 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: uaudio.c,v 1.135 2013/01/24 08:22:38 mrg Exp $); #include sys/param.h #include sys/systm.h @@ -90,7 +90,7 @@ __KERNEL_RCSID(0, $NetBSD: uaudio.c,v 1 printf(%s[%d:%d]: x, __func__, l-l_proc-p_pid, l-l_lid, y); \ } \ } while (0) -int uaudiodebug = 6; +int uaudiodebug = 0; #else #define DPRINTF(x,y...) #define DPRINTFN_CLEAN(n,x...)
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Thu Jan 24 10:13:36 UTC 2013 Modified Files: src/sys/arch/arm/include: float.h Log Message: Kill more FPA leftovers. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/include/float.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/float.h diff -u src/sys/arch/arm/include/float.h:1.6 src/sys/arch/arm/include/float.h:1.7 --- src/sys/arch/arm/include/float.h:1.6 Sun Dec 11 12:16:47 2005 +++ src/sys/arch/arm/include/float.h Thu Jan 24 10:13:35 2013 @@ -1,31 +1,8 @@ -/* $NetBSD: float.h,v 1.6 2005/12/11 12:16:47 christos Exp $ */ +/* $NetBSD: float.h,v 1.7 2013/01/24 10:13:35 matt Exp $ */ #ifndef _ARM_FLOAT_H_ #define _ARM_FLOAT_H_ -#ifndef __VFP_FP__ -#define LDBL_MANT_DIG 64 -#define LDBL_EPSILON 1.0842021724855044340E-19L -#define LDBL_DIG 18 -#define LDBL_MIN_EXP (-16381) -#define LDBL_MIN 1.6810515715560467531E-4932L -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_EXP 16384 -#define LDBL_MAX 1.1897314953572317650E+4932L -#define LDBL_MAX_10_EXP 4932 -#endif - #include sys/float_ieee754.h -#ifndef __VFP_FP__ -#if !defined(_ANSI_SOURCE) !defined(_POSIX_C_SOURCE) \ -!defined(_XOPEN_SOURCE) || \ -((__STDC_VERSION__ - 0) = 199901L) || \ -((_POSIX_C_SOURCE - 0) = 200112L) || \ -((_XOPEN_SOURCE - 0) = 600) || \ -defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE) -#define DECIMAL_DIG 21 -#endif /* !defined(_ANSI_SOURCE) ... */ -#endif /* !__VFP_FP__ */ - #endif /* !_ARM_FLOAT_H_ */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Thu Jan 24 10:14:17 UTC 2013 Modified Files: src/sys/arch/arm/include: aeabi.h Log Message: Allow this to be included in libkern To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/include/aeabi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/aeabi.h diff -u src/sys/arch/arm/include/aeabi.h:1.2 src/sys/arch/arm/include/aeabi.h:1.3 --- src/sys/arch/arm/include/aeabi.h:1.2 Sat Aug 11 16:21:26 2012 +++ src/sys/arch/arm/include/aeabi.h Thu Jan 24 10:14:17 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: aeabi.h,v 1.2 2012/08/11 16:21:26 matt Exp $ */ +/* $NetBSD: aeabi.h,v 1.3 2013/01/24 10:14:17 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -31,7 +31,11 @@ #ifndef _ARM_AEABI_H_ #define _ARM_AEABI_H_ +#ifdef _KERNEL +#include sys/types.h +#else #include stddef.h +#endif #define __value_in_regs /* nothing */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Thu Jan 24 10:14:55 UTC 2013 Modified Files: src/sys/arch/arm/include: armreg.h Log Message: Don't define CP15 inlines when compiling for a _RUMPKERNEL To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/arm/include/armreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/armreg.h diff -u src/sys/arch/arm/include/armreg.h:1.71 src/sys/arch/arm/include/armreg.h:1.72 --- src/sys/arch/arm/include/armreg.h:1.71 Tue Dec 25 22:33:39 2012 +++ src/sys/arch/arm/include/armreg.h Thu Jan 24 10:14:55 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.71 2012/12/25 22:33:39 matt Exp $ */ +/* $NetBSD: armreg.h,v 1.72 2013/01/24 10:14:55 matt Exp $ */ /* * Copyright (c) 1998, 2001 Ben Harris @@ -557,7 +557,7 @@ #define CORTEX_CNTENC_C __BIT(31) /* Disables the cycle counter */ #define CORTEX_CNTOFL_C __BIT(31) /* Cycle counter overflow flag */ -#if !defined(__ASSEMBLER__) +#if !defined(__ASSEMBLER__) !defined(_RUMPKERNEL) #define ARMREG_READ_INLINE(name, __insnstring) \ static inline uint32_t armreg_##name##_read(void) \ {\
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Thu Jan 24 10:15:31 UTC 2013 Modified Files: src/sys/arch/arm/include: lock.h Log Message: Shut up clang but returning the result to a uint32_t variable. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/include/lock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/lock.h diff -u src/sys/arch/arm/include/lock.h:1.22 src/sys/arch/arm/include/lock.h:1.23 --- src/sys/arch/arm/include/lock.h:1.22 Sun Nov 25 20:40:30 2012 +++ src/sys/arch/arm/include/lock.h Thu Jan 24 10:15:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: lock.h,v 1.22 2012/11/25 20:40:30 pgoyette Exp $ */ +/* $NetBSD: lock.h,v 1.23 2013/01/24 10:15:30 matt Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -78,7 +78,8 @@ static __inline unsigned char __swp(__cpu_simple_lock_t __val, volatile __cpu_simple_lock_t *__ptr) { #ifdef _ARM_ARCH_6 - __cpu_simple_lock_t __rv, __tmp; + uint32_t __rv; + __cpu_simple_lock_t __tmp; if (sizeof(*__ptr) == 1) { __asm volatile( 1:\t @@ -112,9 +113,10 @@ __swp(__cpu_simple_lock_t __val, volatil } return __rv; #else + uint32_t __val32; __asm volatile(swpb %0, %1, [%2] - : =r (__val) : r (__val), r (__ptr) : memory); - return __val; + : =r (__val32) : r (__val), r (__ptr) : memory); + return __val32; #endif } #else
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Thu Jan 24 10:17:00 UTC 2013 Modified Files: src/sys/arch/arm/include: wchar_limits.h Log Message: Use __W{CHAR,INT}_{MIN,MAX}__ if they are defined as well as __W{CHAR,INT}_UNSIGNED__ to determine W{CHAR,INT}_{MIN,MAX} values. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/include/wchar_limits.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/wchar_limits.h diff -u src/sys/arch/arm/include/wchar_limits.h:1.3 src/sys/arch/arm/include/wchar_limits.h:1.4 --- src/sys/arch/arm/include/wchar_limits.h:1.3 Mon Apr 28 20:23:14 2008 +++ src/sys/arch/arm/include/wchar_limits.h Thu Jan 24 10:17:00 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: wchar_limits.h,v 1.3 2008/04/28 20:23:14 martin Exp $ */ +/* $NetBSD: wchar_limits.h,v 1.4 2013/01/24 10:17:00 matt Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -37,11 +37,39 @@ */ /* limits of wchar_t */ + +#ifdef __WCHAR_MIN__ +#define WCHAR_MIN __WCHAR_MIN__ /* wchar_t */ +#elif __WCHAR_UNSIGNED__ +#define WCHAR_MIN 0U/* wchar_t */ +#else #define WCHAR_MIN (-0x7fff-1) /* wchar_t */ +#endif + +#ifdef __WCHAR_MAX__ +#define WCHAR_MAX __WCHAR_MAX__ /* wchar_t */ +#elif __WCHAR_UNSIGNED__ +#define WCHAR_MAX 0xU /* wchar_t */ +#else #define WCHAR_MAX 0x7fff /* wchar_t */ +#endif /* limits of wint_t */ + +#ifdef __WINT_MIN__ +#define WINT_MIN __WINT_MIN__ /* wint_t */ +#elif __WINT_UNSIGNED__ +#define WINT_MIN 0U/* wint_t */ +#else #define WINT_MIN (-0x7fff-1) /* wint_t */ +#endif + +#ifdef __WINT_MAX__ +#define WINT_MAX __WINT_MAX__ /* wint_t */ +#elif __WINT_UNSIGNED__ +#define WINT_MAX 0xU /* wint_t */ +#else #define WINT_MAX 0x7fff /* wint_t */ +#endif #endif /* !_ARM_WCHAR_LIMITS_H_ */
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Thu Jan 24 10:18:41 UTC 2013 Modified Files: src/sys/arch/arm/include: ansi.h Log Message: Use __{PTRDIFF,SIZE,WCHAR,WINT}_TYPE__ is they are defined. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/include/ansi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/ansi.h diff -u src/sys/arch/arm/include/ansi.h:1.13 src/sys/arch/arm/include/ansi.h:1.14 --- src/sys/arch/arm/include/ansi.h:1.13 Sun Jul 17 20:54:37 2011 +++ src/sys/arch/arm/include/ansi.h Thu Jan 24 10:18:41 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.13 2011/07/17 20:54:37 joerg Exp $ */ +/* $NetBSD: ansi.h,v 1.14 2013/01/24 10:18:41 matt Exp $ */ /* * Copyright (c) 1990, 1993 @@ -48,15 +48,31 @@ * #endif */ #define _BSD_CLOCK_T_ unsigned int /* clock() */ +#ifdef __PTRDIFF_TYPE__ +#define _BSD_PTRDIFF_T_ __PTRDIFF_TYPE__ /* ptr1 - ptr2 */ +#else #define _BSD_PTRDIFF_T_ long int /* ptr1 - ptr2 */ +#endif +#ifdef __SIZE_TYPE__ +#define _BSD_SIZE_T_ __SIZE_TYPE__ /* sizeof() */ +#else #define _BSD_SIZE_T_ unsigned long int /* sizeof() */ -#define _BSD_SSIZE_T_ long int /* byte count or error */ +#endif +#define _BSD_SSIZE_T_ _BSD_PTRDIFF_T_ /* byte count or error */ #define _BSD_TIME_T_ __int64_t /* time() */ #define _BSD_CLOCKID_T_ int /* clockid_t */ #define _BSD_TIMER_T_ int /* timer_t */ #define _BSD_SUSECONDS_T_ int /* suseconds_t */ #define _BSD_USECONDS_T_ unsigned int /* useconds_t */ +#ifdef __WCHAR_TYPE__ +#define _BSD_WCHAR_T_ __WCHAR_TYPE__ /* wchar_t */ +#else #define _BSD_WCHAR_T_ int /* wchar_t */ +#endif +#ifdef __WINT_TYPE__ +#define _BSD_WINT_T_ __WINT_TYPE__ /* wint_t */ +#else #define _BSD_WINT_T_ int /* wint_t */ +#endif #endif /* _ANSI_H_ */
CVS commit: src/lib/libterminfo
Module Name:src Committed By: roy Date: Thu Jan 24 10:28:29 UTC 2013 Modified Files: src/lib/libterminfo: tparm.c Log Message: As tparm accepts longs we should treat them as long during expansion. Also, fix the ~ and ! logic. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 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/tparm.c diff -u src/lib/libterminfo/tparm.c:1.10 src/lib/libterminfo/tparm.c:1.11 --- src/lib/libterminfo/tparm.c:1.10 Wed Jan 23 13:06:18 2013 +++ src/lib/libterminfo/tparm.c Thu Jan 24 10:28:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: tparm.c,v 1.10 2013/01/23 13:06:18 roy Exp $ */ +/* $NetBSD: tparm.c,v 1.11 2013/01/24 10:28:28 roy Exp $ */ /* * Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: tparm.c,v 1.10 2013/01/23 13:06:18 roy Exp $); +__RCSID($NetBSD: tparm.c,v 1.11 2013/01/24 10:28:28 roy Exp $); #include sys/param.h #include assert.h @@ -41,21 +41,24 @@ __RCSID($NetBSD: tparm.c,v 1.10 2013/01 #include term_private.h #include term.h +#define LONG_STR_MAX ((CHAR_BIT * sizeof(long)) / 3) +#define BUFINC 128 /* Size to increament the terminal buffer by */ + static TERMINAL *dumbterm; /* For non thread safe functions */ typedef struct { - int nums[20]; + long nums[20]; char *strings[20]; size_t offset; } TPSTACK; typedef struct { - int num; + long num; char *string; } TPVAR; static int -push(int num, char *string, TPSTACK *stack) +push(long num, char *string, TPSTACK *stack) { if (stack-offset = sizeof(stack-nums)) { errno = E2BIG; @@ -68,7 +71,7 @@ push(int num, char *string, TPSTACK *sta } static int -pop(int *num, char **string, TPSTACK *stack) +pop(long *num, char **string, TPSTACK *stack) { if (stack-offset == 0) { if (num) @@ -92,7 +95,7 @@ checkbuf(TERMINAL *term, size_t len) char *buf; if (term-_bufpos + len = term-_buflen) { - len = term-_buflen + MAX(len, BUFSIZ); + len = term-_buflen + MAX(len, BUFINC); buf = realloc(term-_buf, len); if (buf == NULL) return NULL; @@ -115,14 +118,13 @@ ochar(TERMINAL *term, int c) } static size_t -onum(TERMINAL *term, const char *fmt, int num, int len) +onum(TERMINAL *term, const char *fmt, int num, unsigned int len) { size_t l; - /* Assume we never have natural number longer than 64 chars */ - if (len 64) - len = 64; - if (checkbuf(term, (size_t)len + 1) == NULL) + if (len LONG_STR_MAX) + len = LONG_STR_MAX; + if (checkbuf(term, len + 2) == NULL) return 0; l = sprintf(term-_buf + term-_bufpos, fmt, num); term-_bufpos += l; @@ -130,16 +132,16 @@ onum(TERMINAL *term, const char *fmt, in } static char * -_ti_tiparm(TERMINAL *term, const char *str, va_list parms) +_ti_tiparm(TERMINAL *term, const char *str, int va_long, va_list parms) { const char *sp; char c, fmt[64], *fp, *ostr; - int val, val2; - int dnums[26]; /* dynamic variables a-z, not preserved */ + long val, val2; + long dnums[26]; /* dynamic variables a-z, not preserved */ size_t l, max; TPSTACK stack; TPVAR params[9]; - int done, dot, minus, width, precision, olen; + unsigned int done, dot, minus, width, precision, olen; int piss[9]; /* Parameter IS String - piss ;) */ if (str == NULL) @@ -151,7 +153,6 @@ _ti_tiparm(TERMINAL *term, const char *s still work with non thread safe functions (which sadly are still the norm and standard). */ - if (term == NULL) { if (dumbterm == NULL) { dumbterm = malloc(sizeof(*dumbterm)); @@ -165,10 +166,10 @@ _ti_tiparm(TERMINAL *term, const char *s term-_bufpos = 0; /* Ensure we have an initial buffer */ if (term-_buflen == 0) { - term-_buf = malloc(BUFSIZ); + term-_buf = malloc(BUFINC); if (term-_buf == NULL) return NULL; - term-_buflen = BUFSIZ; + term-_buflen = BUFINC; } /* @@ -209,13 +210,14 @@ _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] == 0) - params[l].num = va_arg(parms, int); - else + 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); } - term-_bufpos = 0; memset(stack, 0, sizeof(stack)); while ((c = *str++) != '\0') { if (c != '%' || (c = *str++) == '%') { @@ -234,11 +236,15 @@ _ti_tiparm(TERMINAL *term, const char *s while (done == 0 (size_t)(fp - fmt) sizeof(fmt)) { switch (c) { case 'c': /* FALLTHROUGH */ + case 's': +*fp++ = c; +done = 1; +break; case 'd': /* FALLTHROUGH */ case 'o': /* FALLTHROUGH */ case 'x': /* FALLTHROUGH */ case 'X': /* FALLTHROUGH */ - case 's': +*fp++ = 'l'; *fp++ = c; done = 1; break; @@ -287,7 +293,7 @@
CVS commit: src
Module Name:src Committed By: roy Date: Thu Jan 24 10:41:29 UTC 2013 Modified Files: src/lib/libterminfo: term_private.h tparm.c src/usr.bin/tput: Makefile tput.c Log Message: Move the strings vs long analysis to a private function, but allow tput(1) to use it so we can work with string parameters to capabilities. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libterminfo/term_private.h cvs rdiff -u -r1.11 -r1.12 src/lib/libterminfo/tparm.c cvs rdiff -u -r1.10 -r1.11 src/usr.bin/tput/Makefile cvs rdiff -u -r1.22 -r1.23 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/lib/libterminfo/term_private.h diff -u src/lib/libterminfo/term_private.h:1.10 src/lib/libterminfo/term_private.h:1.11 --- src/lib/libterminfo/term_private.h:1.10 Sun Jun 3 23:19:10 2012 +++ src/lib/libterminfo/term_private.h Thu Jan 24 10:41:28 2013 @@ -1,7 +1,7 @@ -/* $NetBSD: term_private.h,v 1.10 2012/06/03 23:19:10 joerg Exp $ */ +/* $NetBSD: term_private.h,v 1.11 2013/01/24 10:41:28 roy Exp $ */ /* - * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. + * Copyright (c) 2009, 2010, 2013 The NetBSD Foundation, Inc. * * This code is derived from software contributed to The NetBSD Foundation * by Roy Marples. @@ -157,4 +157,7 @@ size_t _ti_store_extra(TIC *, int, char TIC *_ti_compile(char *, int); ssize_t _ti_flatten(uint8_t **, const TIC *); void _ti_freetic(TIC *); + +#define TPARM_MAX 9 /* not likely to change */ +int _ti_parm_analyse(const char *, int *, int); #endif Index: src/lib/libterminfo/tparm.c diff -u src/lib/libterminfo/tparm.c:1.11 src/lib/libterminfo/tparm.c:1.12 --- src/lib/libterminfo/tparm.c:1.11 Thu Jan 24 10:28:28 2013 +++ src/lib/libterminfo/tparm.c Thu Jan 24 10:41:28 2013 @@ -1,7 +1,7 @@ -/* $NetBSD: tparm.c,v 1.11 2013/01/24 10:28:28 roy Exp $ */ +/* $NetBSD: tparm.c,v 1.12 2013/01/24 10:41:28 roy Exp $ */ /* - * Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. + * Copyright (c) 2009, 2011, 2013 The NetBSD Foundation, Inc. * * This code is derived from software contributed to The NetBSD Foundation * by Roy Marples. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: tparm.c,v 1.11 2013/01/24 10:28:28 roy Exp $); +__RCSID($NetBSD: tparm.c,v 1.12 2013/01/24 10:41:28 roy Exp $); #include sys/param.h #include assert.h @@ -42,7 +42,7 @@ __RCSID($NetBSD: tparm.c,v 1.11 2013/01 #include term.h #define LONG_STR_MAX ((CHAR_BIT * sizeof(long)) / 3) -#define BUFINC 128 /* Size to increament the terminal buffer by */ +#define BUFINC 128 /* Size to increament the terminal buffer by */ static TERMINAL *dumbterm; /* For non thread safe functions */ @@ -131,18 +131,63 @@ onum(TERMINAL *term, const char *fmt, in return l; } +/* + Make a pass through the string so we can work out + which parameters are ints and which are char *. + Basically we only use char * if %p[1-9] is followed by %l or %s. +*/ +int +_ti_parm_analyse(const char *str, int *piss, int piss_len) +{ + int nparm, lpop; + char c; + + nparm = 0; + lpop = -1; + while ((c = *str++) != '\0') { + if (c != '%') + continue; + c = *str++; + switch (c) { + case 'l': /* FALLTHROUGH */ + case 's': +if (lpop 0) { + if (lpop = piss_len) + piss[lpop - 1] = 1; + else if (piss) + errno = E2BIG; +} +break; + case 'p': +c = *str++; +if (c '1' || c '9') { + errno = EINVAL; + continue; +} else { + lpop = c - '0'; + if (lpop nparm) + nparm = lpop; +} +break; + default: +lpop = -1; + } + } + + return nparm; +} + static char * _ti_tiparm(TERMINAL *term, const char *str, int va_long, va_list parms) { - const char *sp; char c, fmt[64], *fp, *ostr; long val, val2; long dnums[26]; /* dynamic variables a-z, not preserved */ size_t l, max; TPSTACK stack; - TPVAR params[9]; + TPVAR params[TPARM_MAX]; unsigned int done, dot, minus, width, precision, olen; - int piss[9]; /* Parameter IS String - piss ;) */ + int piss[TPARM_MAX]; /* Parameter IS String - piss ;) */ if (str == NULL) return NULL; @@ -172,40 +217,8 @@ _ti_tiparm(TERMINAL *term, const char *s term-_buflen = BUFINC; } - /* - Make a first pass through the string so we can work out - which parameters are ints and which are char *. - Basically we only use char * if %p[1-9] is followed by %l or %s. - */ memset(piss, 0, sizeof(piss)); - max = 0; - sp = str; - while ((c = *sp++) != '\0') { - if (c != '%') - continue; - c = *sp++; - if (c == '\0') - break; - if (c != 'p') - continue; - c = *sp++; - if (c '1' || c '9') { - errno = EINVAL; - continue; - } - l = c - '0'; - if (l max) - max = l; - if (*sp != '%') - continue; - /* Skip formatting */ - sp++; - while (*sp == '.' || *sp == '#' || *sp == ' ' || *sp == ':' || - *sp == '-' || isdigit((unsigned
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: nakayama Date: Thu Jan 24 11:06:20 UTC 2013 Modified Files: src/sys/arch/sparc64/dev: lom.c Log Message: Fix typo in KASSERT, pointed out by riastradh@ and martin@. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sparc64/dev/lom.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/dev/lom.c diff -u src/sys/arch/sparc64/dev/lom.c:1.10 src/sys/arch/sparc64/dev/lom.c:1.11 --- src/sys/arch/sparc64/dev/lom.c:1.10 Sat Jun 2 21:36:42 2012 +++ src/sys/arch/sparc64/dev/lom.c Thu Jan 24 11:06:20 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: lom.c,v 1.10 2012/06/02 21:36:42 dsl Exp $ */ +/* $NetBSD: lom.c,v 1.11 2013/01/24 11:06:20 nakayama Exp $ */ /* $OpenBSD: lom.c,v 1.21 2010/02/28 20:44:39 kettenis Exp $ */ /* * Copyright (c) 2009 Mark Kettenis @@ -17,7 +17,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: lom.c,v 1.10 2012/06/02 21:36:42 dsl Exp $); +__KERNEL_RCSID(0, $NetBSD: lom.c,v 1.11 2013/01/24 11:06:20 nakayama Exp $); #include sys/param.h #include sys/device.h @@ -857,7 +857,7 @@ lom2_intr(void *arg) return (1); } - KASSERT(sc-sc_state = LOM_STATE_DATA); + KASSERT(sc-sc_state == LOM_STATE_DATA); lc-lc_data = obr; TAILQ_REMOVE(sc-sc_queue, lc, lc_next);
CVS commit: src/tools
Module Name:src Committed By: christos Date: Thu Jan 24 13:35:52 UTC 2013 Modified Files: src/tools/ctfconvert: Makefile src/tools/ctfmerge: Makefile Log Message: Pr/47500: Henning Petersen: Don't install man pages for tools To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tools/ctfconvert/Makefile cvs rdiff -u -r1.2 -r1.3 src/tools/ctfmerge/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/ctfconvert/Makefile diff -u src/tools/ctfconvert/Makefile:1.2 src/tools/ctfconvert/Makefile:1.3 --- src/tools/ctfconvert/Makefile:1.2 Sat Jun 19 19:11:10 2010 +++ src/tools/ctfconvert/Makefile Thu Jan 24 08:35:52 2013 @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.2 2010/06/19 23:11:10 riz Exp $ +# $NetBSD: Makefile,v 1.3 2013/01/24 13:35:52 christos Exp $ .include bsd.own.mk +NOMAN= # defined + HOSTPROGNAME= ${_TOOL_PREFIX}ctfconvert HOST_SRCDIR=external/cddl/osnet/usr.bin/ctfconvert #HOST_SRCS= alist.c \ Index: src/tools/ctfmerge/Makefile diff -u src/tools/ctfmerge/Makefile:1.2 src/tools/ctfmerge/Makefile:1.3 --- src/tools/ctfmerge/Makefile:1.2 Sat Jun 19 19:11:10 2010 +++ src/tools/ctfmerge/Makefile Thu Jan 24 08:35:52 2013 @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.2 2010/06/19 23:11:10 riz Exp $ +# $NetBSD: Makefile,v 1.3 2013/01/24 13:35:52 christos Exp $ .include bsd.own.mk +NOMAN= # defined + HOSTPROGNAME= ${_TOOL_PREFIX}ctfmerge HOST_SRCDIR=external/cddl/osnet/usr.bin/ctfmerge
CVS commit: src/sys/arch
Module Name:src Committed By: bouyer Date: Thu Jan 24 13:58:41 UTC 2013 Modified Files: src/sys/arch/amd64/conf: XEN3_DOMU src/sys/arch/i386/conf: XEN3_DOMU Log Message: Put back 32k MAXPHYS, reverting http://mail-index.netbsd.org/source-changes/2013/01/19/msg040666.html 64k MAXPHYS breaks at last iso9660, as shown by periodic anita runs at http://www-soc.lip6.fr/~bouyer/NetBSD-tests/xen/ To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/amd64/conf/XEN3_DOMU cvs rdiff -u -r1.47 -r1.48 src/sys/arch/i386/conf/XEN3_DOMU Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/XEN3_DOMU diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.42 src/sys/arch/amd64/conf/XEN3_DOMU:1.43 --- src/sys/arch/amd64/conf/XEN3_DOMU:1.42 Sat Jan 19 16:19:56 2013 +++ src/sys/arch/amd64/conf/XEN3_DOMU Thu Jan 24 13:58:40 2013 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.42 2013/01/19 16:19:56 jakllsch Exp $ +# $NetBSD: XEN3_DOMU,v 1.43 2013/01/24 13:58:40 bouyer Exp $ include arch/amd64/conf/std.xen @@ -13,6 +13,7 @@ options INCLUDE_CONFIG_FILE # embed con maxusers 32 # estimated number of users # +options MAXPHYS=32768 #xbd doesn't handle 64k transfers #options DOM0OPS #options USER_LDT # user-settable LDT; used by WINE Index: src/sys/arch/i386/conf/XEN3_DOMU diff -u src/sys/arch/i386/conf/XEN3_DOMU:1.47 src/sys/arch/i386/conf/XEN3_DOMU:1.48 --- src/sys/arch/i386/conf/XEN3_DOMU:1.47 Sat Jan 19 16:19:55 2013 +++ src/sys/arch/i386/conf/XEN3_DOMU Thu Jan 24 13:58:41 2013 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.47 2013/01/19 16:19:55 jakllsch Exp $ +# $NetBSD: XEN3_DOMU,v 1.48 2013/01/24 13:58:41 bouyer Exp $ include arch/xen/conf/std.xen @@ -167,6 +167,7 @@ options NFS_BOOT_DHCP,NFS_BOOT_BOOTPARA #options NFS_BOOTSTATIC_SERVER=\server:/path/to/root\ #options __XEN_INTERFACE_VERSION__=0x00030205 # Xen 3.1 interface +options MAXPHYS=32768 #xbd doesn't handle 64k transfers config netbsd root on ? type ? #config netbsd root on wd0a type ffs
CVS commit: src/lib/libterminfo
Module Name:src Committed By: roy Date: Thu Jan 24 14:17:40 UTC 2013 Modified Files: src/lib/libterminfo: Makefile.hash Log Message: Fix building our terminals with a non standard NETBSDSRCDIR, PR lib/46793. Thanks to Bernd Ernesti. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libterminfo/Makefile.hash 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/Makefile.hash diff -u src/lib/libterminfo/Makefile.hash:1.6 src/lib/libterminfo/Makefile.hash:1.7 --- src/lib/libterminfo/Makefile.hash:1.6 Mon Aug 20 15:44:02 2012 +++ src/lib/libterminfo/Makefile.hash Thu Jan 24 14:17:40 2013 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile.hash,v 1.6 2012/08/20 15:44:02 joerg Exp $ +# $NetBSD: Makefile.hash,v 1.7 2013/01/24 14:17:40 roy Exp $ SCRIPT_ENV= \ + NETBSDSRCDIR=${NETBSDSRCDIR:Q} \ TOOL_AWK=${TOOL_AWK:Q} \ TOOL_NBPERF=${TOOL_NBPERF:Q} \ TOOL_SED=${TOOL_SED:Q} \
CVS commit: src/sys/netinet6
Module Name:src Committed By: joerg Date: Thu Jan 24 14:23:09 UTC 2013 Modified Files: src/sys/netinet6: nd6.c Log Message: Use rt_getkey. To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/sys/netinet6/nd6.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/nd6.c diff -u src/sys/netinet6/nd6.c:1.143 src/sys/netinet6/nd6.c:1.144 --- src/sys/netinet6/nd6.c:1.143 Sat Jun 23 03:14:04 2012 +++ src/sys/netinet6/nd6.c Thu Jan 24 14:23:09 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6.c,v 1.143 2012/06/23 03:14:04 christos Exp $ */ +/* $NetBSD: nd6.c,v 1.144 2013/01/24 14:23:09 joerg Exp $ */ /* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: nd6.c,v 1.143 2012/06/23 03:14:04 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: nd6.c,v 1.144 2013/01/24 14:23:09 joerg Exp $); #include opt_ipsec.h @@ -1144,7 +1144,7 @@ nd6_rtrequest(int req, struct rtentry *r uint8_t namelen = strlen(ifp-if_xname), addrlen = ifp-if_addrlen; struct ifaddr *ifa; - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); if (req == RTM_LLINFO_UPD) { int rc; @@ -1179,7 +1179,7 @@ nd6_rtrequest(int req, struct rtentry *r return; if (nd6_need_cache(ifp) == 0 (rt-rt_flags RTF_HOST) == 0) { - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); /* * This is probably an interface direct route for a link * which does not need neighbor caches (e.g. fe80::%lo0/64). @@ -1193,7 +1193,7 @@ nd6_rtrequest(int req, struct rtentry *r if (req == RTM_RESOLVE (nd6_need_cache(ifp) == 0 || /* stf case */ !nd6_is_addr_neighbor(satocsin6(rt_getkey(rt)), ifp))) { - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); /* * FreeBSD and BSD/OS often make a cloned host route based * on a less-specific route (e.g. the default route). @@ -1214,7 +1214,7 @@ nd6_rtrequest(int req, struct rtentry *r switch (req) { case RTM_ADD: - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); /* * There is no backward compatibility :) * @@ -1244,14 +1244,14 @@ nd6_rtrequest(int req, struct rtentry *r } rt_setgate(rt, u.sa); gate = rt-rt_gateway; - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); if (ln != NULL) nd6_llinfo_settimer(ln, 0); - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); if ((rt-rt_flags RTF_CLONING) != 0) break; } - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); /* * In IPv4 code, we try to annonuce new RTF_ANNOUNCE entry here. * We don't do that here since llinfo is not ready yet. @@ -1282,7 +1282,7 @@ nd6_rtrequest(int req, struct rtentry *r /* FALLTHROUGH */ case RTM_RESOLVE: if ((ifp-if_flags (IFF_POINTOPOINT | IFF_LOOPBACK)) == 0) { - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); /* * Address resolution isn't necessary for a point to * point link, so we can skip this test for a p2p link. @@ -1297,23 +1297,23 @@ nd6_rtrequest(int req, struct rtentry *r } satosdl(gate)-sdl_type = ifp-if_type; satosdl(gate)-sdl_index = ifp-if_index; - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); } if (ln != NULL) break; /* This happens on a route change */ - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); /* * Case 2: This route may come from cloning, or a manual route * add with a LL address. */ R_Malloc(ln, struct llinfo_nd6 *, sizeof(*ln)); rt-rt_llinfo = ln; - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); if (ln == NULL) { log(LOG_DEBUG, nd6_rtrequest: malloc failed\n); break; } - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); nd6_inuse++; nd6_allocated++; memset(ln, 0, sizeof(*ln)); @@ -1336,7 +1336,7 @@ nd6_rtrequest(int req, struct rtentry *r ln-ln_state = ND6_LLINFO_NOSTATE; nd6_llinfo_settimer(ln, 0); } - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n, rt_getkey(rt)); rt-rt_flags |= RTF_LLINFO; ln-ln_next = llinfo_nd6.ln_next; llinfo_nd6.ln_next = ln; @@ -1372,14 +1372,14 @@ nd6_rtrequest(int req, struct rtentry *r } } - RT_DPRINTF(rt-_rt_key = %p\n, (void *)rt-_rt_key); + RT_DPRINTF(rt_getkey(rt) = %p\n,
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Jan 24 14:23:45 UTC 2013 Modified Files: src/sys/kern: kern_rndq.c Log Message: Assert equality, not assignment, in rnd_hwrng_test. Not tested, but by inspection, the only caller, rnd_process_events, clearly guarantees the condition. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/kern/kern_rndq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_rndq.c diff -u src/sys/kern/kern_rndq.c:1.7 src/sys/kern/kern_rndq.c:1.8 --- src/sys/kern/kern_rndq.c:1.7 Wed Jan 16 06:45:24 2013 +++ src/sys/kern/kern_rndq.c Thu Jan 24 14:23:45 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_rndq.c,v 1.7 2013/01/16 06:45:24 msaitoh Exp $ */ +/* $NetBSD: kern_rndq.c,v 1.8 2013/01/24 14:23:45 riastradh Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.7 2013/01/16 06:45:24 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.8 2013/01/24 14:23:45 riastradh Exp $); #include sys/param.h #include sys/ioctl.h @@ -759,7 +759,7 @@ rnd_hwrng_test(rnd_sample_t *sample) uint8_t *v1, *v2; size_t resid, totest; - KASSERT(source-type = RND_TYPE_RNG); + KASSERT(source-type == RND_TYPE_RNG); /* * Continuous-output test: compare two halves of the
CVS commit: src/bin/pax
Module Name:src Committed By: christos Date: Thu Jan 24 17:43:44 UTC 2013 Modified Files: src/bin/pax: tar.c tar.h Log Message: Recognize extended attribute headers and warn about them since we are not currently handling them. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/bin/pax/tar.c cvs rdiff -u -r1.9 -r1.10 src/bin/pax/tar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/pax/tar.c diff -u src/bin/pax/tar.c:1.70 src/bin/pax/tar.c:1.71 --- src/bin/pax/tar.c:1.70 Thu Aug 9 04:09:22 2012 +++ src/bin/pax/tar.c Thu Jan 24 12:43:44 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: tar.c,v 1.70 2012/08/09 08:09:22 christos Exp $ */ +/* $NetBSD: tar.c,v 1.71 2013/01/24 17:43:44 christos Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)tar.c 8.2 (Berkeley) 4/18/94; #else -__RCSID($NetBSD: tar.c,v 1.70 2012/08/09 08:09:22 christos Exp $); +__RCSID($NetBSD: tar.c,v 1.71 2013/01/24 17:43:44 christos Exp $); #endif #endif /* not lint */ @@ -948,6 +948,13 @@ ustar_rd(ARCHD *arcn, char *buf) hd-typeflag == LONGLINKTYPE ? Link : File); } break; + case FILEXTYPE: + case GLOBXTYPE: + tty_warn(0, %s extended headers posix ustar archive. + Extracting as plain files. Following files might be + in the wrong directory or have wrong attributes., + hd-typeflag == FILEXTYPE ? File : Global); + /*FALLTHROUGH*/ case CONTTYPE: case AREGTYPE: case REGTYPE: Index: src/bin/pax/tar.h diff -u src/bin/pax/tar.h:1.9 src/bin/pax/tar.h:1.10 --- src/bin/pax/tar.h:1.9 Tue May 11 13:12:26 2004 +++ src/bin/pax/tar.h Thu Jan 24 12:43:44 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: tar.h,v 1.9 2004/05/11 17:12:26 christos Exp $ */ +/* $NetBSD: tar.h,v 1.10 2013/01/24 17:43:44 christos Exp $ */ /*- * Copyright (c) 1992 Keith Muller. @@ -59,6 +59,8 @@ #define DIRTYPE '5' /* Directory */ #define FIFOTYPE '6' /* FIFO */ #define CONTTYPE '7' /* high perf file */ +#define GLOBXTYPE 'g' /* global extended header */ +#define FILEXTYPE 'x' /* file extended header */ /* * GNU tar compatibility;
CVS commit: src/usr.sbin/rtadvd
Module Name:src Committed By: christos Date: Thu Jan 24 17:44:59 UTC 2013 Modified Files: src/usr.sbin/rtadvd: config.c Log Message: make it static const To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/rtadvd/config.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/rtadvd/config.c diff -u src/usr.sbin/rtadvd/config.c:1.31 src/usr.sbin/rtadvd/config.c:1.32 --- src/usr.sbin/rtadvd/config.c:1.31 Fri Dec 14 04:48:31 2012 +++ src/usr.sbin/rtadvd/config.c Thu Jan 24 12:44:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: config.c,v 1.31 2012/12/14 09:48:31 roy Exp $ */ +/* $NetBSD: config.c,v 1.32 2013/01/24 17:44:59 christos Exp $ */ /* $KAME: config.c,v 1.93 2005/10/17 14:40:02 suz Exp $ */ /* @@ -1308,7 +1308,7 @@ make_packet(struct rainfo *rainfo) static int getinet6sysctl(int code) { - int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, 0 }; + static const int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, 0 }; int value; size_t size;
CVS commit: src/usr.bin/usbhidaction
Module Name:src Committed By: christos Date: Thu Jan 24 17:46:00 UTC 2013 Modified Files: src/usr.bin/usbhidaction: usbhidaction.c Log Message: use O_CLOEXEC To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/usbhidaction/usbhidaction.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/usbhidaction/usbhidaction.c diff -u src/usr.bin/usbhidaction/usbhidaction.c:1.24 src/usr.bin/usbhidaction/usbhidaction.c:1.25 --- src/usr.bin/usbhidaction/usbhidaction.c:1.24 Sun Jan 18 02:14:03 2009 +++ src/usr.bin/usbhidaction/usbhidaction.c Thu Jan 24 12:46:00 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: usbhidaction.c,v 1.24 2009/01/18 07:14:03 lukem Exp $ */ +/* $NetBSD: usbhidaction.c,v 1.25 2013/01/24 17:46:00 christos Exp $ */ /* * Copyright (c) 2000, 2002 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: usbhidaction.c,v 1.24 2009/01/18 07:14:03 lukem Exp $); +__RCSID($NetBSD: usbhidaction.c,v 1.25 2013/01/24 17:46:00 christos Exp $); #endif #include stdio.h @@ -143,14 +143,10 @@ main(int argc, char **argv) if (demon conf[0] != '/') errx(1, config file must have an absolute path, %s, conf); - fd = open(dev, O_RDWR); + fd = open(dev, O_RDWR | O_CLOEXEC); if (fd 0) err(1, %s, dev); - /* Avoid passing the device file descriptor to executed commands */ - if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) - err(1, fcntl(F_SETFD, FD_CLOEXEC)); - if (ioctl(fd, USB_GET_REPORT_ID, reportid) 0) reportid = -1; repd = hid_get_report_desc(fd);
CVS commit: src/usr.bin/newgrp
Module Name:src Committed By: christos Date: Thu Jan 24 17:46:30 UTC 2013 Modified Files: src/usr.bin/newgrp: grutil.c Log Message: fix type or rval. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/newgrp/grutil.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/newgrp/grutil.c diff -u src/usr.bin/newgrp/grutil.c:1.2 src/usr.bin/newgrp/grutil.c:1.3 --- src/usr.bin/newgrp/grutil.c:1.2 Mon Apr 28 16:24:14 2008 +++ src/usr.bin/newgrp/grutil.c Thu Jan 24 12:46:30 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: grutil.c,v 1.2 2008/04/28 20:24:14 martin Exp $ */ +/* $NetBSD: grutil.c,v 1.3 2013/01/24 17:46:30 christos Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__RCSID($NetBSD: grutil.c,v 1.2 2008/04/28 20:24:14 martin Exp $); +__RCSID($NetBSD: grutil.c,v 1.3 2013/01/24 17:46:30 christos Exp $); #include sys/param.h #include err.h @@ -137,7 +137,8 @@ addgid(gid_t *groups, int ngroups, int n static addgrp_ret_t addgrp(gid_t newgid, int makespace) { - int ngroups, ngroupsmax, rval; + int ngroups, ngroupsmax; + addgrp_ret_t rval; gid_t *groups; gid_t oldgid;
CVS commit: src/usr.bin/ktrace
Module Name:src Committed By: christos Date: Thu Jan 24 17:47:59 UTC 2013 Modified Files: src/usr.bin/ktrace: ktrace.c Log Message: use O_CLOEXEC. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/usr.bin/ktrace/ktrace.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/ktrace/ktrace.c diff -u src/usr.bin/ktrace/ktrace.c:1.45 src/usr.bin/ktrace/ktrace.c:1.46 --- src/usr.bin/ktrace/ktrace.c:1.45 Fri Sep 16 11:39:26 2011 +++ src/usr.bin/ktrace/ktrace.c Thu Jan 24 12:47:58 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ktrace.c,v 1.45 2011/09/16 15:39:26 joerg Exp $ */ +/* $NetBSD: ktrace.c,v 1.46 2013/01/24 17:47:58 christos Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = @(#)ktrace.c 8.2 (Berkeley) 4/28/95; #else -__RCSID($NetBSD: ktrace.c,v 1.45 2011/09/16 15:39:26 joerg Exp $); +__RCSID($NetBSD: ktrace.c,v 1.46 2013/01/24 17:47:58 christos Exp $); #endif #endif /* not lint */ @@ -70,7 +70,6 @@ static int rpid(char *); __dead static void usage(void); static int do_ktrace(const char *, int, int, int, int, int); __dead static void no_ktrace(int); -static void fset(int fd, int flag); static void fclear(int fd, int flag); #ifdef KTRUSS @@ -270,17 +269,6 @@ rpid(char *p) } static void -fset(int fd, int flag) -{ - int oflag = fcntl(fd, F_GETFL, 0); - - if (oflag == -1) - err(EXIT_FAILURE, Cannot get file flags); - if (fcntl(fd, F_SETFL, oflag | flag) == -1) - err(EXIT_FAILURE, Cannot set file flags); -} - -static void fclear(int fd, int flag) { int oflag = fcntl(fd, F_GETFL, 0); @@ -340,11 +328,9 @@ do_ktrace(const char *tracefile, int ver (!tracefile || strcmp(tracefile, -) == 0)) { int pi[2], dofork; - if (pipe(pi) 0) + if (pipe2(pi, O_CLOEXEC) == -1) err(EXIT_FAILURE, pipe(2)); - fset(pi[0], FD_CLOEXEC); - fset(pi[1], FD_CLOEXEC); dofork = (pid == getpid()); if (dofork) {
CVS commit: src/usr.bin/find
Module Name:src Committed By: christos Date: Thu Jan 24 17:50:08 UTC 2013 Modified Files: src/usr.bin/find: main.c Log Message: use O_CLOEXEC, wrap long line. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.bin/find/main.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/find/main.c diff -u src/usr.bin/find/main.c:1.30 src/usr.bin/find/main.c:1.31 --- src/usr.bin/find/main.c:1.30 Fri Sep 16 11:39:25 2011 +++ src/usr.bin/find/main.c Thu Jan 24 12:50:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.30 2011/09/16 15:39:25 joerg Exp $ */ +/* $NetBSD: main.c,v 1.31 2013/01/24 17:50:08 christos Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -39,7 +39,7 @@ static char sccsid[] = @(#)main.c 8.4 ( #else __COPYRIGHT(@(#) Copyright (c) 1990, 1993, 1994\ The Regents of the University of California. All rights reserved.); -__RCSID($NetBSD: main.c,v 1.30 2011/09/16 15:39:25 joerg Exp $); +__RCSID($NetBSD: main.c,v 1.31 2013/01/24 17:50:08 christos Exp $); #endif #endif /* not lint */ @@ -148,8 +148,7 @@ main(int argc, char *argv[]) *p = NULL; - if ((dotfd = open(., O_RDONLY, 0)) == -1 || - fcntl(dotfd, F_SETFD, FD_CLOEXEC) == -1) + if ((dotfd = open(., O_RDONLY | O_CLOEXEC, 0)) == -1) err(1, .); exit(find_execute(find_formplan(argv), start)); @@ -159,7 +158,7 @@ static void usage(void) { - (void)fprintf(stderr, -usage: find [-H | -L | -P] [-dEhsXx] [-f file] file [file ...] [expression]\n); + (void)fprintf(stderr, Usage: %s [-H | -L | -P] [-dEhsXx] [-f file] + file [file ...] [expression]\n, getprogname()); exit(1); }
CVS commit: src/sbin/mount
Module Name:src Committed By: christos Date: Thu Jan 24 17:53:49 UTC 2013 Modified Files: src/sbin/mount: mount.c Log Message: use return instead of exit. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sbin/mount/mount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/mount/mount.c diff -u src/sbin/mount/mount.c:1.97 src/sbin/mount/mount.c:1.98 --- src/sbin/mount/mount.c:1.97 Wed Jun 13 20:39:33 2012 +++ src/sbin/mount/mount.c Thu Jan 24 12:53:49 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mount.c,v 1.97 2012/06/14 00:39:33 christos Exp $ */ +/* $NetBSD: mount.c,v 1.98 2013/01/24 17:53:49 christos Exp $ */ /* * Copyright (c) 1980, 1989, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = @(#)mount.c 8.25 (Berkeley) 5/8/95; #else -__RCSID($NetBSD: mount.c,v 1.97 2012/06/14 00:39:33 christos Exp $); +__RCSID($NetBSD: mount.c,v 1.98 2013/01/24 17:53:49 christos Exp $); #endif #endif /* not lint */ @@ -204,8 +204,7 @@ main(int argc, char *argv[]) prmount(mntbuf[i]); } } - exit(rval); - /* NOTREACHED */ + return rval; case 1: if (vfslist != NULL) { usage(); @@ -325,8 +324,7 @@ out: } #endif - exit(rval); - /* NOTREACHED */ + return rval; } int
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: christos Date: Thu Jan 24 17:57:29 UTC 2013 Modified Files: src/libexec/ld.elf_so: xmalloc.c Log Message: don't free cp before we copy it! To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/libexec/ld.elf_so/xmalloc.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/xmalloc.c diff -u src/libexec/ld.elf_so/xmalloc.c:1.11 src/libexec/ld.elf_so/xmalloc.c:1.12 --- src/libexec/ld.elf_so/xmalloc.c:1.11 Wed May 25 10:41:46 2011 +++ src/libexec/ld.elf_so/xmalloc.c Thu Jan 24 12:57:29 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: xmalloc.c,v 1.11 2011/05/25 14:41:46 christos Exp $ */ +/* $NetBSD: xmalloc.c,v 1.12 2013/01/24 17:57:29 christos Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -77,7 +77,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: xmalloc.c,v 1.11 2011/05/25 14:41:46 christos Exp $); +__RCSID($NetBSD: xmalloc.c,v 1.12 2013/01/24 17:57:29 christos Exp $); #endif /* not lint */ #include stdlib.h @@ -369,12 +369,13 @@ irealloc(void *cp, size_t nbytes) *(u_short *)((caddr_t)(op + 1) + op-ov_size) = RMAGIC; #endif return(cp); - } else - xfree(cp); + } if ((res = imalloc(nbytes)) == NULL) return (NULL); - if (cp != res) /* common optimization if compacting */ + if (cp != res) { /* common optimization if compacting */ memcpy(res, cp, (nbytes onb) ? nbytes : onb); + xfree(cp); + } return (res); }
CVS commit: src/sbin/newfs_msdos
Module Name:src Committed By: christos Date: Thu Jan 24 19:24:57 UTC 2013 Modified Files: src/sbin/newfs_msdos: mkfs_msdos.c Log Message: toolify To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sbin/newfs_msdos/mkfs_msdos.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/newfs_msdos/mkfs_msdos.c diff -u src/sbin/newfs_msdos/mkfs_msdos.c:1.4 src/sbin/newfs_msdos/mkfs_msdos.c:1.5 --- src/sbin/newfs_msdos/mkfs_msdos.c:1.4 Wed Jan 23 19:10:09 2013 +++ src/sbin/newfs_msdos/mkfs_msdos.c Thu Jan 24 14:24:56 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mkfs_msdos.c,v 1.4 2013/01/24 00:10:09 christos Exp $ */ +/* $NetBSD: mkfs_msdos.c,v 1.5 2013/01/24 19:24:56 christos Exp $ */ /* * Copyright (c) 1998 Robert Nordier @@ -27,13 +27,17 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#if HAVE_NBTOOL_CONFIG_H +#include nbtool_config.h +#endif + #include sys/cdefs.h #ifndef lint #if 0 static const char rcsid[] = $FreeBSD: src/sbin/newfs_msdos/newfs_msdos.c,v 1.15 2000/10/10 01:49:37 wollman Exp $; #else -__RCSID($NetBSD: mkfs_msdos.c,v 1.4 2013/01/24 00:10:09 christos Exp $); +__RCSID($NetBSD: mkfs_msdos.c,v 1.5 2013/01/24 19:24:56 christos Exp $); #endif #endif /* not lint */ @@ -42,7 +46,9 @@ __RCSID($NetBSD: mkfs_msdos.c,v 1.4 201 #include sys/mount.h #include sys/stat.h #include sys/time.h +#ifndef MAKEFS #include sys/disk.h +#endif #include ctype.h #include err.h @@ -59,7 +65,9 @@ __RCSID($NetBSD: mkfs_msdos.c,v 1.4 201 #include util.h #include disktab.h +#ifndef MAKEFS #include partutil.h +#endif #include mkfs_msdos.h #define MAXU16 0x /* maximum unsigned 16-bit quantity */ @@ -223,7 +231,9 @@ static u_int8_t bootcode[] = { static int got_siginfo = 0; /* received a SIGINFO */ +#ifndef MAKEFS static int check_mounted(const char *, mode_t); +#endif static int getstdfmt(const char *, struct bpb *); static int getbpbinfo(int, const char *, const char *, int, struct bpb *, int); static void print_bpb(struct bpb *); @@ -284,9 +294,11 @@ mkfs_msdos(const char *fname, const char warn(%s, fname); return -1; } +#ifndef MAKEFS if (!o.no_create) if (check_mounted(fname, sb.st_mode) == -1) return -1; +#endif if (!S_ISCHR(sb.st_mode) !o.create_size) { warnx(warning, %s is not a character device, fname); return -1; @@ -603,7 +615,9 @@ mkfs_msdos(const char *fname, const char if (!(img = malloc(bpb.bps))) err(1, NULL); dir = bpb.res + (bpb.spf ? bpb.spf : bpb.bspf) * bpb.nft; +#ifdef SIGINFO signal(SIGINFO, infohandler); +#endif for (lsn = 0; lsn dir + (o.fat_type == 32 ? bpb.spc : rds); lsn++) { if (got_siginfo) { fprintf(stderr,%s: writing sector %u of %u (%u%%)\n, @@ -727,6 +741,7 @@ mkfs_msdos(const char *fname, const char return 0; } +#ifndef MAKEFS /* * return -1 with error if file system is mounted. */ @@ -759,6 +774,7 @@ check_mounted(const char *fname, mode_t } return 0; } +#endif /* * Get a standard format. @@ -785,8 +801,6 @@ static int getbpbinfo(int fd, const char *fname, const char *dtype, int iflag, struct bpb *bpb, int create) { -struct disk_geom geo; -struct dkwedge_info dkw; const char *s1, *s2; int part; @@ -811,11 +825,22 @@ getbpbinfo(int fd, const char *fname, co #endif if (((part != -1) ((!iflag part != -1) || !bpb-bsec)) || !bpb-bps || !bpb-spt || !bpb-hds) { - if (create + u_int sector_size; + u_int nsectors; + u_int ntracks; + u_int size; #ifndef MAKEFS - || getdiskinfo(fname, fd, NULL, geo, dkw) == -1 + struct disk_geom geo; + struct dkwedge_info dkw; + + if (!create getdiskinfo(fname, fd, NULL, geo, dkw) != -1) { + sector_size = geo.dg_secsize = 512; + nsectors = geo.dg_nsectors = 63; + ntracks = geo.dg_ntracks = 255; + size = dkw.dkw_size; + } else #endif - ) { + { struct stat st; if (fstat(fd, st) == -1) { @@ -823,37 +848,37 @@ getbpbinfo(int fd, const char *fname, co return -1; } /* create a fake geometry for a file image */ - geo.dg_secsize = 512; - geo.dg_nsectors = 63; - geo.dg_ntracks = 255; - dkw.dkw_size = st.st_size / geo.dg_secsize; + sector_size = 512; + nsectors = 63; + ntracks = 255; + size = st.st_size / sector_size; } if (!bpb-bps) { - if (ckgeom(fname, geo.dg_secsize, bytes/sector) == -1) + if (ckgeom(fname, sector_size, bytes/sector) == -1) return -1; - bpb-bps = geo.dg_secsize; + bpb-bps = sector_size; } - if (geo.dg_nsectors 63) { + if (nsectors 63) { /* * The kernel doesn't accept BPB with spt 63. * (see sys/fs/msdosfs/msdosfs_vfsops.c:msdosfs_mountfs()) * If values taken from disklabel don't match these * restrictions, use popular BIOS default values instead. */ - geo.dg_nsectors = 63; + nsectors = 63; } if (!bpb-spt) { - if
CVS commit: src/usr.sbin/rtadvd
Module Name:src Committed By: christos Date: Thu Jan 24 19:55:28 UTC 2013 Modified Files: src/usr.sbin/rtadvd: config.c Log Message: fix previous. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/rtadvd/config.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/rtadvd/config.c diff -u src/usr.sbin/rtadvd/config.c:1.32 src/usr.sbin/rtadvd/config.c:1.33 --- src/usr.sbin/rtadvd/config.c:1.32 Thu Jan 24 12:44:59 2013 +++ src/usr.sbin/rtadvd/config.c Thu Jan 24 14:55:28 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: config.c,v 1.32 2013/01/24 17:44:59 christos Exp $ */ +/* $NetBSD: config.c,v 1.33 2013/01/24 19:55:28 christos Exp $ */ /* $KAME: config.c,v 1.93 2005/10/17 14:40:02 suz Exp $ */ /* @@ -1308,11 +1308,10 @@ make_packet(struct rainfo *rainfo) static int getinet6sysctl(int code) { - static const int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, 0 }; + const int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, code }; int value; size_t size; - mib[3] = code; size = sizeof(value); if (sysctl(mib, __arraycount(mib), value, size, NULL, 0) 0) {
CVS commit: src/usr.bin/make
Module Name:src Committed By: sjg Date: Fri Jan 25 02:01:11 UTC 2013 Modified Files: src/usr.bin/make: compat.c job.c main.c Log Message: Remove Check_Cwd - it is no longer needed. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/usr.bin/make/compat.c cvs rdiff -u -r1.163 -r1.164 src/usr.bin/make/job.c cvs rdiff -u -r1.203 -r1.204 src/usr.bin/make/main.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/make/compat.c diff -u src/usr.bin/make/compat.c:1.90 src/usr.bin/make/compat.c:1.91 --- src/usr.bin/make/compat.c:1.90 Sun Oct 7 19:17:31 2012 +++ src/usr.bin/make/compat.c Fri Jan 25 02:01:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.90 2012/10/07 19:17:31 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = $NetBSD: compat.c,v 1.90 2012/10/07 19:17:31 sjg Exp $; +static char rcsid[] = $NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $; #else #include sys/cdefs.h #ifndef lint #if 0 static char sccsid[] = @(#)compat.c 8.2 (Berkeley) 3/19/94; #else -__RCSID($NetBSD: compat.c,v 1.90 2012/10/07 19:17:31 sjg Exp $); +__RCSID($NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $); #endif #endif /* not lint */ #endif @@ -374,7 +374,6 @@ again: Fatal(Could not fork); } if (cpid == 0) { - Check_Cwd(av); Var_ExportVars(); #ifdef USE_META if (useMeta) { Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.163 src/usr.bin/make/job.c:1.164 --- src/usr.bin/make/job.c:1.163 Tue Jul 3 21:03:40 2012 +++ src/usr.bin/make/job.c Fri Jan 25 02:01:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.163 2012/07/03 21:03:40 sjg Exp $ */ +/* $NetBSD: job.c,v 1.164 2013/01/25 02:01:10 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = $NetBSD: job.c,v 1.163 2012/07/03 21:03:40 sjg Exp $; +static char rcsid[] = $NetBSD: job.c,v 1.164 2013/01/25 02:01:10 sjg Exp $; #else #include sys/cdefs.h #ifndef lint #if 0 static char sccsid[] = @(#)job.c 8.2 (Berkeley) 3/19/94; #else -__RCSID($NetBSD: job.c,v 1.163 2012/07/03 21:03:40 sjg Exp $); +__RCSID($NetBSD: job.c,v 1.164 2013/01/25 02:01:10 sjg Exp $); #endif #endif /* not lint */ #endif @@ -675,7 +675,6 @@ JobPrintCommand(void *cmdp, void *jobp) char *escCmd = NULL;/* Command with quotes/backticks escaped */ char *cmd = (char *)cmdp; Job *job = (Job *)jobp; -char *cp, *tmp; int i, j; noSpecials = NoExecute(job-node); @@ -847,11 +846,6 @@ JobPrintCommand(void *cmdp, void *jobp) job-flags |= JOB_TRACED; } -if ((cp = Check_Cwd_Cmd(cmd)) != NULL) { - DBPRINTF(test -d %s , cp); - DBPRINTF(cd %s\n, cp); -} - DBPRINTF(cmdTemplate, cmd); free(cmdStart); if (escCmd) @@ -871,10 +865,6 @@ JobPrintCommand(void *cmdp, void *jobp) if (shutUp commandShell-hasEchoCtl) { DBPRINTF(%s\n, commandShell-echoOn); } -if (cp != NULL) { - DBPRINTF(test -d %s , cp); - DBPRINTF(cd %s\n, Var_Value(.OBJDIR, VAR_GLOBAL, tmp)); -} return 0; } Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.203 src/usr.bin/make/main.c:1.204 --- src/usr.bin/make/main.c:1.203 Fri Aug 31 07:00:36 2012 +++ src/usr.bin/make/main.c Fri Jan 25 02:01:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.203 2012/08/31 07:00:36 sjg Exp $ */ +/* $NetBSD: main.c,v 1.204 2013/01/25 02:01:10 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = $NetBSD: main.c,v 1.203 2012/08/31 07:00:36 sjg Exp $; +static char rcsid[] = $NetBSD: main.c,v 1.204 2013/01/25 02:01:10 sjg Exp $; #else #include sys/cdefs.h #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT(@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = @(#)main.c 8.3 (Berkeley) 3/19/94; #else -__RCSID($NetBSD: main.c,v 1.203 2012/08/31 07:00:36 sjg Exp $); +__RCSID($NetBSD: main.c,v 1.204 2013/01/25 02:01:10 sjg Exp $); #endif #endif /* not lint */ #endif @@ -176,7 +176,6 @@ Boolean varNoExportEnv; /* -X flag */ Boolean doing_depend; /* Set while reading .depend */ static Boolean jobsRunning; /* TRUE if the jobs might be running */ static const char * tracefile; -static char * Check_Cwd_av(int, char **, int); static void MainParseArgs(int, char **); static int ReadMakefile(const void *, const void *); static void usage(void) MAKE_ATTR_DEAD; @@ -1165,8 +1164,6 @@ main(int argc, char **argv) jp_0, jp_1, maxJobs, maxJobTokens, compatMake); Main_ExportMAKEFLAGS(TRUE); /* initial export */ - - Check_Cwd_av(0, NULL, 0); /* initialize it */ /* @@