CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: christos Date: Thu Feb 5 22:05:33 UTC 2015 Modified Files: src/lib/libc/stdlib: reallocarray.3 Log Message: Remove incorrect comment about size; mention that the malloc ambiguity is part of the C standard. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/stdlib/reallocarray.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdlib/reallocarray.3 diff -u src/lib/libc/stdlib/reallocarray.3:1.1 src/lib/libc/stdlib/reallocarray.3:1.2 --- src/lib/libc/stdlib/reallocarray.3:1.1 Thu Feb 5 15:02:28 2015 +++ src/lib/libc/stdlib/reallocarray.3 Thu Feb 5 17:05:33 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: reallocarray.3,v 1.1 2015/02/05 20:02:28 christos Exp $ +.\" $NetBSD: reallocarray.3,v 1.2 2015/02/05 22:05:33 christos Exp $ .\" .Dd February 5, 2015 .Dt REALLOCARRAY 3 @@ -84,17 +84,10 @@ functions by centralizing the overflow c and .Fa size . .Pp -Implementation issues prevent the function from being used correctly (a -.Dv 0 -.Fa size -parameter will return -.Dv ENOMEM -in the -.Ox -implementation), while there are still portability issues (it does not solve +There are still portability issues (it does not solve the .Dv 0 -sized allocation return ambiguity: does +sized allocation return ambiguity in the C standard: does .Fn reallocarray return .Dv NULL @@ -104,7 +97,7 @@ mean that an error occurred, and can som .Dv errno in that case to find out what happened?). .Pp -For those reasons +For this reason .Nx decided to go with an alternative implementation, and created .Xr reallocarr 3 .
CVS commit: src/sys/net/npf
Module Name:src Committed By: rmind Date: Thu Feb 5 22:04:03 UTC 2015 Modified Files: src/sys/net/npf: npf_conn.c Log Message: npf_conn_establish: fix the previous change - drop the reference on error. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/net/npf/npf_conn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/npf/npf_conn.c diff -u src/sys/net/npf/npf_conn.c:1.15 src/sys/net/npf/npf_conn.c:1.16 --- src/sys/net/npf/npf_conn.c:1.15 Sun Feb 1 22:41:22 2015 +++ src/sys/net/npf/npf_conn.c Thu Feb 5 22:04:03 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_conn.c,v 1.15 2015/02/01 22:41:22 rmind Exp $ */ +/* $NetBSD: npf_conn.c,v 1.16 2015/02/05 22:04:03 rmind Exp $ */ /*- * Copyright (c) 2014-2015 Mindaugas Rasiukevicius @@ -99,7 +99,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.15 2015/02/01 22:41:22 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: npf_conn.c,v 1.16 2015/02/05 22:04:03 rmind Exp $"); #include #include @@ -528,8 +528,8 @@ err: * here since there might be references acquired already. */ if (error) { - const u_int dflags = CONN_REMOVED | CONN_EXPIRE; - atomic_or_uint(&con->c_flags, dflags); + atomic_or_uint(&con->c_flags, CONN_REMOVED | CONN_EXPIRE); + atomic_dec_uint(&con->c_refcnt); npf_stats_inc(NPF_STAT_RACE_CONN); } else { NPF_PRINTF(("NPF: establish conn %p\n", con)); @@ -569,6 +569,8 @@ npf_conn_destroy(npf_conn_t *con) /* * npf_conn_setnat: associate NAT entry with the connection, update and * re-insert connection entry using the translation values. + * + * => The caller must be holding a reference. */ int npf_conn_setnat(const npf_cache_t *npc, npf_conn_t *con,
CVS commit: src/etc/etc.alpha
Module Name:src Committed By: snj Date: Thu Feb 5 21:50:42 UTC 2015 Modified Files: src/etc/etc.alpha: Makefile.inc Log Message: don't create an empty installation/misc directory in the release tree. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/etc/etc.alpha/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/etc/etc.alpha/Makefile.inc diff -u src/etc/etc.alpha/Makefile.inc:1.8 src/etc/etc.alpha/Makefile.inc:1.9 --- src/etc/etc.alpha/Makefile.inc:1.8 Tue Jul 24 10:49:23 2007 +++ src/etc/etc.alpha/Makefile.inc Thu Feb 5 21:50:42 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.8 2007/07/24 10:49:23 pavel Exp $ +# $NetBSD: Makefile.inc,v 1.9 2015/02/05 21:50:42 snj Exp $ # # etc.alpha/Makefile.inc -- alpha-specific etc Makefile targets # @@ -13,8 +13,7 @@ BUILD_KERNELS+= INSTALL INSTALLATION_DIRS+= installation/floppy \ installation/diskimage \ installation/instkernel \ - installation/netboot \ - installation/misc + installation/netboot snap_md_post: cd ${KERNSRCDIR}/arch/alpha/stand/netboot && ${MAKE} release
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: christos Date: Thu Feb 5 20:02:29 UTC 2015 Modified Files: src/lib/libc/stdlib: Makefile.inc malloc.3 Added Files: src/lib/libc/stdlib: reallocarray.3 Log Message: Revert addition to reallocarray to the malloc man page, but keep the examples. Add separate manual page to reallocarray explaining what are the problems with it. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/lib/libc/stdlib/Makefile.inc cvs rdiff -u -r1.39 -r1.40 src/lib/libc/stdlib/malloc.3 cvs rdiff -u -r0 -r1.1 src/lib/libc/stdlib/reallocarray.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdlib/Makefile.inc diff -u src/lib/libc/stdlib/Makefile.inc:1.87 src/lib/libc/stdlib/Makefile.inc:1.88 --- src/lib/libc/stdlib/Makefile.inc:1.87 Thu Feb 5 11:04:35 2015 +++ src/lib/libc/stdlib/Makefile.inc Thu Feb 5 15:02:28 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.87 2015/02/05 16:04:35 christos Exp $ +# $NetBSD: Makefile.inc,v 1.88 2015/02/05 20:02:28 christos Exp $ # from: @(#)Makefile.inc 8.3 (Berkeley) 2/4/95 # stdlib sources @@ -52,7 +52,7 @@ MAN+= a64l.3 abort.3 abs.3 alloca.3 atex malloc.3 memory.3 mi_vector_hash.3 \ posix_memalign.3 posix_openpt.3 ptsname.3 \ qabs.3 qdiv.3 quick_exit.3 qsort.3 \ - radixsort.3 rand48.3 rand.3 random.3 \ + radixsort.3 rand48.3 rand.3 random.3 reallocarray.3 \ strfmon.3 strsuftoll.3 strtod.3 strtol.3 strtoul.3 strtonum.3 \ system.3 \ tsearch.3 \ @@ -74,7 +74,6 @@ MLINKS+=hcreate.3 hdestroy1.3 hcreate.3 MLINKS+=insque.3 remque.3 MLINKS+=lsearch.3 lfind.3 MLINKS+=malloc.3 calloc.3 malloc.3 realloc.3 malloc.3 free.3 -MLINKS+=malloc.3 reallocarray.3 MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3 MLINKS+=ptsname.3 ptsname_r.3 MLINKS+=rand.3 rand_r.3 Index: src/lib/libc/stdlib/malloc.3 diff -u src/lib/libc/stdlib/malloc.3:1.39 src/lib/libc/stdlib/malloc.3:1.40 --- src/lib/libc/stdlib/malloc.3:1.39 Thu Feb 5 11:04:35 2015 +++ src/lib/libc/stdlib/malloc.3 Thu Feb 5 15:02:28 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: malloc.3,v 1.39 2015/02/05 16:04:35 christos Exp $ +.\" $NetBSD: malloc.3,v 1.40 2015/02/05 20:02:28 christos Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -38,7 +38,7 @@ .Dt MALLOC 3 .Os .Sh NAME -.Nm malloc , calloc , realloc , reallocarray, free +.Nm malloc , calloc , realloc , free .Nd general purpose memory allocation functions .Sh LIBRARY .Lb libc @@ -50,8 +50,6 @@ .Fn calloc "size_t number" "size_t size" .Ft void * .Fn realloc "void *ptr" "size_t size" -.Ft void * -.Fn reallocarray "void *ptr" "size_t number" "size_t size" .Ft void .Fn free "void *ptr" .Sh DESCRIPTION @@ -76,7 +74,7 @@ The result is identical to calling with an argument of .Dq "number * size" , with the exception that the allocated memory is explicitly initialized -to zero bytes, and overflow is being checked. +to zero bytes. .Pp The .Fn realloc @@ -93,21 +91,8 @@ Upon success, the memory referenced by .Fa ptr is freed and a pointer to the newly allocated memory is returned. .Pp -The -.Fn reallocarray -function is similar to -.Fn realloc -except it operates on -.Fa number -members of size -.Fa size -and checks for integer overflow in the calculation of\ -.Dq "number * size" . -.Pp Note that .Fn realloc -and -.Fn reallocarray may move the memory allocation, resulting in a different return value than .Fa ptr . If @@ -145,9 +130,7 @@ is set to .Pp The .Fn realloc -and -.Fn reallocarray -functions return a pointer, possibly identical to +function returns a pointer, possibly identical to .Fa ptr , to the allocated memory if successful; otherwise a @@ -159,9 +142,7 @@ is set to if the error was the result of an allocation failure. The .Fn realloc -and -.Fn reallocarray -functions always leave the original buffer intact +function always leaves the original buffer intact when an error occurs. .Pp The @@ -178,7 +159,7 @@ if ((p = malloc(number * size)) == NULL) .Pp The multiplication may lead to an integer overflow. To avoid this, -.Fn reallocarray +.Xr reallocarr 3 is recommended. .Pp If @@ -214,12 +195,13 @@ Assuming the implementation checks for i does, it is much easier to use .Fn calloc or -.Fn reallocarray . +.Xr reallocarr 3 . .Pp The above examples could be simplified to: .Bd -literal -offset indent -if ((p = reallocarray(NULL, num, size)) == NULL) - err(1, "reallocarray"); +ptr = NULL; +if ((e = reallocarr(&ptr, num, size))) + errx(1, "reallocarr", strerror(e)); .Ed .Bd -literal -offset indent or at the cost of initialization: @@ -270,7 +252,8 @@ size = newsize; .Xr atexit 3 , .Xr getpagesize 3 , .Xr memory 3 , -.Xr posix_memalign 3 +.Xr posix_memalign 3 , +.Xr reallocarr 3 .Pp For the implementation details, see .Xr jemalloc 3 . @@ -283,10 +266,3 @@ and .Fn free functions conform to
CVS commit: src/usr.sbin/mrouted
Module Name:src Committed By: gdt Date: Thu Feb 5 16:50:19 UTC 2015 Modified Files: src/usr.sbin/mrouted: vif.c Log Message: Fix bug in mrouted about aging neighbors. mrouted will periodically age its neighbors and will remove a neighbor if it hasn't heard from it for NEIGHBOR_EXPIRE_TIME. Unfortunately, the neighbor pointers 'a' and 'prev_a' were never advanced when timer was not expired. Therefore it would get stuck in a tight loop, advancing 'al_timer' until it would be greater than NEIGHBOR_EXPIRE_TIME. This caused the neighbor to allways get timed out and dropped. Furthermore, there was a second bug in this loop when deleting an item that was not at the head of the list (i.e., prev_a should stay the same instead of advancing). This bug fix is the work of Konrad Lorincz. Bug found and fix made on netbsd-6. This material is based upon work supported by the Defense Advanced Research Projects Agency and Space and Naval Warfare Systems Center, Pacific, under Contract No. N66001-09-C-2073. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the Defense Advanced Research Project Agency and Space and Naval Warfare Systems Center, Pacific. Approved for Public Release, Distribution Unlimited To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/mrouted/vif.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/mrouted/vif.c diff -u src/usr.sbin/mrouted/vif.c:1.18 src/usr.sbin/mrouted/vif.c:1.19 --- src/usr.sbin/mrouted/vif.c:1.18 Thu May 25 01:43:58 2006 +++ src/usr.sbin/mrouted/vif.c Thu Feb 5 16:50:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vif.c,v 1.18 2006/05/25 01:43:58 christos Exp $ */ +/* $NetBSD: vif.c,v 1.19 2015/02/05 16:50:19 gdt Exp $ */ /* * The mrouted program is covered by the license in the accompanying file @@ -1201,10 +1201,13 @@ age_vifs(void) v->uv_flags |= VIFF_LEAF; } - for (prev_a = a = v->uv_neighbors; a != NULL;) { + for (prev_a = NULL, a = v->uv_neighbors; a != NULL;) { - if ((a->al_timer += TIMER_INTERVAL) < NEIGHBOR_EXPIRE_TIME) + if ((a->al_timer += TIMER_INTERVAL) < NEIGHBOR_EXPIRE_TIME) { + prev_a = a; + a = a->al_next; continue; + } /* * Neighbor has expired; delete it from the neighbor list, @@ -1213,14 +1216,14 @@ age_vifs(void) * another neighbor with a lower IP address than mine. */ addr = a->al_addr; - if (a == v->uv_neighbors) { + if (a == v->uv_neighbors) { /* implies prev_a == NULL */ v->uv_neighbors = a->al_next; free((char *)a); - prev_a = a = v->uv_neighbors; + a = v->uv_neighbors; /* prev_a stays NULL */ } else { prev_a->al_next = a->al_next; free((char *)a); - prev_a = a = prev_a->al_next; + a = prev_a->al_next; /* prev_a stays the same */ } delete_neighbor_from_routes(addr, vifi);
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: christos Date: Thu Feb 5 16:07:16 UTC 2015 Modified Files: src/distrib/sets/lists/comp: mi Log Message: add reallocarray. To generate a diff of this commit: cvs rdiff -u -r1.1944 -r1.1945 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1944 src/distrib/sets/lists/comp/mi:1.1945 --- src/distrib/sets/lists/comp/mi:1.1944 Sun Jan 25 19:22:02 2015 +++ src/distrib/sets/lists/comp/mi Thu Feb 5 11:07:15 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1944 2015/01/26 00:22:02 christos Exp $ +# $NetBSD: mi,v 1.1945 2015/02/05 16:07:15 christos Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -8765,6 +8765,7 @@ ./usr/share/man/cat3/re_exec.0 comp-c-catman .cat ./usr/share/man/cat3/readdir.0 comp-c-catman .cat ./usr/share/man/cat3/readdir_r.0 comp-c-catman .cat +./usr/share/man/cat3/reallocarray.0 comp-c-catman .cat ./usr/share/man/cat3/realloc.0 comp-c-catman .cat ./usr/share/man/cat3/realpath.0 comp-c-catman .cat ./usr/share/man/cat3/recno.0 comp-c-catman .cat @@ -10767,6 +10768,7 @@ ./usr/share/man/cat9/ratecheck.0 comp-sys-catman .cat ./usr/share/man/cat9/readdisklabel.0 comp-sys-catman .cat ./usr/share/man/cat9/realloc.0 comp-sys-catman .cat +./usr/share/man/cat9/realloc.0 comp-sys-catman .cat ./usr/share/man/cat9/relookup.0 comp-sys-catman .cat ./usr/share/man/cat9/remrunqueue.0 comp-obsolete obsolete ./usr/share/man/cat9/resettodr.0 comp-sys-catman .cat @@ -15603,6 +15605,7 @@ ./usr/share/man/html3/re_exec.html comp-c-htmlman html ./usr/share/man/html3/readdir.html comp-c-htmlman html ./usr/share/man/html3/readdir_r.html comp-c-htmlman html +./usr/share/man/html3/reallocarray.html comp-c-htmlman html ./usr/share/man/html3/realloc.html comp-c-htmlman html ./usr/share/man/html3/realpath.html comp-c-htmlman html ./usr/share/man/html3/recno.html comp-c-htmlman html @@ -22441,6 +22444,7 @@ ./usr/share/man/man3/re_exec.3 comp-c-man .man ./usr/share/man/man3/readdir.3 comp-c-man .man ./usr/share/man/man3/readdir_r.3 comp-c-man .man +./usr/share/man/man3/reallocarray.3 comp-c-man .man ./usr/share/man/man3/realloc.3 comp-c-man .man ./usr/share/man/man3/realpath.3 comp-c-man .man ./usr/share/man/man3/recno.3 comp-c-man .man
CVS commit: src/include
Module Name:src Committed By: christos Date: Thu Feb 5 16:05:46 UTC 2015 Modified Files: src/include: stdlib.h Log Message: add reallocarray To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/include/stdlib.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/stdlib.h diff -u src/include/stdlib.h:1.112 src/include/stdlib.h:1.113 --- src/include/stdlib.h:1.112 Sun Jan 18 12:56:09 2015 +++ src/include/stdlib.h Thu Feb 5 11:05:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: stdlib.h,v 1.112 2015/01/18 17:56:09 christos Exp $ */ +/* $NetBSD: stdlib.h,v 1.113 2015/02/05 16:05:46 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -364,6 +364,7 @@ unsigned long long int strtoull_l(const char * __restrict, char ** __restrict, int, locale_t); # if defined(_NETBSD_SOURCE) +void *reallocarray(void *, size_t, size_t); quad_t strtoq_l(const char * __restrict, char ** __restrict, int, locale_t); u_quad_t strtouq_l(const char * __restrict, char ** __restrict, int, locale_t);
CVS commit: src/lib/libc
Module Name:src Committed By: christos Date: Thu Feb 5 16:05:20 UTC 2015 Modified Files: src/lib/libc/gen: sysctl.c src/lib/libc/stdio: gettemp.c Log Message: add a couple of casts. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/lib/libc/gen/sysctl.c cvs rdiff -u -r1.19 -r1.20 src/lib/libc/stdio/gettemp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/sysctl.c diff -u src/lib/libc/gen/sysctl.c:1.34 src/lib/libc/gen/sysctl.c:1.35 --- src/lib/libc/gen/sysctl.c:1.34 Fri May 16 08:22:32 2014 +++ src/lib/libc/gen/sysctl.c Thu Feb 5 11:05:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.c,v 1.34 2014/05/16 12:22:32 martin Exp $ */ +/* $NetBSD: sysctl.c,v 1.35 2015/02/05 16:05:20 christos Exp $ */ /*- * Copyright (c) 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)sysctl.c 8.2 (Berkeley) 1/4/94"; #else -__RCSID("$NetBSD: sysctl.c,v 1.34 2014/05/16 12:22:32 martin Exp $"); +__RCSID("$NetBSD: sysctl.c,v 1.35 2015/02/05 16:05:20 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -313,7 +313,7 @@ user_sysctl(const int *name, unsigned in if (d2 != NULL) memcpy(d2, d1, d); sz += d; - d2 = (struct sysctldesc *)((char *)d2 + d); + d2 = (struct sysctldesc *)(void *)((char *)d2 + d); if (node != NULL) break; } Index: src/lib/libc/stdio/gettemp.c diff -u src/lib/libc/stdio/gettemp.c:1.19 src/lib/libc/stdio/gettemp.c:1.20 --- src/lib/libc/stdio/gettemp.c:1.19 Thu Jun 19 01:31:15 2014 +++ src/lib/libc/stdio/gettemp.c Thu Feb 5 11:05:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: gettemp.c,v 1.19 2014/06/19 05:31:15 msaitoh Exp $ */ +/* $NetBSD: gettemp.c,v 1.20 2015/02/05 16:05:20 christos Exp $ */ /* * Copyright (c) 1987, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: gettemp.c,v 1.19 2014/06/19 05:31:15 msaitoh Exp $"); +__RCSID("$NetBSD: gettemp.c,v 1.20 2015/02/05 16:05:20 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -85,13 +85,13 @@ GETTEMP(char *path, int *doopen, int dom /* Fill space with random characters */ while (trv >= path && *trv == 'X') { - r = arc4random_uniform(sizeof(padchar) - 1); + r = arc4random_uniform((unsigned int)(sizeof(padchar) - 1)); *trv-- = padchar[r]; } start = trv + 1; /* save first combination of random characters */ - memcpy(carrybuf, start, suffp - start); + memcpy(carrybuf, start, (size_t)(suffp - start)); /* * check the target directory.
CVS commit: src/lib/libc
Module Name:src Committed By: christos Date: Thu Feb 5 16:04:35 UTC 2015 Modified Files: src/lib/libc/regex: regcomp.c src/lib/libc/stdlib: Makefile.inc malloc.3 Added Files: src/lib/libc/stdlib: reallocarray.c Log Message: Add and use reallocarray() to prevent a multiplication overflow in allocation. Reported by Guido Vranken, thanks! To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/lib/libc/regex/regcomp.c cvs rdiff -u -r1.86 -r1.87 src/lib/libc/stdlib/Makefile.inc cvs rdiff -u -r1.38 -r1.39 src/lib/libc/stdlib/malloc.3 cvs rdiff -u -r0 -r1.1 src/lib/libc/stdlib/reallocarray.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/regex/regcomp.c diff -u src/lib/libc/regex/regcomp.c:1.33 src/lib/libc/regex/regcomp.c:1.34 --- src/lib/libc/regex/regcomp.c:1.33 Tue Mar 13 17:13:43 2012 +++ src/lib/libc/regex/regcomp.c Thu Feb 5 11:04:35 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: regcomp.c,v 1.33 2012/03/13 21:13:43 christos Exp $ */ +/* $NetBSD: regcomp.c,v 1.34 2015/02/05 16:04:35 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -76,11 +76,12 @@ #if 0 static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94"; #else -__RCSID("$NetBSD: regcomp.c,v 1.33 2012/03/13 21:13:43 christos Exp $"); +__RCSID("$NetBSD: regcomp.c,v 1.34 2015/02/05 16:04:35 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ #include "namespace.h" +#include #include #include @@ -262,12 +263,11 @@ regcomp( len = strlen(pattern); /* do the mallocs early so failure handling is easy */ - g = (struct re_guts *)malloc(sizeof(struct re_guts) + - (NC-1)*sizeof(cat_t)); + g = malloc(sizeof(struct re_guts) + (NC - 1) * sizeof(cat_t)); if (g == NULL) return(REG_ESPACE); p->ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */ - p->strip = malloc(p->ssize * sizeof(sop)); + p->strip = reallocarray(NULL, p->ssize, sizeof(sop)); p->slen = 0; if (p->strip == NULL) { free(g); @@ -1249,14 +1249,15 @@ allocset( if (MEMSIZE(p) > MEMLIMIT) goto oomem; if (p->g->sets == NULL) - p->g->sets = malloc(nc * sizeof(cset)); + p->g->sets = reallocarray(NULL, nc, sizeof(cset)); else - p->g->sets = realloc(p->g->sets, nc * sizeof(cset)); + p->g->sets = reallocarray(p->g->sets, nc, sizeof(cset)); if (p->g->setbits == NULL) p->g->setbits = malloc(nbytes); else { p->g->setbits = realloc(p->g->setbits, nbytes); - /* xxx this isn't right if setbits is now NULL */ + if (p->g->setbits == NULL) +goto oomem; for (i = 0; i < no; i++) p->g->sets[i].ptr = p->g->setbits + css*(i/CHAR_BIT); } @@ -1779,7 +1780,7 @@ enlarge( p->ssize = size; if (MEMSIZE(p) > MEMLIMIT) goto oomem; - sp = realloc(p->strip, p->ssize * sizeof(sop)); + sp = reallocarray(p->strip, p->ssize, sizeof(sop)); if (sp == NULL) { oomem: p->ssize = osize; @@ -1804,7 +1805,7 @@ stripsnug( _DIAGASSERT(g != NULL); g->nstates = p->slen; - g->strip = realloc(p->strip, p->slen * sizeof(sop)); + g->strip = reallocarray(p->strip, p->slen, sizeof(sop)); if (g->strip == NULL) { SETERROR(REG_ESPACE); g->strip = p->strip; Index: src/lib/libc/stdlib/Makefile.inc diff -u src/lib/libc/stdlib/Makefile.inc:1.86 src/lib/libc/stdlib/Makefile.inc:1.87 --- src/lib/libc/stdlib/Makefile.inc:1.86 Sun Jan 18 12:59:36 2015 +++ src/lib/libc/stdlib/Makefile.inc Thu Feb 5 11:04:35 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.86 2015/01/18 17:59:36 christos Exp $ +# $NetBSD: Makefile.inc,v 1.87 2015/02/05 16:04:35 christos Exp $ # from: @(#)Makefile.inc 8.3 (Berkeley) 2/4/95 # stdlib sources @@ -12,7 +12,7 @@ SRCS+= _env.c _rand48.c \ lcong48.c lrand48.c lsearch.c merge.c mi_vector_hash.c mrand48.c \ nrand48.c putenv.c qabs.c qdiv.c qsort.c posix_openpt.c pty.c \ quick_exit.c radixsort.c rand.c rand_r.c random.c remque.c \ - seed48.c setenv.c srand48.c strsuftoll.c \ + reallocarray.c seed48.c setenv.c srand48.c strsuftoll.c \ strtoi.c strtou.c strtonum.c \ strtoimax.c strtol.c strtoll.c strtoq.c strtoul.c strtoull.c \ strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c \ @@ -74,6 +74,7 @@ MLINKS+=hcreate.3 hdestroy1.3 hcreate.3 MLINKS+=insque.3 remque.3 MLINKS+=lsearch.3 lfind.3 MLINKS+=malloc.3 calloc.3 malloc.3 realloc.3 malloc.3 free.3 +MLINKS+=malloc.3 reallocarray.3 MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3 MLINKS+=ptsname.3 ptsname_r.3 MLINKS+=rand.3 rand_r.3 Index: src/lib/libc/stdlib/malloc.3 diff -u src/lib/libc/stdlib/malloc.3:1.38 src/lib/libc/stdlib/malloc.3:1.39 --- src/lib/libc/stdlib/malloc.3:1.38 Mon May 3 04:23:20 2010 +++ src/lib/libc/stdlib/malloc.3 Thu Feb 5 11:04:35 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: malloc.3,v 1.38 2010/05/03 08:23:20 jruoho Exp $ +.\" $NetBSD: malloc.3,v 1.39 2015/02/05 16:04:35 christos Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the U
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: christos Date: Thu Feb 5 16:01:38 UTC 2015 Modified Files: src/lib/libc/stdlib: strtonum.c Log Message: cast to return type To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/stdlib/strtonum.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdlib/strtonum.c diff -u src/lib/libc/stdlib/strtonum.c:1.2 src/lib/libc/stdlib/strtonum.c:1.3 --- src/lib/libc/stdlib/strtonum.c:1.2 Sun Jan 18 13:01:41 2015 +++ src/lib/libc/stdlib/strtonum.c Thu Feb 5 11:01:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strtonum.c,v 1.2 2015/01/18 18:01:41 christos Exp $ */ +/* $NetBSD: strtonum.c,v 1.3 2015/02/05 16:01:38 christos Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,7 +29,7 @@ */ #include -__RCSID("$NetBSD: strtonum.c,v 1.2 2015/01/18 18:01:41 christos Exp $"); +__RCSID("$NetBSD: strtonum.c,v 1.3 2015/02/05 16:01:38 christos Exp $"); #define _OPENBSD_SOURCE #include @@ -48,7 +48,7 @@ strtonum(const char *nptr, long long min if (errstr == NULL) errstr = &resp; - rv = strtoi(nptr, NULL, 0, minval, maxval, &e); + rv = (long long)strtoi(nptr, NULL, 0, minval, maxval, &e); if (e == 0) { *errstr = NULL;
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Thu Feb 5 16:00:39 UTC 2015 Modified Files: src/lib/libc/gen: utmpx.c Log Message: fix incorrect type To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/lib/libc/gen/utmpx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/utmpx.c diff -u src/lib/libc/gen/utmpx.c:1.32 src/lib/libc/gen/utmpx.c:1.33 --- src/lib/libc/gen/utmpx.c:1.32 Thu Sep 18 09:58:20 2014 +++ src/lib/libc/gen/utmpx.c Thu Feb 5 11:00:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: utmpx.c,v 1.32 2014/09/18 13:58:20 christos Exp $ */ +/* $NetBSD: utmpx.c,v 1.33 2015/02/05 16:00:39 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: utmpx.c,v 1.32 2014/09/18 13:58:20 christos Exp $"); +__RCSID("$NetBSD: utmpx.c,v 1.33 2015/02/05 16:00:39 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -82,7 +82,7 @@ old2new(struct utmpx *utx) static void new2old(struct utmpx *utx) { - struct timeval otv; + struct otimeval otv; struct timeval *tv = &utx->ut_tv; otv.tv_sec = (long)tv->tv_sec;
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Feb 5 15:14:19 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Ticket #495 To generate a diff of this commit: cvs rdiff -u -r1.1.2.195 -r1.1.2.196 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.195 src/doc/CHANGES-7.0:1.1.2.196 --- src/doc/CHANGES-7.0:1.1.2.195 Thu Feb 5 08:43:55 2015 +++ src/doc/CHANGES-7.0 Thu Feb 5 15:14:19 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.195 2015/02/05 08:43:55 martin Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.196 2015/02/05 15:14:19 martin Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -15639,3 +15639,52 @@ distrib/sets/makesrctars 1.40 gnusrc. [snj, ticket #494] +external/bsd/dhcpcd/dist/arp.c up to 1.9 +external/bsd/dhcpcd/dist/arp.h up to 1.8 +external/bsd/dhcpcd/dist/auth.c up to 1.8 +external/bsd/dhcpcd/dist/auth.h up to 1.8 +external/bsd/dhcpcd/dist/common.c up to 1.8 +external/bsd/dhcpcd/dist/common.h up to 1.7 +external/bsd/dhcpcd/dist/control.c up to 1.7 +external/bsd/dhcpcd/dist/control.h up to 1.7 +external/bsd/dhcpcd/dist/defs.h up to 1.14 +external/bsd/dhcpcd/dist/dev.h up to 1.7 +external/bsd/dhcpcd/dist/dhcp-common.c up to 1.7 +external/bsd/dhcpcd/dist/dhcp-common.h up to 1.7 +external/bsd/dhcpcd/dist/dhcp.c up to 1.27 +external/bsd/dhcpcd/dist/dhcp.h up to 1.7 +external/bsd/dhcpcd/dist/dhcp6.cup to 1.9 +external/bsd/dhcpcd/dist/dhcp6.hup to 1.7 +external/bsd/dhcpcd/dist/dhcpcd-definitions.conf up to 1.7 +external/bsd/dhcpcd/dist/dhcpcd-embedded.c up to 1.7 +external/bsd/dhcpcd/dist/dhcpcd-embedded.c.in up to 1.1.1.2 +external/bsd/dhcpcd/dist/dhcpcd-embedded.h up to 1.7 +external/bsd/dhcpcd/dist/dhcpcd-embedded.h.in up to 1.1.1.3 +external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in up to 1.13 +external/bsd/dhcpcd/dist/dhcpcd.8.inup to 1.40 +external/bsd/dhcpcd/dist/dhcpcd.c up to 1.22 +external/bsd/dhcpcd/dist/dhcpcd.conf.5.in up to 1.18 +external/bsd/dhcpcd/dist/dhcpcd.h up to 1.9 +external/bsd/dhcpcd/dist/duid.c up to 1.7 +external/bsd/dhcpcd/dist/duid.h up to 1.7 +external/bsd/dhcpcd/dist/eloop.cup to 1.8 +external/bsd/dhcpcd/dist/eloop.hup to 1.7 +external/bsd/dhcpcd/dist/if-bsd.c up to 1.17 +external/bsd/dhcpcd/dist/if-options.c up to 1.20 +external/bsd/dhcpcd/dist/if-options.h up to 1.8 +external/bsd/dhcpcd/dist/if.c up to 1.11 +external/bsd/dhcpcd/dist/if.h up to 1.8 +external/bsd/dhcpcd/dist/ipv4.c up to 1.11 +external/bsd/dhcpcd/dist/ipv4.h up to 1.8 +external/bsd/dhcpcd/dist/ipv4ll.c up to 1.8 +external/bsd/dhcpcd/dist/ipv6.c up to 1.8 +external/bsd/dhcpcd/dist/ipv6.h up to 1.10 +external/bsd/dhcpcd/dist/ipv6nd.c up to 1.20 +external/bsd/dhcpcd/dist/ipv6nd.h up to 1.9 +external/bsd/dhcpcd/dist/script.c up to 1.17 +external/bsd/dhcpcd/dist/crypt/crypt.h up to 1.6 +external/bsd/dhcpcd/dist/crypt/hmac_md5.c up to 1.6 +doc/3RDPARTY 1.1198 + + Import dhcpcd version 6.7.1. + [pettai, ticket #495]
CVS commit: [netbsd-7] src
Module Name:src Committed By: martin Date: Thu Feb 5 15:13:12 UTC 2015 Modified Files: src/doc [netbsd-7]: 3RDPARTY src/external/bsd/dhcpcd/dist [netbsd-7]: arp.c arp.h auth.c auth.h common.c common.h control.c control.h defs.h dev.h dhcp-common.c dhcp-common.h dhcp.c dhcp.h dhcp6.c dhcp6.h dhcpcd-definitions.conf dhcpcd-embedded.c dhcpcd-embedded.c.in dhcpcd-embedded.h dhcpcd-embedded.h.in dhcpcd-run-hooks.8.in dhcpcd.8.in dhcpcd.c dhcpcd.conf.5.in dhcpcd.h duid.c duid.h eloop.c eloop.h if-bsd.c if-options.c if-options.h if.c if.h ipv4.c ipv4.h ipv4ll.c ipv6.c ipv6.h ipv6nd.c ipv6nd.h script.c src/external/bsd/dhcpcd/dist/crypt [netbsd-7]: crypt.h hmac_md5.c Log Message: Pull up the following, requested by pettai in ticket #495: external/bsd/dhcpcd/dist/arp.c up to 1.9 external/bsd/dhcpcd/dist/arp.h up to 1.8 external/bsd/dhcpcd/dist/auth.c up to 1.8 external/bsd/dhcpcd/dist/auth.h up to 1.8 external/bsd/dhcpcd/dist/common.c up to 1.8 external/bsd/dhcpcd/dist/common.h up to 1.7 external/bsd/dhcpcd/dist/control.c up to 1.7 external/bsd/dhcpcd/dist/control.h up to 1.7 external/bsd/dhcpcd/dist/defs.h up to 1.14 external/bsd/dhcpcd/dist/dev.h up to 1.7 external/bsd/dhcpcd/dist/dhcp-common.c up to 1.7 external/bsd/dhcpcd/dist/dhcp-common.h up to 1.7 external/bsd/dhcpcd/dist/dhcp.c up to 1.27 external/bsd/dhcpcd/dist/dhcp.h up to 1.7 external/bsd/dhcpcd/dist/dhcp6.cup to 1.9 external/bsd/dhcpcd/dist/dhcp6.hup to 1.7 external/bsd/dhcpcd/dist/dhcpcd-definitions.conf up to 1.7 external/bsd/dhcpcd/dist/dhcpcd-embedded.c up to 1.7 external/bsd/dhcpcd/dist/dhcpcd-embedded.c.in up to 1.1.1.2 external/bsd/dhcpcd/dist/dhcpcd-embedded.h up to 1.7 external/bsd/dhcpcd/dist/dhcpcd-embedded.h.in up to 1.1.1.3 external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in up to 1.13 external/bsd/dhcpcd/dist/dhcpcd.8.inup to 1.40 external/bsd/dhcpcd/dist/dhcpcd.c up to 1.22 external/bsd/dhcpcd/dist/dhcpcd.conf.5.in up to 1.18 external/bsd/dhcpcd/dist/dhcpcd.h up to 1.9 external/bsd/dhcpcd/dist/duid.c up to 1.7 external/bsd/dhcpcd/dist/duid.h up to 1.7 external/bsd/dhcpcd/dist/eloop.cup to 1.8 external/bsd/dhcpcd/dist/eloop.hup to 1.7 external/bsd/dhcpcd/dist/if-bsd.c up to 1.17 external/bsd/dhcpcd/dist/if-options.c up to 1.20 external/bsd/dhcpcd/dist/if-options.h up to 1.8 external/bsd/dhcpcd/dist/if.c up to 1.11 external/bsd/dhcpcd/dist/if.h up to 1.8 external/bsd/dhcpcd/dist/ipv4.c up to 1.11 external/bsd/dhcpcd/dist/ipv4.h up to 1.8 external/bsd/dhcpcd/dist/ipv4ll.c up to 1.8 external/bsd/dhcpcd/dist/ipv6.c up to 1.8 external/bsd/dhcpcd/dist/ipv6.h up to 1.10 external/bsd/dhcpcd/dist/ipv6nd.c up to 1.20 external/bsd/dhcpcd/dist/ipv6nd.h up to 1.9 external/bsd/dhcpcd/dist/script.c up to 1.17 external/bsd/dhcpcd/dist/crypt/crypt.h up to 1.6 external/bsd/dhcpcd/dist/crypt/hmac_md5.c up to 1.6 doc/3RDPARTY1.1198 Import dhcpcd version 6.7.1. To generate a diff of this commit: cvs rdiff -u -r1.1145.2.7 -r1.1145.2.8 src/doc/3RDPARTY cvs rdiff -u -r1.1.1.13.2.1 -r1.1.1.13.2.2 src/external/bsd/dhcpcd/dist/arp.c \ src/external/bsd/dhcpcd/dist/dhcp6.c cvs rdiff -u -r1.1.1.4.4.1 -r1.1.1.4.4.2 src/external/bsd/dhcpcd/dist/arp.h cvs rdiff -u -r1.1.1.4.2.1 -r1.1.1.4.2.2 src/external/bsd/dhcpcd/dist/auth.c \ src/external/bsd/dhcpcd/dist/dev.h \ src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h \ src/external/bsd/dhcpcd/dist/ipv6nd.h cvs rdiff -u -r1.1.1.2.2.1 -r1.1.1.2.2.2 src/external/bsd/dhcpcd/dist/auth.h cvs rdiff -u -r1.1.1.15.2.1 -r1.1.1.15.2.2 \ src/external/bsd/dhcpcd/dist/common.c cvs rdiff -u -r1.1.1.11.2.1 -r1.1.1.11.2.2 \ src/external/bsd/dhcpcd/dist/common.h src/external/bsd/dhcpcd/dist/ipv6.c cvs rdiff -u -r1.1.1.7.2.1 -r1.1.1.7.2.2 \ src/external/bsd/dhcpcd/dist/control.c \ src/external/bsd/dhcpcd/dist/dhcp-common.c \ src/external/bsd/dhcpcd/dist/dhcp6.h \ src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c \ src/external/bsd/
CVS commit: src/sys/arch/hpcarm/conf
Module Name:src Committed By: nonaka Date: Thu Feb 5 14:35:50 UTC 2015 Modified Files: src/sys/arch/hpcarm/conf: WZERO3 Log Message: Added drvctl, putter and PUFFS. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/hpcarm/conf/WZERO3 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/hpcarm/conf/WZERO3 diff -u src/sys/arch/hpcarm/conf/WZERO3:1.37 src/sys/arch/hpcarm/conf/WZERO3:1.38 --- src/sys/arch/hpcarm/conf/WZERO3:1.37 Sat Aug 23 20:26:58 2014 +++ src/sys/arch/hpcarm/conf/WZERO3 Thu Feb 5 14:35:50 2015 @@ -1,4 +1,4 @@ -# $NetBSD: WZERO3,v 1.37 2014/08/23 20:26:58 dholland Exp $ +# $NetBSD: WZERO3,v 1.38 2015/02/05 14:35:50 nonaka Exp $ # # WZERO3 -- Sharp Windows Mobile 5 based PDA # @@ -8,7 +8,7 @@ include "arch/hpcarm/conf/files.wzero3" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.37 $" +#ident "GENERIC-$Revision: 1.38 $" # estimated number of users maxusers 32 @@ -48,6 +48,7 @@ file-system FDESC # /dev/fd file-system KERNFS # /kern file-system NULLFS # loopback file system #file-system OVERLAY # overlay filesystem +file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs) file-system PROCFS # /proc #file-system UMAPFS # NULLFS + uid and gid remapping file-system UNION # union file system @@ -308,7 +309,9 @@ pseudo-device biconsdev 1 # build-in co pseudo-device md # Ramdisk driver pseudo-device clockctl # user control of clock subsystem +pseudo-device drvctl # user control of drive subsystem pseudo-device ksyms # /dev/ksyms +pseudo-device putter # for puffs and pud #pseudo-device bcsp # BlueCore Serial Protocol #pseudo-device btuart # Bluetooth HCI UART (H4)
CVS commit: src/sys/arch/zaurus/conf
Module Name:src Committed By: nonaka Date: Thu Feb 5 14:32:31 UTC 2015 Modified Files: src/sys/arch/zaurus/conf: GENERIC Log Message: Added drvctl, putter and PUFFS. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/zaurus/conf/GENERIC 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/zaurus/conf/GENERIC diff -u src/sys/arch/zaurus/conf/GENERIC:1.65 src/sys/arch/zaurus/conf/GENERIC:1.66 --- src/sys/arch/zaurus/conf/GENERIC:1.65 Sun Nov 16 16:01:43 2014 +++ src/sys/arch/zaurus/conf/GENERIC Thu Feb 5 14:32:31 2015 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.65 2014/11/16 16:01:43 manu Exp $ +# $NetBSD: GENERIC,v 1.66 2015/02/05 14:32:31 nonaka Exp $ # # GENERIC machine description file # @@ -60,6 +60,7 @@ file-system MSDOSFS # MS-DOS file syste file-system KERNFS # /kern file-system NULLFS # loopback file system #file-system OVERLAY # overlay file system +file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs) file-system PROCFS # /proc #file-system UMAPFS # NULLFS + uid and gid remapping #file-system UNION # union file system @@ -392,7 +393,9 @@ pseudo-device accf_http # "httpready" a pseudo-device pty # pseudo-terminals #pseudo-device sequencer # MIDI sequencer pseudo-device clockctl # user control of clock subsystem +pseudo-device drvctl # user control of drive subsystem pseudo-device ksyms # /dev/ksyms +pseudo-device putter # for puffs and pud # a pseudo device needed for Coda # also needs CODA (above) #pseudo-device vcoda # coda minicache <-> venus comm.
CVS commit: src/sys/arch/landisk/conf
Module Name:src Committed By: nonaka Date: Thu Feb 5 14:04:47 UTC 2015 Modified Files: src/sys/arch/landisk/conf: GENERIC Log Message: Added drvctl. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/landisk/conf/GENERIC 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/landisk/conf/GENERIC diff -u src/sys/arch/landisk/conf/GENERIC:1.45 src/sys/arch/landisk/conf/GENERIC:1.46 --- src/sys/arch/landisk/conf/GENERIC:1.45 Sun Nov 16 16:01:41 2014 +++ src/sys/arch/landisk/conf/GENERIC Thu Feb 5 14:04:46 2015 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.45 2014/11/16 16:01:41 manu Exp $ +# $NetBSD: GENERIC,v 1.46 2015/02/05 14:04:46 nonaka Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/landisk/conf/std.landisk" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.45 $" +#ident "GENERIC-$Revision: 1.46 $" maxusers 16 # estimated number of users @@ -464,6 +464,7 @@ pseudo-device agr # IEEE 802.3ad link pseudo-device pty # pseudo-terminals pseudo-device sequencer # MIDI sequencer pseudo-device clockctl # user control of clock subsystem +pseudo-device drvctl # user control of drive subsystem pseudo-device ksyms # /dev/ksyms pseudo-device putter # for puffs and pud
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: isaki Date: Thu Feb 5 13:55:37 UTC 2015 Modified Files: src/tests/lib/libc/sys: t_kevent.c Log Message: Skip kqueue_unsupported_fd test if /dev/drvctl is not configured in the kernel. PR bin/49644. XXX Ideally, it's better to modify to use more generic device file. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/sys/t_kevent.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_kevent.c diff -u src/tests/lib/libc/sys/t_kevent.c:1.6 src/tests/lib/libc/sys/t_kevent.c:1.7 --- src/tests/lib/libc/sys/t_kevent.c:1.6 Thu Nov 29 09:13:44 2012 +++ src/tests/lib/libc/sys/t_kevent.c Thu Feb 5 13:55:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_kevent.c,v 1.6 2012/11/29 09:13:44 martin Exp $ */ +/* $NetBSD: t_kevent.c,v 1.7 2015/02/05 13:55:37 isaki Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_kevent.c,v 1.6 2012/11/29 09:13:44 martin Exp $"); +__RCSID("$NetBSD: t_kevent.c,v 1.7 2015/02/05 13:55:37 isaki Exp $"); #include #include @@ -153,8 +153,14 @@ ATF_TC_BODY(kqueue_unsupported_fd, tc) struct kevent ev; fd = open(DRVCTLDEV, O_RDONLY); - if (fd == -1 && errno == ENOENT) - atf_tc_skip("no " DRVCTLDEV " available for testing"); + if (fd == -1) { + switch (errno) { + case ENOENT: + case ENXIO: + atf_tc_skip("no " DRVCTLDEV " available for testing"); + break; + } + } ATF_REQUIRE(fd != -1); ATF_REQUIRE((kq = kqueue()) != -1);
CVS commit: src/sys/arch/arm/xscale
Module Name:src Committed By: nonaka Date: Thu Feb 5 13:27:18 UTC 2015 Modified Files: src/sys/arch/arm/xscale: pxa2x0_dmac.c Log Message: Don't write DMAC_DINT register on PXA270, because read-only register. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/xscale/pxa2x0_dmac.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/xscale/pxa2x0_dmac.c diff -u src/sys/arch/arm/xscale/pxa2x0_dmac.c:1.12 src/sys/arch/arm/xscale/pxa2x0_dmac.c:1.13 --- src/sys/arch/arm/xscale/pxa2x0_dmac.c:1.12 Mon Nov 12 18:00:38 2012 +++ src/sys/arch/arm/xscale/pxa2x0_dmac.c Thu Feb 5 13:27:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_dmac.c,v 1.12 2012/11/12 18:00:38 skrll Exp $ */ +/* $NetBSD: pxa2x0_dmac.c,v 1.13 2015/02/05 13:27:18 nonaka Exp $ */ /* * Copyright (c) 2003, 2005 Wasabi Systems, Inc. @@ -321,8 +321,9 @@ pxadmac_attach(device_t parent, device_t dmac_reg_write(sc, DMAC_DRCMR(i), 0); sc->sc_active[i] = NULL; } - dmac_reg_write(sc, DMAC_DINT, - dmac_reg_read(sc, DMAC_DINT) & DMAC_DINT_MASK); + if (!CPU_IS_PXA270) + dmac_reg_write(sc, DMAC_DINT, + dmac_reg_read(sc, DMAC_DINT) & DMAC_DINT_MASK); /* * Initialise the request queues @@ -1212,7 +1213,8 @@ dmac_channel_intr(struct pxadmac_softc * /* * Clear down the interrupt in the DMA Interrupt Register */ - dmac_reg_write(sc, DMAC_DINT, (1u << channel)); + if (!CPU_IS_PXA270) + dmac_reg_write(sc, DMAC_DINT, (1u << channel)); /* * If this is a looping request, invoke the 'done' callback and
CVS commit: src/sys/arch/m68k/fpe
Module Name:src Committed By: isaki Date: Thu Feb 5 12:23:27 UTC 2015 Modified Files: src/sys/arch/m68k/fpe: fpu_explode.c Log Message: For the extended precision, the MSB of the mantissa is an integer part, and this bit must be ignored at Infinity. found by tests/lib/libc/stdlib/t_strtod.c::strtold_inf. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/m68k/fpe/fpu_explode.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/m68k/fpe/fpu_explode.c diff -u src/sys/arch/m68k/fpe/fpu_explode.c:1.14 src/sys/arch/m68k/fpe/fpu_explode.c:1.15 --- src/sys/arch/m68k/fpe/fpu_explode.c:1.14 Tue Mar 26 11:30:20 2013 +++ src/sys/arch/m68k/fpe/fpu_explode.c Thu Feb 5 12:23:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_explode.c,v 1.14 2013/03/26 11:30:20 isaki Exp $ */ +/* $NetBSD: fpu_explode.c,v 1.15 2015/02/05 12:23:27 isaki Exp $ */ /* * Copyright (c) 1992, 1993 @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_explode.c,v 1.14 2013/03/26 11:30:20 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fpu_explode.c,v 1.15 2015/02/05 12:23:27 isaki Exp $"); #include #include @@ -183,18 +183,17 @@ static int fpu_xtof(struct fpn *fp, uint32_t i, uint32_t j, uint32_t k) { int exp; - uint32_t frac, f0, f1, f2; + uint32_t f0, f1, f2; #define EXT_SHIFT (EXT_FRACBITS - 1 - 32 - FP_LG) exp = (i >> (32 - 1 - EXT_EXPBITS)) & mask(EXT_EXPBITS); f0 = j >> EXT_SHIFT; f1 = (j << (32 - EXT_SHIFT)) | (k >> EXT_SHIFT); f2 = k << (32 - EXT_SHIFT); - frac = j | k; /* m68k extended does not imply denormal by exp==0 */ if (exp == 0) { - if (frac == 0) + if ((j | k) == 0) return (FPC_ZERO); fp->fp_exp = - EXT_EXP_BIAS; fp->fp_mant[0] = f0; @@ -204,7 +203,8 @@ fpu_xtof(struct fpn *fp, uint32_t i, uin return (FPC_NUM); } if (exp == (2 * EXT_EXP_BIAS + 1)) { - if (frac == 0) + /* MSB is an integer part and don't care */ + if ((j & 0x7fff) == 0 && k == 0) return (FPC_INF); fp->fp_mant[0] = f0; fp->fp_mant[1] = f1;
CVS commit: src/sys/arch/m68k/fpe
Module Name:src Committed By: isaki Date: Thu Feb 5 12:22:06 UTC 2015 Modified Files: src/sys/arch/m68k/fpe: fpu_rem.c Log Message: Fix typo in comment. pointed out by Y.Sugahara. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/m68k/fpe/fpu_rem.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/m68k/fpe/fpu_rem.c diff -u src/sys/arch/m68k/fpe/fpu_rem.c:1.16 src/sys/arch/m68k/fpe/fpu_rem.c:1.17 --- src/sys/arch/m68k/fpe/fpu_rem.c:1.16 Sat May 11 12:52:42 2013 +++ src/sys/arch/m68k/fpe/fpu_rem.c Thu Feb 5 12:22:06 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_rem.c,v 1.16 2013/05/11 12:52:42 isaki Exp $ */ +/* $NetBSD: fpu_rem.c,v 1.17 2015/02/05 12:22:06 isaki Exp $ */ /* * Copyright (c) 1995 Ken Nakata @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_rem.c,v 1.16 2013/05/11 12:52:42 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fpu_rem.c,v 1.17 2015/02/05 12:22:06 isaki Exp $"); #include #include @@ -56,7 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: fpu_rem.c,v *endif * * Step 3. Perform MOD(X,Y) - *3.1 If R = Y, then { Q := Q + 1, R := 0, go to Step 8. } + *3.1 If R = Y, then { Q := Q + 1, R := 0, go to Step 7. } *3.2 If R > Y, then { R := R - Y, Q := Q + 1} *3.3 If j = 0, go to Step 4. *3.4 k := k + 1, j := j - 1, Q := 2Q, R := 2R. Go to @@ -64,7 +64,7 @@ __KERNEL_RCSID(0, "$NetBSD: fpu_rem.c,v * * Step 4. R := signX*R. * - * Step 5. If MOD is requested, go to Step . + * Step 5. If MOD is requested, go to Step 7. * * Step 6. Now, R = MOD(X,Y), convert to REM(X,Y) is requested. *Do banker's rounding.
CVS commit: src/doc
Module Name:src Committed By: pettai Date: Thu Feb 5 11:37:47 UTC 2015 Modified Files: src/doc: 3RDPARTY Log Message: Update the Heimdal details To generate a diff of this commit: cvs rdiff -u -r1.1201 -r1.1202 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1201 src/doc/3RDPARTY:1.1202 --- src/doc/3RDPARTY:1.1201 Sat Jan 31 19:14:45 2015 +++ src/doc/3RDPARTY Thu Feb 5 11:37:47 2015 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1201 2015/01/31 19:14:45 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1202 2015/02/05 11:37:47 pettai Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -507,10 +507,10 @@ for import. Package: heimdal Version: 1.5.3 Current Vers: 1.5.3 -Maintainer: Heimdal -Archive Site: ftp://ftp.pdc.kth.se/pub/heimdal/src/ -Home Page: http://www.pdc.kth.se/heimdal/ -Mailing List: heimdal-disc...@pdc.kth.se +Maintainer: Heimdal +Archive Site: ftp://ftp.h5l.org/pub/heimdal/src/ +Home Page: http://www.h5l.org/ +Mailing List: heimdal-disc...@sics.se Responsible: joda, lha License: BSD Location: crypto/external/bsd/heimdal/dist
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Feb 5 08:43:55 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Ticket #494 To generate a diff of this commit: cvs rdiff -u -r1.1.2.194 -r1.1.2.195 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.194 src/doc/CHANGES-7.0:1.1.2.195 --- src/doc/CHANGES-7.0:1.1.2.194 Wed Feb 4 22:08:48 2015 +++ src/doc/CHANGES-7.0 Thu Feb 5 08:43:55 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.194 2015/02/04 22:08:48 martin Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.195 2015/02/05 08:43:55 martin Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -15632,3 +15632,10 @@ sbin/ping6/ping6.c1.83 a maybe-uninitialized warning. [chs, ticket #493] +distrib/sets/makesrctars 1.40 + + GPL code isn't just in src/gnu these days (i.e., the last 6 years). + Move stuff from src/external/gpl[23] out of the src tarball and into + gnusrc. + [snj, ticket #494] +
CVS commit: [netbsd-7] src/distrib/sets
Module Name:src Committed By: martin Date: Thu Feb 5 08:43:05 UTC 2015 Modified Files: src/distrib/sets [netbsd-7]: makesrctars Log Message: Pull up following revision(s) (requested by snj in ticket #494): distrib/sets/makesrctars: revision 1.40 GPL code isn't just in src/gnu these days (i.e., the last 6 years). move stuff from src/external/gpl[23] out of the src tarball and into gnusrc. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.39.4.1 src/distrib/sets/makesrctars Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/makesrctars diff -u src/distrib/sets/makesrctars:1.39 src/distrib/sets/makesrctars:1.39.4.1 --- src/distrib/sets/makesrctars:1.39 Tue Jan 7 13:32:38 2014 +++ src/distrib/sets/makesrctars Thu Feb 5 08:43:05 2015 @@ -1,6 +1,6 @@ #! /bin/sh # -# $NetBSD: makesrctars,v 1.39 2014/01/07 13:32:38 christos Exp $ +# $NetBSD: makesrctars,v 1.39.4.1 2015/02/05 08:43:05 martin Exp $ # # makesrctars srcdir setdir # Create source tarballs in setdir from the source under srcdir. @@ -115,9 +115,9 @@ fi srcprefix=usr/src export setdir MTREE PAX CKSUM GZIP PASSWD srcprefix -makeset src . -v '^\.\/gnu|^\.\/share|^\.\/sys|^\.\/usr\.bin\/config|^\.\/common' +makeset src . -v '^\.\/common|^\.\/external\/gpl2|^\.\/external\/gpl3|^\.\/gnu|^\.\/share|^\.\/sys|^\.\/usr\.bin\/config' -makeset gnusrc gnu +makeset gnusrc . -e '^\..type=dir|^\.\/gnu|^\.\/external.type=dir|^\.\/external\/gpl2|^\.\/external\/gpl3' makeset syssrc . -e '^\..type=dir|^\.\/sys|^\.\/usr\.bin.type=dir|^\.\/usr\.bin\/config|^\.\/common'