CVS commit: src/sys/dev/wscons
Module Name:src Committed By: macallan Date: Wed May 25 06:13:30 UTC 2011 Modified Files: src/sys/dev/wscons: files.wscons wsdisplay_vcons.c wsdisplay_vconsvar.h Log Message: remove VCONS_DRAW_ASYNC it was always experimental, VCONS_DRAW_INTR is much simpler and Just Works. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/dev/wscons/files.wscons cvs rdiff -u -r1.25 -r1.26 src/sys/dev/wscons/wsdisplay_vcons.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/wscons/wsdisplay_vconsvar.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/dev/wscons/files.wscons diff -u src/sys/dev/wscons/files.wscons:1.43 src/sys/dev/wscons/files.wscons:1.44 --- src/sys/dev/wscons/files.wscons:1.43 Tue Feb 8 12:45:04 2011 +++ src/sys/dev/wscons/files.wscons Wed May 25 06:13:30 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.wscons,v 1.43 2011/02/08 12:45:04 jmcneill Exp $ +# $NetBSD: files.wscons,v 1.44 2011/05/25 06:13:30 macallan Exp $ # # "Workstation Console" glue; attaches frame buffer to emulator & keyboard, @@ -75,5 +75,4 @@ # generic virtual console support on bitmapped framebuffers file dev/wscons/wsdisplay_vcons.c vcons file dev/wscons/wsdisplay_vcons_util.c vcons -defflag opt_vcons.h VCONS_DRAW_ASYNC VCONS_ASYNC_DEBUG -VCONS_DRAW_INTR VCONS_INTR_DEBUG +defflag opt_vcons.h VCONS_DRAW_INTR VCONS_INTR_DEBUG Index: src/sys/dev/wscons/wsdisplay_vcons.c diff -u src/sys/dev/wscons/wsdisplay_vcons.c:1.25 src/sys/dev/wscons/wsdisplay_vcons.c:1.26 --- src/sys/dev/wscons/wsdisplay_vcons.c:1.25 Wed May 25 06:01:38 2011 +++ src/sys/dev/wscons/wsdisplay_vcons.c Wed May 25 06:13:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay_vcons.c,v 1.25 2011/05/25 06:01:38 macallan Exp $ */ +/* $NetBSD: wsdisplay_vcons.c,v 1.26 2011/05/25 06:13:29 macallan Exp $ */ /*- * Copyright (c) 2005, 2006 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.25 2011/05/25 06:01:38 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.26 2011/05/25 06:13:29 macallan Exp $"); #include #include @@ -55,10 +55,6 @@ #include "opt_wsdisplay_compat.h" #include "opt_vcons.h" -#if defined(VCONS_DRAW_ASYNC) && defined(VCONS_DRAW_INTR) -#error VCONS_DRAW_ASYNC and VCONS_DRAW_INTR cannot be defined together -#endif - static void vcons_dummy_init_screen(void *, struct vcons_screen *, int, long *); @@ -83,16 +79,6 @@ static void vcons_eraserows_buffer(void *, int, int, long); static void vcons_putchar_buffer(void *, int, int, u_int, long); -#ifdef VCONS_DRAW_ASYNC -/* methods that work asynchronously */ -static void vcons_copycols_async(void *, int, int, int, int); -static void vcons_erasecols_async(void *, int, int, int, long); -static void vcons_copyrows_async(void *, int, int, int); -static void vcons_eraserows_async(void *, int, int, long); -static void vcons_putchar_async(void *, int, int, u_int, long); -static void vcons_cursor_async(void *, int, int, int); -#endif - /* * actual wrapper methods which call both the _buffer ones above and the * driver supplied ones to do the drawing @@ -121,9 +107,6 @@ static void vcons_lock(struct vcons_screen *); static void vcons_unlock(struct vcons_screen *); -#ifdef VCONS_DRAW_ASYNC -static void vcons_kthread(void *); -#endif #ifdef VCONS_DRAW_INTR static void vcons_intr(void *); static void vcons_softintr(void *); @@ -177,10 +160,6 @@ #ifdef DIAGNOSTIC vd->switch_poll_count = 0; #endif -#ifdef VCONS_DRAW_ASYNC - kthread_create(PRI_NONE, 0, NULL, vcons_kthread, vd, - &vd->drawing_thread, "vcons_draw"); -#endif #ifdef VCONS_DRAW_INTR vd->intr_softint = softint_establish(SOFTINT_SERIAL, vcons_softintr, vd); @@ -690,13 +669,7 @@ vcons_lock(scr); if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) { -#ifdef VCONS_DRAW_ASYNC - struct vcons_data *vd = scr->scr_vd; - if (vd->use_async) { - vcons_copycols_async(cookie, row, srccol, dstcol, ncols); - } else -#endif - scr->scr_vd->copycols(cookie, row, srccol, dstcol, ncols); + scr->scr_vd->copycols(cookie, row, srccol, dstcol, ncols); } vcons_unlock(scr); } @@ -797,13 +770,6 @@ vcons_lock(scr); if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) { -#ifdef VCONS_DRAW_ASYNC - struct vcons_data *vd = scr->scr_vd; - if (vd->use_async) { - vcons_erasecols_async(cookie, row, startcol, ncols, - fillattr); - } else -#endif #ifdef VCONS_DRAW_INTR vcons_erasecols_cached(cookie, row, startcol, ncols, fillattr); @@ -869,13 +835,7 @@ vcons_lock(scr); if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) { -#ifdef VCONS_DRAW_ASYNC - struct vcons_data *vd = scr->scr_vd; - if (vd->use_async) { - vcons_copyrows_async(cookie, srcrow, dstrow, nrows); - } else -#endif - scr->scr_vd->copyrows(cookie, srcrow, dstrow, nrows); + scr->scr_vd->copyrows(cookie, srcrow, dstrow, nrows); } vco
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: macallan Date: Wed May 25 06:01:39 UTC 2011 Modified Files: src/sys/dev/wscons: wsdisplay_vcons.c wsdisplay_vcons_util.c wsdisplay_vconsvar.h Log Message: add a cache so when we update the screen we only redraw the character cells that actually changed since last time. This gives a noticeable speedup on slower hardware with dumb framebuffers. For now this works with VCONS_DRAW_INTR and VCONS_DONT_READ only. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/wscons/wsdisplay_vcons.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/wscons/wsdisplay_vcons_util.c cvs rdiff -u -r1.18 -r1.19 src/sys/dev/wscons/wsdisplay_vconsvar.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/dev/wscons/wsdisplay_vcons.c diff -u src/sys/dev/wscons/wsdisplay_vcons.c:1.24 src/sys/dev/wscons/wsdisplay_vcons.c:1.25 --- src/sys/dev/wscons/wsdisplay_vcons.c:1.24 Fri Feb 18 13:56:11 2011 +++ src/sys/dev/wscons/wsdisplay_vcons.c Wed May 25 06:01:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay_vcons.c,v 1.24 2011/02/18 13:56:11 jmcneill Exp $ */ +/* $NetBSD: wsdisplay_vcons.c,v 1.25 2011/05/25 06:01:38 macallan Exp $ */ /*- * Copyright (c) 2005, 2006 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.24 2011/02/18 13:56:11 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.25 2011/05/25 06:01:38 macallan Exp $"); #include #include @@ -102,6 +102,9 @@ static void vcons_copyrows(void *, int, int, int); static void vcons_eraserows(void *, int, int, long); static void vcons_putchar(void *, int, int, u_int, long); +#ifdef VCONS_DRAW_INTR +static void vcons_putchar_cached(void *, int, int, u_int, long); +#endif static void vcons_cursor(void *, int, int, int); /* @@ -159,6 +162,12 @@ vd->currenttype = def; callout_init(&vd->switch_callout, 0); callout_setfunc(&vd->switch_callout, vcons_do_switch, vd); +#ifdef VCONS_DRAW_INTR + vd->cells = 0; + vd->attrs = NULL; + vd->chars = NULL; + vd->cursor_offset = -1; +#endif /* * a lock to serialize access to the framebuffer. @@ -234,6 +243,9 @@ { struct rasops_info *ri = &scr->scr_ri; int cnt, i; +#ifdef VCONS_DRAW_INTR + int size; +#endif scr->scr_cookie = vd->cookie; scr->scr_vd = scr->scr_origvd = vd; @@ -313,6 +325,18 @@ scr->scr_chars[i] = 0x20; } +#ifdef VCONS_DRAW_INTR + size = ri->ri_cols * ri->ri_rows; + if (size > vd->cells) { + if (vd->chars != NULL) free(vd->chars, M_DEVBUF); + if (vd->attrs != NULL) free(vd->attrs, M_DEVBUF); + vd->cells = size; + vd->chars = malloc(size * sizeof(uint16_t), M_DEVBUF, M_WAITOK); + vd->attrs = malloc(size * sizeof(long), M_DEVBUF, M_WAITOK); + vcons_invalidate_cache(vd); + } +#endif + if(vd->active == NULL) { vd->active = scr; SCREEN_VISIBLE(scr); @@ -402,7 +426,8 @@ uint16_t *charptr = scr->scr_chars; long *attrptr = scr->scr_attrs; struct rasops_info *ri = &scr->scr_ri; - int i, j, offset; + struct vcons_data *vd = scr->scr_vd; + int i, j, offset, boffset = 0; vcons_lock(scr); if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) { @@ -412,7 +437,7 @@ * going to overwrite every single character cell anyway */ if (ri->ri_flg & RI_FULLCLEAR) { - scr->scr_vd->eraserows(ri, 0, ri->ri_rows, + vd->eraserows(ri, 0, ri->ri_rows, scr->scr_defattr); } @@ -430,16 +455,79 @@ * and we already made sure the screen we're * working on is visible */ -scr->scr_vd->putchar(ri, i, j, +vd->putchar(ri, i, j, charptr[offset], attrptr[offset]); +#ifdef VCONS_DRAW_INTR +vd->chars[boffset] = charptr[offset]; +vd->attrs[boffset] = attrptr[offset]; +#endif +offset++; +boffset++; + } + } + ri->ri_flg &= ~RI_CURSOR; + scr->scr_vd->cursor(ri, 1, ri->ri_crow, ri->ri_ccol); +#ifdef VCONS_DRAW_INTR + vd->cursor_offset = ri->ri_crow * ri->ri_cols + ri->ri_ccol; +#endif + } + vcons_unlock(scr); +} + +#ifdef VCONS_DRAW_INTR +void +vcons_update_screen(struct vcons_screen *scr) +{ + uint16_t *charptr = scr->scr_chars; + long *attrptr = scr->scr_attrs; + struct rasops_info *ri = &scr->scr_ri; + struct vcons_data *vd = scr->scr_vd; + int i, j, offset, boffset = 0; + + vcons_lock(scr); + if (SCREEN_IS_VISIBLE(scr) && SCREEN_CAN_DRAW(scr)) { + + /* redraw the screen */ +#ifdef WSDISPLAY_SCROLLSUPPORT + offset = scr->scr_current_offset; +#else + offset = 0; +#endif + /* + * we mark the character cell occupied by the cursor as dirty + * so we don't have to deal with it + * notice that this isn't necessarily the position where rasops + * thinks it is, just where we drew it the last time + */ + if (vd->cursor_offset >= 0) + vd->attrs[vd->cursor_offset] = 0x; + + for (i = 0; i < ri->ri_rows; i++) { + for (j = 0; j < ri->ri_cols; j++) { +/* + * no need to use the wrapper
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: matt Date: Wed May 25 05:42:37 UTC 2011 Modified Files: src/sys/arch/powerpc/oea: altivec.c Log Message: Set PSL_VEC in the right place. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/oea/altivec.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/powerpc/oea/altivec.c diff -u src/sys/arch/powerpc/oea/altivec.c:1.23 src/sys/arch/powerpc/oea/altivec.c:1.24 --- src/sys/arch/powerpc/oea/altivec.c:1.23 Mon May 2 06:43:16 2011 +++ src/sys/arch/powerpc/oea/altivec.c Wed May 25 05:42:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: altivec.c,v 1.23 2011/05/02 06:43:16 matt Exp $ */ +/* $NetBSD: altivec.c,v 1.24 2011/05/25 05:42:37 matt Exp $ */ /* * Copyright (C) 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.23 2011/05/02 06:43:16 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.24 2011/05/25 05:42:37 matt Exp $"); #include "opt_multiprocessor.h" @@ -104,7 +104,7 @@ /* * Mark vector registers as modified. */ - l->l_md.md_flags |= MDLWP_USEDVEC; + l->l_md.md_flags |= MDLWP_USEDVEC|PSL_VEC; l->l_md.md_utf->tf_srr1 |= PSL_VEC; }
CVS commit: [matt-nb5-mips64] src/sys/kern
Module Name:src Committed By: matt Date: Wed May 25 05:35:50 UTC 2011 Modified Files: src/sys/kern [matt-nb5-mips64]: tty.c Log Message: Merge in LWP_PC status change from -current. Print PC addr if lwp is running or runnable. To generate a diff of this commit: cvs rdiff -u -r1.227.4.1.4.1 -r1.227.4.1.4.2 src/sys/kern/tty.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/tty.c diff -u src/sys/kern/tty.c:1.227.4.1.4.1 src/sys/kern/tty.c:1.227.4.1.4.2 --- src/sys/kern/tty.c:1.227.4.1.4.1 Wed Apr 21 00:28:18 2010 +++ src/sys/kern/tty.c Wed May 25 05:35:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.227.4.1.4.1 2010/04/21 00:28:18 matt Exp $ */ +/* tty.c,v 1.227.4.1.4.1 2010/04/21 00:28:18 matt Exp */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.227.4.1.4.1 2010/04/21 00:28:18 matt Exp $"); +__KERNEL_RCSID(0, "tty.c,v 1.227.4.1.4.1 2010/04/21 00:28:18 matt Exp"); #include #include @@ -74,6 +74,7 @@ #undef TTYDEFCHARS #include #include +#include #include #include #include @@ -2399,15 +2400,36 @@ mutex_enter(pick->p_lock); LIST_FOREACH(l, &pick->p_lwps, l_sibling) { + const char *lp; lwp_lock(l); - snprintf(lmsg, sizeof(lmsg), "%s%s", - l->l_stat == LSONPROC ? "running" : - l->l_stat == LSRUN ? "runnable" : - l->l_wchan ? l->l_wmesg : "iowait", - (LIST_NEXT(l, l_sibling) != NULL) ? " " : "] "); - lwp_unlock(l); - strlcat(buf, lmsg, bufsz); +#ifdef LWP_PC +#define FMT_RUN "%#"PRIxVADDR +#define VAL_RUNNING (vaddr_t)LWP_PC(l) +#define VAL_RUNABLE (vaddr_t)LWP_PC(l) +#else +#define FMT_RUN "%s" +#define VAL_RUNNING "running" +#define VAL_RUNABLE "runnable" +#endif + switch (l->l_stat) { + case LSONPROC: + snprintf(lmsg, sizeof(lmsg), FMT_RUN"/%d", VAL_RUNNING, + cpu_index(l->l_cpu)); + lp = lmsg; + break; + case LSRUN: + snprintf(lmsg, sizeof(lmsg), FMT_RUN, VAL_RUNABLE); + lp = lmsg; + break; + default: + lp = l->l_wchan ? l->l_wmesg : "iowait"; + break; + } + strlcat(buf, lp, bufsz); + strlcat(buf, LIST_NEXT(l, l_sibling) != NULL ? " " : "] ", + bufsz); pctcpu += l->l_pctcpu; + lwp_unlock(l); } pctcpu += pick->p_pctcpu; calcru(pick, &utime, &stime, NULL, NULL);
CVS commit: src/usr.sbin/ypbind
Module Name:src Committed By: dholland Date: Wed May 25 04:59:22 UTC 2011 Modified Files: src/usr.sbin/ypbind: ypbind.c Log Message: Don't print uninitialized values off the stack, even as debug messages. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/usr.sbin/ypbind/ypbind.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/ypbind/ypbind.c diff -u src/usr.sbin/ypbind/ypbind.c:1.87 src/usr.sbin/ypbind/ypbind.c:1.88 --- src/usr.sbin/ypbind/ypbind.c:1.87 Wed May 25 04:33:52 2011 +++ src/usr.sbin/ypbind/ypbind.c Wed May 25 04:59:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ypbind.c,v 1.87 2011/05/25 04:33:52 dholland Exp $ */ +/* $NetBSD: ypbind.c,v 1.88 2011/05/25 04:59:22 dholland Exp $ */ /* * Copyright (c) 1992, 1993 Theo de Raadt @@ -28,7 +28,7 @@ #include #ifndef LINT -__RCSID("$NetBSD: ypbind.c,v 1.87 2011/05/25 04:33:52 dholland Exp $"); +__RCSID("$NetBSD: ypbind.c,v 1.88 2011/05/25 04:59:22 dholland Exp $"); #endif #include @@ -521,9 +521,9 @@ struct sockaddr_in *fromsin, bindsin; static bool_t res; - DPRINTF("ypbindproc_setdom_2 %s\n", inet_ntoa(bindsin.sin_addr)); (void)memset(&res, 0, sizeof(res)); fromsin = svc_getcaller(transp); + DPRINTF("ypbindproc_setdom_2 from %s\n", inet_ntoa(fromsin->sin_addr)); if (allow_any_ypset) { /* nothing */
CVS commit: src/usr.sbin/ypbind
Module Name:src Committed By: dholland Date: Wed May 25 04:33:52 UTC 2011 Modified Files: src/usr.sbin/ypbind: ypbind.c Log Message: When checking if /var/yp/binding/foo.ypservers exists, use the domain name of the domain being checked instead of the default domain name. Duh. Necessary for PR 43900. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/usr.sbin/ypbind/ypbind.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/ypbind/ypbind.c diff -u src/usr.sbin/ypbind/ypbind.c:1.86 src/usr.sbin/ypbind/ypbind.c:1.87 --- src/usr.sbin/ypbind/ypbind.c:1.86 Tue May 24 07:02:08 2011 +++ src/usr.sbin/ypbind/ypbind.c Wed May 25 04:33:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ypbind.c,v 1.86 2011/05/24 07:02:08 dholland Exp $ */ +/* $NetBSD: ypbind.c,v 1.87 2011/05/25 04:33:52 dholland Exp $ */ /* * Copyright (c) 1992, 1993 Theo de Raadt @@ -28,7 +28,7 @@ #include #ifndef LINT -__RCSID("$NetBSD: ypbind.c,v 1.86 2011/05/24 07:02:08 dholland Exp $"); +__RCSID("$NetBSD: ypbind.c,v 1.87 2011/05/25 04:33:52 dholland Exp $"); #endif #include @@ -246,7 +246,7 @@ */ dom->dom_ypbindmode = default_ypbindmode; if (dom->dom_ypbindmode == YPBIND_DIRECT) { - pathname = ypservers_filename(domainname); + pathname = ypservers_filename(dom->dom_name); if (stat(pathname, &st) < 0) { /* XXX syslog a warning here? */ DPRINTF("%s does not exist, defaulting to broadcast\n",
CVS commit: xsrc/external/mit/xf86-video-sunleo/dist/src
Module Name:xsrc Committed By: christos Date: Wed May 25 03:19:26 UTC 2011 Modified Files: xsrc/external/mit/xf86-video-sunleo/dist/src: leo_fspans.c leo_fspanssp.c Log Message: don't try to use functions that don't exist, abort() instead. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspans.c \ xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspanssp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspans.c diff -u xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspans.c:1.1.1.1 xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspans.c:1.2 --- xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspans.c:1.1.1.1 Fri Sep 4 16:12:48 2009 +++ xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspans.c Tue May 24 23:19:26 2011 @@ -66,6 +66,8 @@ cy1 = clip->extents.y1; cy2 = clip->extents.y2; } else { +#if 0 + /* These functions are gone from xserver */ int nTmp = n * miFindMaxBand(clip); pwidthFree = (int *)xalloc(nTmp * sizeof(int)); @@ -80,6 +82,9 @@ pptFree, pwidthFree, fSorted); pwidth = pwidthFree; ppt = pptFree; +#else + abort(); +#endif } if (pGC->alu != GXcopy) Index: xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspanssp.c diff -u xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspanssp.c:1.1.1.1 xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspanssp.c:1.2 --- xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspanssp.c:1.1.1.1 Fri Sep 4 16:12:48 2009 +++ xsrc/external/mit/xf86-video-sunleo/dist/src/leo_fspanssp.c Tue May 24 23:19:26 2011 @@ -67,6 +67,8 @@ cy1 = clip->extents.y1; cy2 = clip->extents.y2; } else { +#if 0 + /* These functions are gone from the x server */ int nTmp = n * miFindMaxBand(clip); pwidthFree = (int *)xalloc(nTmp * sizeof(int)); @@ -81,6 +83,9 @@ pptFree, pwidthFree, fSorted); pwidth = pwidthFree; ppt = pptFree; +#else + abort(); +#endif } if (pGC->alu != GXcopy)
CVS commit: xsrc/external/mit/xf86-video-sunleo/dist/src
Module Name:xsrc Committed By: christos Date: Wed May 25 03:13:49 UTC 2011 Modified Files: xsrc/external/mit/xf86-video-sunleo/dist/src: leo_accel.c Log Message: missing paren To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c diff -u xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c:1.4 xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c:1.5 --- xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c:1.4 Tue May 24 15:31:18 2011 +++ xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c Tue May 24 23:13:49 2011 @@ -111,7 +111,7 @@ return FALSE; #else if (!dixRegisterPrivateKey(&LeoGCPrivateIndex, PRIVATE_GC, - sizeof(LeoPrivGCRec)) + sizeof(LeoPrivGCRec))) return FALSE; #endif
CVS commit: src/lib/libc/arch/sparc64/string
Module Name:src Committed By: christos Date: Wed May 25 02:11:16 UTC 2011 Modified Files: src/lib/libc/arch/sparc64/string: memcpy.S Log Message: use _ALIGN consistently. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/sparc64/string/memcpy.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/sparc64/string/memcpy.S diff -u src/lib/libc/arch/sparc64/string/memcpy.S:1.3 src/lib/libc/arch/sparc64/string/memcpy.S:1.4 --- src/lib/libc/arch/sparc64/string/memcpy.S:1.3 Tue May 24 18:39:47 2011 +++ src/lib/libc/arch/sparc64/string/memcpy.S Tue May 24 22:11:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: memcpy.S,v 1.3 2011/05/24 22:39:47 christos Exp $ */ +/* $NetBSD: memcpy.S,v 1.4 2011/05/25 02:11:16 christos Exp $ */ /* * Copyright (c) 2001 Eduardo E. Horvath @@ -46,7 +46,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: memcpy.S,v 1.3 2011/05/24 22:39:47 christos Exp $") + RCSID("$NetBSD: memcpy.S,v 1.4 2011/05/25 02:11:16 christos Exp $") #endif /* LIBC_SCCS and not lint */ #define EMPTY nop @@ -98,7 +98,6 @@ restore .data 2: .asciz "bcopy(%p->%p,%x)\n" - .align 8 _ALIGN .text 3: @@ -733,7 +732,7 @@ .data 0: .asciz "bcopy failed: %x@%p != %x@%p byte %d\n" 1: .asciz "bcopy(%p, %p, %lx)\n" - .align 8 + _ALIGN .text 2: #endif
CVS commit: src/sys/fs/tmpfs
Module Name:src Committed By: rmind Date: Wed May 25 02:03:22 UTC 2011 Modified Files: src/sys/fs/tmpfs: tmpfs_subr.c Log Message: tmpfs_update: comment out assert for now. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/fs/tmpfs/tmpfs_subr.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/fs/tmpfs/tmpfs_subr.c diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.69 src/sys/fs/tmpfs/tmpfs_subr.c:1.70 --- src/sys/fs/tmpfs/tmpfs_subr.c:1.69 Wed May 25 00:06:45 2011 +++ src/sys/fs/tmpfs/tmpfs_subr.c Wed May 25 02:03:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_subr.c,v 1.69 2011/05/25 00:06:45 rmind Exp $ */ +/* $NetBSD: tmpfs_subr.c,v 1.70 2011/05/25 02:03:22 rmind Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.69 2011/05/25 00:06:45 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.70 2011/05/25 02:03:22 rmind Exp $"); #include #include @@ -1002,7 +1002,7 @@ tmpfs_node_t *node = VP_TO_TMPFS_NODE(vp); struct timespec nowtm; - KASSERT(VOP_ISLOCKED(vp)); + /* KASSERT(VOP_ISLOCKED(vp)); */ if (flags & UPDATE_CLOSE) { /* XXX Need to do anything special? */
CVS commit: src/sys/fs/tmpfs
Module Name:src Committed By: rmind Date: Wed May 25 00:06:45 UTC 2011 Modified Files: src/sys/fs/tmpfs: tmpfs_subr.c Log Message: tmpfs_dir_lookup: use 'name' variable in memcmp() as intended; fix warning. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/fs/tmpfs/tmpfs_subr.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/fs/tmpfs/tmpfs_subr.c diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.68 src/sys/fs/tmpfs/tmpfs_subr.c:1.69 --- src/sys/fs/tmpfs/tmpfs_subr.c:1.68 Tue May 24 23:16:16 2011 +++ src/sys/fs/tmpfs/tmpfs_subr.c Wed May 25 00:06:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_subr.c,v 1.68 2011/05/24 23:16:16 rmind Exp $ */ +/* $NetBSD: tmpfs_subr.c,v 1.69 2011/05/25 00:06:45 rmind Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.68 2011/05/24 23:16:16 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.69 2011/05/25 00:06:45 rmind Exp $"); #include #include @@ -494,7 +494,7 @@ TAILQ_FOREACH(de, &node->tn_spec.tn_dir.tn_dir, td_entries) { if (de->td_namelen != nlen) continue; - if (memcmp(de->td_name, cnp->cn_nameptr, nlen) != 0) + if (memcmp(de->td_name, name, nlen) != 0) continue; break; }
CVS commit: src/sys/arch/vax
Module Name:src Committed By: matt Date: Tue May 24 23:30:30 UTC 2011 Modified Files: src/sys/arch/vax/include: pmap.h src/sys/arch/vax/vax: pmap.c Log Message: Remove pmap's simple_lock; switch to atomic ops Change pvtable simple_lock to mutex Switch to kmem (goodbye malloc). To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/arch/vax/include/pmap.h cvs rdiff -u -r1.179 -r1.180 src/sys/arch/vax/vax/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/vax/include/pmap.h diff -u src/sys/arch/vax/include/pmap.h:1.79 src/sys/arch/vax/include/pmap.h:1.80 --- src/sys/arch/vax/include/pmap.h:1.79 Sun Nov 14 13:33:23 2010 +++ src/sys/arch/vax/include/pmap.h Tue May 24 23:30:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.79 2010/11/14 13:33:23 uebayasi Exp $ */ +/* $NetBSD: pmap.h,v 1.80 2011/05/24 23:30:30 matt Exp $ */ /* * Copyright (c) 1991 Regents of the University of California. @@ -81,7 +81,7 @@ #ifndef PMAP_H #define PMAP_H -#include +#include #include @@ -102,13 +102,12 @@ struct pmap { struct pte *pm_p1ap; /* Base of alloced p1 pte space */ - int pm_count; /* reference count */ + u_int pm_count; /* reference count */ struct pcb *pm_pcbs; /* PCBs using this pmap */ struct pte *pm_p0br; /* page 0 base register */ long pm_p0lr; /* page 0 length register */ struct pte *pm_p1br; /* page 1 base register */ long pm_p1lr; /* page 1 length register */ - struct simplelock pm_lock; /* Lock entry in MP environment */ struct pmap_statistics pm_stats; /* Some statistics */ }; @@ -149,7 +148,7 @@ /* * This is the by far most used pmap routine. Make it inline. */ -__inline static bool +static __inline bool pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap) { int *pte, sva; @@ -190,25 +189,30 @@ return (false); } -bool pmap_clear_modify_long(struct pv_entry *); -bool pmap_clear_reference_long(struct pv_entry *); -bool pmap_is_modified_long(struct pv_entry *); +bool pmap_clear_modify_long(const struct pv_entry *); +bool pmap_clear_reference_long(const struct pv_entry *); +bool pmap_is_modified_long_p(const struct pv_entry *); void pmap_page_protect_long(struct pv_entry *, vm_prot_t); void pmap_protect_long(pmap_t, vaddr_t, vaddr_t, vm_prot_t); -__inline static bool +static __inline struct pv_entry * +pmap_pg_to_pv(const struct vm_page *pg) +{ + return pv_table + (VM_PAGE_TO_PHYS(pg) >> PGSHIFT); +} + +static __inline bool pmap_is_referenced(struct vm_page *pg) { - struct pv_entry *pv = pv_table + (VM_PAGE_TO_PHYS(pg) >> PGSHIFT); - bool rv = (pv->pv_attr & PG_V) != 0; + const struct pv_entry * const pv = pmap_pg_to_pv(pg); - return rv; + return (pv->pv_attr & PG_V) != 0; } -__inline static bool +static __inline bool pmap_clear_reference(struct vm_page *pg) { - struct pv_entry *pv = pv_table + (VM_PAGE_TO_PHYS(pg) >> PGSHIFT); + struct pv_entry * const pv = pmap_pg_to_pv(pg); bool rv = (pv->pv_attr & PG_V) != 0; pv->pv_attr &= ~PG_V; @@ -217,10 +221,10 @@ return rv; } -__inline static bool +static __inline bool pmap_clear_modify(struct vm_page *pg) { - struct pv_entry *pv = pv_table + (VM_PAGE_TO_PHYS(pg) >> PGSHIFT); + struct pv_entry * const pv = pmap_pg_to_pv(pg); bool rv = (pv->pv_attr & PG_M) != 0; pv->pv_attr &= ~PG_M; @@ -229,26 +233,24 @@ return rv; } -__inline static bool +static __inline bool pmap_is_modified(struct vm_page *pg) { - struct pv_entry *pv = pv_table + (VM_PAGE_TO_PHYS(pg) >> PGSHIFT); - if (pv->pv_attr & PG_M) - return 1; - else - return pmap_is_modified_long(pv); + const struct pv_entry * const pv = pmap_pg_to_pv(pg); + + return (pv->pv_attr & PG_M) != 0 || pmap_is_modified_long_p(pv); } -__inline static void +static __inline void pmap_page_protect(struct vm_page *pg, vm_prot_t prot) { - struct pv_entry *pv = pv_table + (VM_PAGE_TO_PHYS(pg) >> PGSHIFT); + struct pv_entry * const pv = pmap_pg_to_pv(pg); if (pv->pv_pmap != NULL || pv->pv_next != NULL) pmap_page_protect_long(pv, prot); } -__inline static void +static __inline void pmap_protect(pmap_t pmap, vaddr_t start, vaddr_t end, vm_prot_t prot) { if (pmap->pm_p0lr != 0 || pmap->pm_p1lr != 0x20 || @@ -266,10 +268,10 @@ #define pmap_phys_address(phys) ((u_int)(phys) << PGSHIFT) #define pmap_copy(a,b,c,d,e) /* Dont do anything */ #define pmap_update(pmap) /* nothing (yet) */ -#define pmap_remove(pmap, start, slut) pmap_protect(pmap, start, slut, 0) +#define pmap_remove(pmap, start, end) pmap_protect(pmap, start, end, 0) #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) #define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count) -#define pmap_reference(pmap) (pmap)->pm_count++ +#define pmap_reference(pmap) atomic_inc_uint(&(pmap)->pm_count) /* These can be done as efficient inline macros */ #define pmap_copy_page(src, dst) \
CVS commit: src/sys/fs/tmpfs
Module Name:src Committed By: rmind Date: Tue May 24 23:16:16 UTC 2011 Modified Files: src/sys/fs/tmpfs: tmpfs_subr.c tmpfs_vnops.c Log Message: - tmpfs_lookup: cache (cnp->cn_flags & ISLASTCN) in const bool; de-indent. - Group tmpfs_{alloc,free}_dirent() with other dirent routines. No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/fs/tmpfs/tmpfs_subr.c cvs rdiff -u -r1.83 -r1.84 src/sys/fs/tmpfs/tmpfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/tmpfs/tmpfs_subr.c diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.67 src/sys/fs/tmpfs/tmpfs_subr.c:1.68 --- src/sys/fs/tmpfs/tmpfs_subr.c:1.67 Tue May 24 20:17:49 2011 +++ src/sys/fs/tmpfs/tmpfs_subr.c Tue May 24 23:16:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_subr.c,v 1.67 2011/05/24 20:17:49 rmind Exp $ */ +/* $NetBSD: tmpfs_subr.c,v 1.68 2011/05/24 23:16:16 rmind Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.67 2011/05/24 20:17:49 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.68 2011/05/24 23:16:16 rmind Exp $"); #include #include @@ -212,77 +212,6 @@ } /* - * tmpfs_alloc_dirent: allocates a new directory entry for the inode. - * - * The link count of node is increased by one to reflect the new object - * referencing it. This takes care of notifying kqueue listeners about - * this change. - */ -int -tmpfs_alloc_dirent(tmpfs_mount_t *tmp, tmpfs_node_t *node, -const char *name, uint16_t len, tmpfs_dirent_t **de) -{ - tmpfs_dirent_t *nde; - - nde = tmpfs_dirent_get(tmp); - if (nde == NULL) - return ENOSPC; - - nde->td_name = tmpfs_strname_alloc(tmp, len); - if (nde->td_name == NULL) { - tmpfs_dirent_put(tmp, nde); - return ENOSPC; - } - nde->td_namelen = len; - memcpy(nde->td_name, name, len); - nde->td_node = node; - - if (node != TMPFS_NODE_WHITEOUT) { - node->tn_links++; - if (node->tn_links > 1 && node->tn_vnode != NULL) - VN_KNOTE(node->tn_vnode, NOTE_LINK); - } - - *de = nde; - return 0; -} - -/* - * tmpfs_free_dirent: free a directory entry. - * - * => It is the caller's responsibility to destroy the referenced inode. - * => The link count of inode is decreased by one to reflect the removal of - * an object that referenced it. This only happens if 'node_exists' is true; - * otherwise the function will not access the node referred to by the - * directory entry, as it may already have been released from the outside. - * - * Interested parties (kqueue) are notified of the link count change; note - * that this can include both the node pointed to by the directory entry - * as well as its parent. - */ -void -tmpfs_free_dirent(tmpfs_mount_t *tmp, tmpfs_dirent_t *de, bool node_exists) -{ - - if (node_exists && de->td_node != TMPFS_NODE_WHITEOUT) { - tmpfs_node_t *node = de->td_node; - - KASSERT(node->tn_links > 0); - node->tn_links--; - if (node->tn_vnode != NULL) { - VN_KNOTE(node->tn_vnode, node->tn_links == 0 ? - NOTE_DELETE : NOTE_LINK); - } - if (node->tn_type == VDIR) { - VN_KNOTE(node->tn_spec.tn_dir.tn_parent->tn_vnode, - NOTE_LINK); - } - } - tmpfs_strname_free(tmp, de->td_name, de->td_namelen); - tmpfs_dirent_put(tmp, de); -} - -/* * tmpfs_alloc_vp: allocate or reclaim a vnode for a specified inode. * * => Returns vnode (*vpp) locked. @@ -429,10 +358,81 @@ } /* + * tmpfs_alloc_dirent: allocates a new directory entry for the inode. + * + * The link count of node is increased by one to reflect the new object + * referencing it. This takes care of notifying kqueue listeners about + * this change. + */ +int +tmpfs_alloc_dirent(tmpfs_mount_t *tmp, tmpfs_node_t *node, +const char *name, uint16_t len, tmpfs_dirent_t **de) +{ + tmpfs_dirent_t *nde; + + nde = tmpfs_dirent_get(tmp); + if (nde == NULL) + return ENOSPC; + + nde->td_name = tmpfs_strname_alloc(tmp, len); + if (nde->td_name == NULL) { + tmpfs_dirent_put(tmp, nde); + return ENOSPC; + } + nde->td_namelen = len; + memcpy(nde->td_name, name, len); + nde->td_node = node; + + if (node != TMPFS_NODE_WHITEOUT) { + node->tn_links++; + if (node->tn_links > 1 && node->tn_vnode != NULL) + VN_KNOTE(node->tn_vnode, NOTE_LINK); + } + + *de = nde; + return 0; +} + +/* + * tmpfs_free_dirent: free a directory entry. + * + * => It is the caller's responsibility to destroy the referenced inode. + * => The link count of inode is decreased by one to reflect the removal of + * an object that referenced it. This only happens if 'node_exists' is true; + * otherwise the function will not access the node referred to by the + * directory entry, as it may already have been released from the outside. + * + * Interested parties (kqueue) are notified of the link count change; note + * that this can include both the node pointed to by the directory entry + * as well
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px
Module Name:xsrc Committed By: jakllsch Date: Tue May 24 23:12:36 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px: decPX.c pxgc.c pxgetsp.c Log Message: Build fixes for PX driver. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/decPX.c cvs rdiff -u -r1.2 -r1.3 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/pxgc.c \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/pxgetsp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/decPX.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/decPX.c:1.3 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/decPX.c:1.4 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/decPX.c:1.3 Mon Apr 28 20:57:37 2008 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/decPX.c Tue May 24 23:12:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: decPX.c,v 1.3 2008/04/28 20:57:37 martin Exp $ */ +/* $NetBSD: decPX.c,v 1.4 2011/05/24 23:12:36 jakllsch Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -81,6 +81,7 @@ #include "px.h" #include "cfb.h" +#include "cfb32.h" #include "mi.h" #include @@ -113,6 +114,21 @@ #endif ); +/* + * XXX + */ +extern Bool cfbFinishScreenInit( +#if NeedFunctionPrototypes + ScreenPtr /*pScreen*/, + pointer /*pbits*/, + int /*xsize*/, + int /*ysize*/, + int /*dpix*/, + int /*dpiy*/, + int /*width*/ +#endif +); + Bool cfbCreateScreenResources(ScreenPtr); Bool cfb32CreateScreenResources(ScreenPtr); Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/pxgc.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/pxgc.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/pxgc.c:1.3 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/pxgc.c:1.2 Mon Apr 28 20:57:37 2008 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/pxgc.c Tue May 24 23:12:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pxgc.c,v 1.2 2008/04/28 20:57:37 martin Exp $ */ +/* $NetBSD: pxgc.c,v 1.3 2011/05/24 23:12:36 jakllsch Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -34,6 +34,7 @@ #include "Xmd.h" #include "Xproto.h" #include "cfb.h" +#include "cfbmap.h" #include "cfbmskbits.h" #include "fontstruct.h" #include "dixfontstr.h" @@ -45,10 +46,12 @@ #include "mibstore.h" #include "migc.h" +#if 0 /* XXX */ #undef cfbNonTEOps #undef cfbCreateGC #undef cfbValidateGC +#endif void pxValidateGC(GCPtr, u_long, DrawablePtr); Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/pxgetsp.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/pxgetsp.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/pxgetsp.c:1.3 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/pxgetsp.c:1.2 Mon Apr 28 20:57:37 2008 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/px/pxgetsp.c Tue May 24 23:12:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pxgetsp.c,v 1.2 2008/04/28 20:57:37 martin Exp $ */ +/* $NetBSD: pxgetsp.c,v 1.3 2011/05/24 23:12:36 jakllsch Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -38,7 +38,9 @@ #include "scrnintstr.h" #include "cfb.h" +#if 0 #undef cfbGetSpans +#endif #define myBitsPerPixel(d) (\ (1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd
Module Name:xsrc Committed By: jakllsch Date: Tue May 24 23:10:03 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb: alphaSFB.c sfbmap.h sfbsimpleblt.c xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb: decSFB.c sfbmap.h sfbsimpleblt.c Log Message: Build fixes for SFB driver. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/alphaSFB.c \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/sfbmap.h cvs rdiff -u -r1.2 -r1.3 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/sfbsimpleblt.c cvs rdiff -u -r1.1 -r1.2 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/decSFB.c \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/sfbmap.h cvs rdiff -u -r1.2 -r1.3 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/sfbsimpleblt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/alphaSFB.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/alphaSFB.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/alphaSFB.c:1.2 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/alphaSFB.c:1.1 Sun Jan 18 04:13:22 2004 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/alphaSFB.c Tue May 24 23:10:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: alphaSFB.c,v 1.1 2004/01/18 04:13:22 rtr Exp $ */ +/* $NetBSD: alphaSFB.c,v 1.2 2011/05/24 23:10:03 jakllsch Exp $ */ /* $XConsortium: sunCfb.c,v 1.15.1.2 95/01/12 18:54:42 kaleb Exp $ */ /* $XFree86: xc/programs/Xserver/hw/sun/sunCfb.c,v 3.2 1995/02/12 02:36:22 dawes Exp $ */ @@ -88,11 +88,15 @@ #include "alpha.h" #include "cfb.h" +#include "cfb32.h" #include /* XXX */ #include +static Bool alphaSfbScreenInit( +register ScreenPtr, pointer, int, int, int, int, int, int); + static void CGUpdateColormap(pScreen, dex, count, rmap, gmap, bmap) ScreenPtr pScreen; int dex, count; Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/sfbmap.h diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/sfbmap.h:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/sfbmap.h:1.2 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/sfbmap.h:1.1 Sun Jan 18 04:13:22 2004 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/sfbmap.h Tue May 24 23:10:03 2011 @@ -21,3 +21,8 @@ #else #error Unsupported PSZ #endif + +#include + +void alphaSfbDoBitbltSimple(unsigned int *, unsigned int *, unsigned int, +unsigned int, sfb_reg_t **, int, int, int, int, int, int, int, int, int); Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/sfbsimpleblt.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/sfbsimpleblt.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/sfbsimpleblt.c:1.3 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/sfbsimpleblt.c:1.2 Tue Oct 27 23:17:12 2009 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/sfb/sfbsimpleblt.c Tue May 24 23:10:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sfbsimpleblt.c,v 1.2 2009/10/27 23:17:12 elric Exp $ */ +/* $NetBSD: sfbsimpleblt.c,v 1.3 2011/05/24 23:10:03 jakllsch Exp $ */ /* * sfb simple rops @@ -52,6 +52,7 @@ #include #include "alpha.h" +#include "sfbmap.h" #include void Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/decSFB.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/decSFB.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/decSFB.c:1.2 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/decSFB.c:1.1 Sun Jan 18 05:21:41 2004 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/decSFB.c Tue May 24 23:10:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: decSFB.c,v 1.1 2004/01/18 05:21:41 rtr Exp $ */ +/* $NetBSD: decSFB.c,v 1.2 2011/05/24 23:10:03 jakllsch Exp $ */ /* XConsortium: sunCfb.c,v 1.15.1.2 95/01/12 18:54:42 kaleb Exp */ /* XFree86: xc/programs/Xserver/hw/sun/sunCfb.c,v 3.2 1995/02/12 02:36:22 dawes Exp */ @@ -89,10 +89,14 @@ #include "dec.h" #include "sfb.h" #include "cfb.h" +#include "cfb32.h" /* XXX */ #include +static Bool decSfbScreenInit( +register ScreenPtr, pointer, int, int, int, int, int, int); + /* * Restore color map to white-on-black, and call decCloseScreen */ Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/sfbmap.h diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/sfbmap.h:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/sfbmap.h:1.2 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/sfbmap.h:1.1 Sun Jan 18 05:21:41 2004 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/sfbmap.h Tue May 24 23:10:03 2011 @@ -21,3 +21,8 @@ #else #error Unsupported PSZ #endif + +#include + +void decSfbDoBitbltSimple(unsigned int *, unsigned int *, unsigned int, +unsigned int, sfb_reg_t **, int, int, int, int, int, int, int, int, int); Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb/sfbs
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd
Module Name:xsrc Committed By: jakllsch Date: Tue May 24 23:08:43 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga: alphaTGA.c tgamap.h tgasimpleblt.c xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/tga: decTGA.c tgamap.h tgasimpleblt.c Log Message: Build fixes for TGA driver. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/alphaTGA.c cvs rdiff -u -r1.3 -r1.4 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h cvs rdiff -u -r1.2 -r1.3 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgasimpleblt.c cvs rdiff -u -r1.1 -r1.2 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/tga/decTGA.c \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/tga/tgamap.h cvs rdiff -u -r1.2 -r1.3 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/tga/tgasimpleblt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/alphaTGA.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/alphaTGA.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/alphaTGA.c:1.2 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/alphaTGA.c:1.1 Sun Jan 18 04:13:22 2004 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/alphaTGA.c Tue May 24 23:08:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: alphaTGA.c,v 1.1 2004/01/18 04:13:22 rtr Exp $ */ +/* $NetBSD: alphaTGA.c,v 1.2 2011/05/24 23:08:42 jakllsch Exp $ */ /* $XConsortium: sunCfb.c,v 1.15.1.2 95/01/12 18:54:42 kaleb Exp $ */ /* $XFree86: xc/programs/Xserver/hw/sun/sunCfb.c,v 3.2 1995/02/12 02:36:22 dawes Exp $ */ @@ -88,11 +88,17 @@ #include "alpha.h" #include "cfb.h" +#include "cfb32.h" #include /* XXX */ #include +static Bool alphaTgaScreenInit( +register ScreenPtr, pointer, int, int, int, int, int, int); +static Bool alphaTgaFinishScreenInit( +register ScreenPtr, pointer, int, int, int, int, int, int); + static void CGUpdateColormap(pScreen, dex, count, rmap, gmap, bmap) ScreenPtr pScreen; int dex, count; Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h:1.3 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h:1.4 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h:1.3 Sat May 21 14:34:56 2011 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h Tue May 24 23:08:42 2011 @@ -18,11 +18,11 @@ #define alphaTgaTEOps alphaTga32TEOps #define alphaTgaNonTEOps alphaTga32NonTEOps +#else +#error Unsupported PSZ +#endif + #include void alphaTgaDoBitbltSimple(unsigned int *, unsigned int *, unsigned int, unsigned int, tga_reg_t **, int, int, int, int, int, int, int, int, int); - -#else -#error Unsupported PSZ -#endif Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgasimpleblt.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgasimpleblt.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgasimpleblt.c:1.3 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgasimpleblt.c:1.2 Tue Oct 27 23:17:12 2009 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgasimpleblt.c Tue May 24 23:08:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tgasimpleblt.c,v 1.2 2009/10/27 23:17:12 elric Exp $ */ +/* $NetBSD: tgasimpleblt.c,v 1.3 2011/05/24 23:08:42 jakllsch Exp $ */ /* * tga simple rops @@ -52,6 +52,7 @@ #include #include "alpha.h" +#include "tgamap.h" #include void Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/tga/decTGA.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/tga/decTGA.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/tga/decTGA.c:1.2 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/tga/decTGA.c:1.1 Sun Jan 18 05:21:41 2004 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/tga/decTGA.c Tue May 24 23:08:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: decTGA.c,v 1.1 2004/01/18 05:21:41 rtr Exp $ */ +/* $NetBSD: decTGA.c,v 1.2 2011/05/24 23:08:43 jakllsch Exp $ */ /* $XConsortium: sunCfb.c,v 1.15.1.2 95/01/12 18:54:42 kaleb Exp $ */ /* $XFree86: xc/programs/Xserver/hw/sun/sunCfb.c,v 3.2 1995/02/12 02:36:22 dawes Exp $ */ @@ -88,8 +88,14 @@ #include "dec.h" #include "cfb.h" +#include "cfb32.h" #include "tga.h" +static Bool decTgaScreenInit( +register ScreenPtr, pointer, int, int, int, int, int, int); +static Bool decTgaScreenInit( +register ScreenPtr, pointer, int, int, int, int, int, int); + Bool decTGAInit (screen, pScreen, argc, argv) int screen; /* what screen am I going to be */ ScreenPtr pScreen; /* The Screen to initialize */ Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/tga/tgamap.h diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/tga/tgamap.h:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/tga/tgamap.h:1.2 --- xsrc/xfree/xc/programs/Xs
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Tue May 24 22:46:42 UTC 2011 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Fix invalid PBA setting on ICH{9,10}. This bug was introduced in the last commit. I noticed this problem via mail from spz. To generate a diff of this commit: cvs rdiff -u -r1.221 -r1.222 src/sys/dev/pci/if_wm.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/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.221 src/sys/dev/pci/if_wm.c:1.222 --- src/sys/dev/pci/if_wm.c:1.221 Fri May 20 00:57:42 2011 +++ src/sys/dev/pci/if_wm.c Tue May 24 22:46:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.221 2011/05/20 00:57:42 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.222 2011/05/24 22:46:42 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.221 2011/05/20 00:57:42 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.222 2011/05/24 22:46:42 msaitoh Exp $"); #include "rnd.h" @@ -3482,6 +3482,7 @@ case WM_T_ICH9: case WM_T_ICH10: sc->sc_pba = PBA_10K; + break; case WM_T_PCH: case WM_T_PCH2: sc->sc_pba = PBA_26K;
CVS commit: src/lib/libc/arch/sparc64/string
Module Name:src Committed By: christos Date: Tue May 24 22:39:47 UTC 2011 Modified Files: src/lib/libc/arch/sparc64/string: memcpy.S Log Message: make this compile with DEBUG (_ALIGN was not defined). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/sparc64/string/memcpy.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/sparc64/string/memcpy.S diff -u src/lib/libc/arch/sparc64/string/memcpy.S:1.2 src/lib/libc/arch/sparc64/string/memcpy.S:1.3 --- src/lib/libc/arch/sparc64/string/memcpy.S:1.2 Wed Aug 1 01:52:12 2001 +++ src/lib/libc/arch/sparc64/string/memcpy.S Tue May 24 18:39:47 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: memcpy.S,v 1.2 2001/08/01 05:52:12 eeh Exp $ */ +/* $NetBSD: memcpy.S,v 1.3 2011/05/24 22:39:47 christos Exp $ */ /* * Copyright (c) 2001 Eduardo E. Horvath @@ -46,7 +46,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: memcpy.S,v 1.2 2001/08/01 05:52:12 eeh Exp $") + RCSID("$NetBSD: memcpy.S,v 1.3 2011/05/24 22:39:47 christos Exp $") #endif /* LIBC_SCCS and not lint */ #define EMPTY nop @@ -61,6 +61,10 @@ #define ASI_STORE ASI_BLK_P #endif +#ifndef _ALIGN +#define _ALIGN .align 8 +#endif + #if 1 /* * kernel bcopy/memcpy @@ -94,6 +98,7 @@ restore .data 2: .asciz "bcopy(%p->%p,%x)\n" + .align 8 _ALIGN .text 3:
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec
Module Name:xsrc Committed By: jakllsch Date: Tue May 24 22:16:45 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec: dec.h Log Message: Add prototype for decCloseScreen(). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/dec.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/dec.h diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/dec.h:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/dec.h:1.2 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/dec.h:1.1 Sun Jan 18 05:21:41 2004 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/dec.h Tue May 24 22:16:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dec.h,v 1.1 2004/01/18 05:21:41 rtr Exp $ */ +/* $NetBSD: dec.h,v 1.2 2011/05/24 22:16:45 jakllsch Exp $ */ /* XConsortium: sun.h,v 5.39.1.1 95/01/05 19:58:43 kaleb Exp */ /* XFree86: xc/programs/Xserver/hw/sun/sun.h,v 3.2 1995/02/12 02:36:21 dawes Exp */ @@ -271,6 +271,13 @@ #endif ); +extern Bool decCloseScreen( +#if NeedFunctionPrototypes +int /* i */, +ScreenPtr /* pScreen */ +#endif +); + extern pointer decMemoryMap( #if NeedFunctionPrototypes size_t /* len */,
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha
Module Name:xsrc Committed By: jakllsch Date: Tue May 24 21:52:04 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha: alpha.h Log Message: Add prototype for alphaCloseScreen(). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alpha.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alpha.h diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alpha.h:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alpha.h:1.2 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alpha.h:1.1 Sun Jan 18 04:13:22 2004 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alpha.h Tue May 24 21:52:04 2011 @@ -268,6 +268,13 @@ #endif ); +extern Bool alphaCloseScreen( +#if NeedFunctionPrototypes +int /* i */, +ScreenPtr /* pScreen */ +#endif +); + extern pointer alphaMemoryMap( #if NeedFunctionPrototypes size_t /* len */,
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec
Module Name:xsrc Committed By: jakllsch Date: Tue May 24 21:27:01 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec: decCursor.c Log Message: Take address of structure element rather than casting, like is done in the amiga version of this code. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decCursor.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decCursor.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decCursor.c:1.5 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decCursor.c:1.6 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decCursor.c:1.5 Tue May 24 19:37:25 2011 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decCursor.c Tue May 24 21:27:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: decCursor.c,v 1.5 2011/05/24 19:37:25 christos Exp $ */ +/* $NetBSD: decCursor.c,v 1.6 2011/05/24 21:27:00 jakllsch Exp $ */ /* XConsortium: sunCursor.c,v 5.19 94/04/17 20:29:35 gildea Exp */ /* @@ -112,7 +112,7 @@ box.x2 = w; box.y2 = h; REGION_INIT(pScreen, &rgnDst, &box, 1); -mfbDoBitblt((DrawablePtr)src, (DrawablePtr)dst, GXcopy, &rgnDst, ptSrc); +mfbDoBitblt(&src->drawable, &dst->drawable, GXcopy, &rgnDst, ptSrc); REGION_UNINIT(pScreen, &rgnDst); FreeScratchPixmapHeader(src); FreeScratchPixmapHeader(dst);
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec
Module Name:xsrc Committed By: jakllsch Date: Tue May 24 21:23:52 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec: decKbd.c decMouse.c Log Message: Needs "mi.h". To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decKbd.c cvs rdiff -u -r1.3 -r1.4 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decKbd.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decKbd.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decKbd.c:1.3 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decKbd.c:1.2 Sun Oct 10 05:35:33 2010 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decKbd.c Tue May 24 21:23:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: decKbd.c,v 1.2 2010/10/10 05:35:33 tsutsui Exp $ */ +/* $NetBSD: decKbd.c,v 1.3 2011/05/24 21:23:52 jakllsch Exp $ */ /* XConsortium: sunKbd.c,v 5.47 94/08/16 13:45:30 dpw Exp */ /*- @@ -43,6 +43,7 @@ / #define NEED_EVENTS +#include "mi.h" #include "dec.h" #include "keysym.h" #include Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c:1.3 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c:1.4 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c:1.3 Sun Oct 10 05:28:49 2010 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c Tue May 24 21:23:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: decMouse.c,v 1.3 2010/10/10 05:28:49 tsutsui Exp $ */ +/* $NetBSD: decMouse.c,v 1.4 2011/05/24 21:23:52 jakllsch Exp $ */ /* XConsortium: sunMouse.c,v 5.21 94/04/17 20:29:47 kaleb Exp */ /*- @@ -54,6 +54,7 @@ */ #define NEED_EVENTS +#include"mi.h" #include"dec.h" #include
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec
Module Name:xsrc Committed By: jakllsch Date: Tue May 24 21:22:28 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec: decIo.c Log Message: Needs "mi.h". To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decIo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decIo.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decIo.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decIo.c:1.2 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decIo.c:1.1 Sun Jan 18 05:21:41 2004 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decIo.c Tue May 24 21:22:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: decIo.c,v 1.1 2004/01/18 05:21:41 rtr Exp $ */ +/* $NetBSD: decIo.c,v 1.2 2011/05/24 21:22:28 jakllsch Exp $ */ /* XConsortium: sunIo.c,v 5.26.1.3 95/01/25 23:02:33 kaleb Exp */ /* XFree86: xc/programs/Xserver/hw/sun/sunIo.c,v 3.1 1995/01/28 15:46:06 dawes Exp */ @@ -49,6 +49,7 @@ / #define NEED_EVENTS +#include"mi.h" #include"dec.h" /*-
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec
Module Name:xsrc Committed By: jakllsch Date: Tue May 24 21:21:55 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec: decInit.c Log Message: #include for warn(3). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decInit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decInit.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decInit.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decInit.c:1.3 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decInit.c:1.2 Mon Mar 28 00:07:41 2005 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decInit.c Tue May 24 21:21:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: decInit.c,v 1.2 2005/03/28 00:07:41 tron Exp $ */ +/* $NetBSD: decInit.c,v 1.3 2011/05/24 21:21:55 jakllsch Exp $ */ #include"dec.h" #include"gcstruct.h" @@ -7,6 +7,7 @@ #include"cfb.h" #include +#include Bool decTGAInit(int, ScreenPtr, int, char **); Bool decSFBInit(int, ScreenPtr, int, char **);
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: rmind Date: Tue May 24 20:26:35 UTC 2011 Modified Files: src/sys/arch/alpha/alpha: machdep.c prom.c vm_machdep.c src/sys/arch/alpha/include: pcb.h prom.h src/sys/arch/alpha/pci: ttwoga_pci.c Log Message: Convert some simple_lock uses to mutex(9). Tested by: jak@, mhitch@ To generate a diff of this commit: cvs rdiff -u -r1.332 -r1.333 src/sys/arch/alpha/alpha/machdep.c cvs rdiff -u -r1.46 -r1.47 src/sys/arch/alpha/alpha/prom.c cvs rdiff -u -r1.105 -r1.106 src/sys/arch/alpha/alpha/vm_machdep.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/alpha/include/pcb.h cvs rdiff -u -r1.12 -r1.13 src/sys/arch/alpha/include/prom.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/alpha/pci/ttwoga_pci.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/alpha/alpha/machdep.c diff -u src/sys/arch/alpha/alpha/machdep.c:1.332 src/sys/arch/alpha/alpha/machdep.c:1.333 --- src/sys/arch/alpha/alpha/machdep.c:1.332 Fri Apr 15 21:24:00 2011 +++ src/sys/arch/alpha/alpha/machdep.c Tue May 24 20:26:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.332 2011/04/15 21:24:00 martin Exp $ */ +/* $NetBSD: machdep.c,v 1.333 2011/05/24 20:26:34 rmind Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.332 2011/04/15 21:24:00 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.333 2011/05/24 20:26:34 rmind Exp $"); #include #include @@ -657,7 +657,7 @@ */ pcb0->pcb_hw.apcb_ksp = v + USPACE - sizeof(struct trapframe); lwp0.l_md.md_tf = (struct trapframe *)pcb0->pcb_hw.apcb_ksp; - simple_lock_init(&pcb0->pcb_fpcpu_slock); + mutex_init(&pcb0->pcb_fpcpu_lock, MUTEX_DEFAULT, IPL_HIGH); /* Indicate that lwp0 has a CPU. */ lwp0.l_cpu = ci; Index: src/sys/arch/alpha/alpha/prom.c diff -u src/sys/arch/alpha/alpha/prom.c:1.46 src/sys/arch/alpha/alpha/prom.c:1.47 --- src/sys/arch/alpha/alpha/prom.c:1.46 Sat Nov 21 05:35:40 2009 +++ src/sys/arch/alpha/alpha/prom.c Tue May 24 20:26:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: prom.c,v 1.46 2009/11/21 05:35:40 rmind Exp $ */ +/* $NetBSD: prom.c,v 1.47 2011/05/24 20:26:34 rmind Exp $ */ /* * Copyright (c) 1992, 1994, 1995, 1996 Carnegie Mellon University @@ -27,13 +27,12 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.46 2009/11/21 05:35:40 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: prom.c,v 1.47 2011/05/24 20:26:34 rmind Exp $"); #include "opt_multiprocessor.h" #include #include -#include #include #include @@ -55,7 +54,7 @@ extern struct prom_vec prom_dispatch_v; -struct simplelock prom_slock; +static kmutex_t prom_lock; #ifdef _PMAP_MAY_USE_PROM_CONSOLE int prom_mapped = 1; /* Is PROM still mapped? */ @@ -86,7 +85,7 @@ prom_dispatch_v.routine_arg = c->crb_v_dispatch; prom_dispatch_v.routine = c->crb_v_dispatch->entry_va; - simple_lock_init(&prom_slock); + mutex_init(&prom_lock, MUTEX_DEFAULT, IPL_HIGH); } void @@ -107,13 +106,11 @@ static void prom_cache_sync(void); #endif -int +void prom_enter(void) { - int s; - s = splhigh(); - simple_lock(&prom_slock); + mutex_enter(&prom_lock); #ifdef _PMAP_MAY_USE_PROM_CONSOLE /* @@ -134,11 +131,10 @@ prom_cache_sync(); /* XXX */ } #endif - return s; } void -prom_leave(int s) +prom_leave(void) { #ifdef _PMAP_MAY_USE_PROM_CONSOLE @@ -157,8 +153,7 @@ prom_cache_sync(); /* XXX */ } #endif - simple_unlock(&prom_slock); - splx(s); + mutex_exit(&prom_lock); } #ifdef _PMAP_MAY_USE_PROM_CONSOLE @@ -185,16 +180,15 @@ { prom_return_t ret; unsigned char *to = (unsigned char *)0x2000; - int s; - s = prom_enter(); /* splhigh() and map prom */ + prom_enter(); *to = c; do { ret.bits = prom_putstr(alpha_console, to, 1); } while ((ret.u.retval & 1) == 0); - prom_leave(s); /* unmap prom and splx(s) */ + prom_leave(); } /* @@ -206,12 +200,11 @@ promcngetc(dev_t dev) { prom_return_t ret; - int s; for (;;) { - s = prom_enter(); + prom_enter(); ret.bits = prom_getc(alpha_console); - prom_leave(s); + prom_leave(); if (ret.u.status == 0 || ret.u.status == 1) return (ret.u.retval); } @@ -226,11 +219,10 @@ promcnlookc(dev_t dev, char *cp) { prom_return_t ret; - int s; - s = prom_enter(); + prom_enter(); ret.bits = prom_getc(alpha_console); - prom_leave(s); + prom_leave(); if (ret.u.status == 0 || ret.u.status == 1) { *cp = ret.u.retval; return 1; @@ -243,12 +235,11 @@ { unsigned char *to = (unsigned char *)0x2000; prom_return_t ret; - int s; - s = prom_enter(); + prom_enter(); ret.bits = prom_getenv_disp(id, to, len); memcpy(buf, to, len); - prom_leave(s); + prom_leave();
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec
Module Name:xsrc Committed By: christos Date: Tue May 24 19:37:25 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec: decCursor.c Log Message: need DrawablePtr not Drawable To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decCursor.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decCursor.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decCursor.c:1.4 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decCursor.c:1.5 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decCursor.c:1.4 Mon May 23 15:48:14 2011 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decCursor.c Tue May 24 15:37:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: decCursor.c,v 1.4 2011/05/23 19:48:14 christos Exp $ */ +/* $NetBSD: decCursor.c,v 1.5 2011/05/24 19:37:25 christos Exp $ */ /* XConsortium: sunCursor.c,v 5.19 94/04/17 20:29:35 gildea Exp */ /* @@ -112,7 +112,7 @@ box.x2 = w; box.y2 = h; REGION_INIT(pScreen, &rgnDst, &box, 1); -mfbDoBitblt((Drawable)src, (Drawable)dst, GXcopy, &rgnDst, ptSrc); +mfbDoBitblt((DrawablePtr)src, (DrawablePtr)dst, GXcopy, &rgnDst, ptSrc); REGION_UNINIT(pScreen, &rgnDst); FreeScratchPixmapHeader(src); FreeScratchPixmapHeader(dst);
CVS commit: xsrc/external/mit/xf86-video-newport/dist/src
Module Name:xsrc Committed By: christos Date: Tue May 24 19:35:28 UTC 2011 Modified Files: xsrc/external/mit/xf86-video-newport/dist/src: newport_driver.c Log Message: add unistd for close. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ xsrc/external/mit/xf86-video-newport/dist/src/newport_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-newport/dist/src/newport_driver.c diff -u xsrc/external/mit/xf86-video-newport/dist/src/newport_driver.c:1.8 xsrc/external/mit/xf86-video-newport/dist/src/newport_driver.c:1.9 --- xsrc/external/mit/xf86-video-newport/dist/src/newport_driver.c:1.8 Thu Dec 16 23:19:50 2010 +++ xsrc/external/mit/xf86-video-newport/dist/src/newport_driver.c Tue May 24 15:35:28 2011 @@ -64,6 +64,7 @@ #include #include +#include #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) > 6 #define xf86LoaderReqSymLists(...) do {} while (0)
CVS commit: xsrc/external/mit/xf86-video-igs/dist/src
Module Name:xsrc Committed By: christos Date: Tue May 24 19:33:55 UTC 2011 Modified Files: xsrc/external/mit/xf86-video-igs/dist/src: igs_accel.c Log Message: all driver needed includes To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ xsrc/external/mit/xf86-video-igs/dist/src/igs_accel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-igs/dist/src/igs_accel.c diff -u xsrc/external/mit/xf86-video-igs/dist/src/igs_accel.c:1.5 xsrc/external/mit/xf86-video-igs/dist/src/igs_accel.c:1.6 --- xsrc/external/mit/xf86-video-igs/dist/src/igs_accel.c:1.5 Thu May 20 16:05:34 2010 +++ xsrc/external/mit/xf86-video-igs/dist/src/igs_accel.c Tue May 24 15:33:55 2011 @@ -21,10 +21,14 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $NetBSD: igs_accel.c,v 1.5 2010/05/20 20:05:34 macallan Exp $ */ +/* $NetBSD: igs_accel.c,v 1.6 2011/05/24 19:33:55 christos Exp $ */ #include +/* all driver need this */ +#include "xf86.h" +#include "xf86_OSproc.h" + #include "igs.h" /*#define DEBUG*/
CVS commit: xsrc/external/mit/xf86-video-sunleo/dist/src
Module Name:xsrc Committed By: christos Date: Tue May 24 19:31:19 UTC 2011 Modified Files: xsrc/external/mit/xf86-video-sunleo/dist/src: leo_accel.c Log Message: use new dix API; the old one is gone. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c diff -u xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c:1.3 xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c:1.4 --- xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c:1.3 Fri Nov 26 07:05:17 2010 +++ xsrc/external/mit/xf86-video-sunleo/dist/src/leo_accel.c Tue May 24 15:31:18 2011 @@ -110,7 +110,8 @@ if (!AllocateGCPrivate(pScreen, LeoGCPrivateIndex, sizeof(LeoPrivGCRec))) return FALSE; #else - if (!dixRequestPrivate(&LeoGCPrivateIndex, sizeof(LeoPrivGCRec))) + if (!dixRegisterPrivateKey(&LeoGCPrivateIndex, PRIVATE_GC, + sizeof(LeoPrivGCRec)) return FALSE; #endif
CVS commit: src/sys/opencrypto
Module Name:src Committed By: drochner Date: Tue May 24 19:12:54 UTC 2011 Modified Files: src/sys/opencrypto: cryptodev.c Log Message: catch some corner cases of user input To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/opencrypto/cryptodev.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/opencrypto/cryptodev.c diff -u src/sys/opencrypto/cryptodev.c:1.63 src/sys/opencrypto/cryptodev.c:1.64 --- src/sys/opencrypto/cryptodev.c:1.63 Tue May 24 19:10:09 2011 +++ src/sys/opencrypto/cryptodev.c Tue May 24 19:12:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptodev.c,v 1.63 2011/05/24 19:10:09 drochner Exp $ */ +/* $NetBSD: cryptodev.c,v 1.64 2011/05/24 19:12:53 drochner Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $ */ /* $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $ */ @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.63 2011/05/24 19:10:09 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.64 2011/05/24 19:12:53 drochner Exp $"); #include #include @@ -456,7 +456,8 @@ /* the iov needs to be big enough to handle the uncompressed * data */ cse->uio.uio_iov[0].iov_len = iov_len; - cse->uio.uio_iov[0].iov_base = kmem_alloc(iov_len, KM_SLEEP); + if (iov_len > 0) + cse->uio.uio_iov[0].iov_base = kmem_alloc(iov_len, KM_SLEEP); cse->uio.uio_resid = cse->uio.uio_iov[0].iov_len; DPRINTF(("cryptodev_op[%u]: uio.iov_base %p malloced %d bytes\n", CRYPTO_SESID2LID(cse->sid), @@ -677,9 +678,12 @@ dst_len = crp->crp_ilen; /* let the user know how much data was returned */ if (crp->crp_olen) { + if (crp->crp_olen > (cop->dst_len ? cop->dst_len : cop->len)) { + error = ENOMEM; + goto bail; + } dst_len = cop->dst_len = crp->crp_olen; } - crp->len = dst_len; if (cop->dst) { DPRINTF(("cryptodev_op: copyout %d bytes to %p\n", dst_len, cop->dst));
CVS commit: src
Module Name:src Committed By: drochner Date: Tue May 24 19:10:12 UTC 2011 Modified Files: src/sys/netipsec: xform_ah.c src/sys/opencrypto: cryptodev.c cryptodev.h cryptosoft.c cryptosoft_xform.c files.opencrypto xform.c xform.h src/usr.bin/netstat: fast_ipsec.c Added Files: src/sys/opencrypto: aesxcbcmac.c aesxcbcmac.h Log Message: copy AES-XCBC-MAC support from KAME IPSEC to FAST_IPSEC For this to fit, an API change in cryptosoft was adopted from OpenBSD (addition of a "Setkey" method to hashes) which was done for GCM/GMAC support there, so it might be useful in the future anyway. tested against KAME IPSEC AFAICT, FAST_IPSEC now supports as much as KAME. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/netipsec/xform_ah.c cvs rdiff -u -r0 -r1.1 src/sys/opencrypto/aesxcbcmac.c \ src/sys/opencrypto/aesxcbcmac.h cvs rdiff -u -r1.62 -r1.63 src/sys/opencrypto/cryptodev.c cvs rdiff -u -r1.22 -r1.23 src/sys/opencrypto/cryptodev.h \ src/sys/opencrypto/files.opencrypto cvs rdiff -u -r1.35 -r1.36 src/sys/opencrypto/cryptosoft.c cvs rdiff -u -r1.21 -r1.22 src/sys/opencrypto/cryptosoft_xform.c cvs rdiff -u -r1.26 -r1.27 src/sys/opencrypto/xform.c cvs rdiff -u -r1.17 -r1.18 src/sys/opencrypto/xform.h cvs rdiff -u -r1.15 -r1.16 src/usr.bin/netstat/fast_ipsec.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/netipsec/xform_ah.c diff -u src/sys/netipsec/xform_ah.c:1.32 src/sys/netipsec/xform_ah.c:1.33 --- src/sys/netipsec/xform_ah.c:1.32 Fri May 6 21:48:46 2011 +++ src/sys/netipsec/xform_ah.c Tue May 24 19:10:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: xform_ah.c,v 1.32 2011/05/06 21:48:46 drochner Exp $ */ +/* $NetBSD: xform_ah.c,v 1.33 2011/05/24 19:10:08 drochner Exp $ */ /* $FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */ /* $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */ /* @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.32 2011/05/06 21:48:46 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.33 2011/05/24 19:10:08 drochner Exp $"); #include "opt_inet.h" #ifdef __FreeBSD__ @@ -147,6 +147,8 @@ return &auth_hash_hmac_sha2_384; case SADB_X_AALG_SHA2_512: return &auth_hash_hmac_sha2_512; + case SADB_X_AALG_AES_XCBC_MAC: + return &auth_hash_aes_xcbc_mac_96; } return NULL; } Index: src/sys/opencrypto/cryptodev.c diff -u src/sys/opencrypto/cryptodev.c:1.62 src/sys/opencrypto/cryptodev.c:1.63 --- src/sys/opencrypto/cryptodev.c:1.62 Mon May 23 15:37:36 2011 +++ src/sys/opencrypto/cryptodev.c Tue May 24 19:10:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptodev.c,v 1.62 2011/05/23 15:37:36 drochner Exp $ */ +/* $NetBSD: cryptodev.c,v 1.63 2011/05/24 19:10:09 drochner Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $ */ /* $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $ */ @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.62 2011/05/23 15:37:36 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.63 2011/05/24 19:10:09 drochner Exp $"); #include #include @@ -1595,6 +1595,9 @@ case CRYPTO_SHA1: thash = &auth_hash_sha1; break; + case CRYPTO_AES_XCBC_MAC_96: + thash = &auth_hash_aes_xcbc_mac_96; + break; case CRYPTO_NULL_HMAC: thash = &auth_hash_null; break; Index: src/sys/opencrypto/cryptodev.h diff -u src/sys/opencrypto/cryptodev.h:1.22 src/sys/opencrypto/cryptodev.h:1.23 --- src/sys/opencrypto/cryptodev.h:1.22 Mon May 23 13:51:10 2011 +++ src/sys/opencrypto/cryptodev.h Tue May 24 19:10:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptodev.h,v 1.22 2011/05/23 13:51:10 drochner Exp $ */ +/* $NetBSD: cryptodev.h,v 1.23 2011/05/24 19:10:09 drochner Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptodev.h,v 1.2.2.6 2003/07/02 17:04:50 sam Exp $ */ /* $OpenBSD: cryptodev.h,v 1.33 2002/07/17 23:52:39 art Exp $ */ @@ -139,7 +139,8 @@ #define CRYPTO_SHA2_512_HMAC 25 #define CRYPTO_CAMELLIA_CBC 26 #define CRYPTO_AES_CTR 27 -#define CRYPTO_ALGORITHM_MAX 27 /* Keep updated - see below */ +#define CRYPTO_AES_XCBC_MAC_96 28 +#define CRYPTO_ALGORITHM_MAX 28 /* Keep updated - see below */ /* Algorithm flags */ #define CRYPTO_ALG_FLAG_SUPPORTED 0x01 /* Algorithm is supported */ Index: src/sys/opencrypto/files.opencrypto diff -u src/sys/opencrypto/files.opencrypto:1.22 src/sys/opencrypto/files.opencrypto:1.23 --- src/sys/opencrypto/files.opencrypto:1.22 Thu May 5 17:44:39 2011 +++ src/sys/opencrypto/files.opencrypto Tue May 24 19:10:11 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.opencrypto,v 1.22 2011/05/05 17:44:39 drochner Exp $ +# $NetBSD: files.opencrypto,v 1.23 2011/05/24 19:10:11 drochner Exp $ # # @@ -18,6 +18,7 @@ blowfish, des, cast128, rijndael, skipjack, camellia file opencrypto/cryptosoft.c swcrypto file opencrypto/d
CVS commit: src/sys
Module Name:src Committed By: drochner Date: Tue May 24 18:59:23 UTC 2011 Modified Files: src/sys/arch/x86/x86: via_padlock.c src/sys/opencrypto: cryptosoft.c cryptosoft_xform.c xform.c xform.h Log Message: move the "context size" struct member (which is a pure software implementation thing) from the abstract xform descriptor to the cryptosoft implementation part -- for sanity, and now clients of opencrypto don't depend on headers of cipher implementations anymore To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/x86/x86/via_padlock.c cvs rdiff -u -r1.34 -r1.35 src/sys/opencrypto/cryptosoft.c cvs rdiff -u -r1.20 -r1.21 src/sys/opencrypto/cryptosoft_xform.c cvs rdiff -u -r1.25 -r1.26 src/sys/opencrypto/xform.c cvs rdiff -u -r1.16 -r1.17 src/sys/opencrypto/xform.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/x86/x86/via_padlock.c diff -u src/sys/arch/x86/x86/via_padlock.c:1.14 src/sys/arch/x86/x86/via_padlock.c:1.15 --- src/sys/arch/x86/x86/via_padlock.c:1.14 Sat Feb 19 13:52:28 2011 +++ src/sys/arch/x86/x86/via_padlock.c Tue May 24 18:59:21 2011 @@ -1,5 +1,5 @@ /* $OpenBSD: via.c,v 1.8 2006/11/17 07:47:56 tom Exp $ */ -/* $NetBSD: via_padlock.c,v 1.14 2011/02/19 13:52:28 jmcneill Exp $ */ +/* $NetBSD: via_padlock.c,v 1.15 2011/05/24 18:59:21 drochner Exp $ */ /*- * Copyright (c) 2003 Jason Wright @@ -20,7 +20,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.14 2011/02/19 13:52:28 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.15 2011/05/24 18:59:21 drochner Exp $"); #ifdef _KERNEL_OPT # include "rnd.h" @@ -313,14 +313,14 @@ } ses->swd = swd; - swd->sw_ictx = malloc(axf->auth_hash->ctxsize, + swd->sw_ictx = malloc(axf->ctxsize, M_CRYPTO_DATA, M_NOWAIT); if (swd->sw_ictx == NULL) { via_padlock_crypto_freesession(sc, sesn); return (ENOMEM); } - swd->sw_octx = malloc(axf->auth_hash->ctxsize, + swd->sw_octx = malloc(axf->ctxsize, M_CRYPTO_DATA, M_NOWAIT); if (swd->sw_octx == NULL) { via_padlock_crypto_freesession(sc, sesn); @@ -365,7 +365,7 @@ { struct via_padlock_softc *sc = arg; struct swcr_data *swd; - const struct auth_hash *axf; + const struct swcr_auth_hash *axf; int sesn; uint32_t sid = ((uint32_t)tid) & 0x; @@ -379,7 +379,7 @@ if (sc->sc_sessions[sesn].swd) { swd = sc->sc_sessions[sesn].swd; - axf = swd->sw_axf->auth_hash; + axf = swd->sw_axf; if (swd->sw_ictx) { memset(swd->sw_ictx, 0, axf->ctxsize); Index: src/sys/opencrypto/cryptosoft.c diff -u src/sys/opencrypto/cryptosoft.c:1.34 src/sys/opencrypto/cryptosoft.c:1.35 --- src/sys/opencrypto/cryptosoft.c:1.34 Tue May 24 18:52:51 2011 +++ src/sys/opencrypto/cryptosoft.c Tue May 24 18:59:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptosoft.c,v 1.34 2011/05/24 18:52:51 drochner Exp $ */ +/* $NetBSD: cryptosoft.c,v 1.35 2011/05/24 18:59:22 drochner Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $ */ /* $OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $ */ @@ -24,7 +24,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.34 2011/05/24 18:52:51 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.35 2011/05/24 18:59:22 drochner Exp $"); #include #include @@ -479,7 +479,7 @@ axf = sw->sw_axf; - memcpy(&ctx, sw->sw_ictx, axf->auth_hash->ctxsize); + memcpy(&ctx, sw->sw_ictx, axf->ctxsize); switch (outtype) { case CRYPTO_BUF_CONTIG: @@ -519,7 +519,7 @@ return EINVAL; axf->Final(aalg, &ctx); - memcpy(&ctx, sw->sw_octx, axf->auth_hash->ctxsize); + memcpy(&ctx, sw->sw_octx, axf->ctxsize); axf->Update(&ctx, aalg, axf->auth_hash->hashsize); axf->Final(aalg, &ctx); break; @@ -752,14 +752,14 @@ axf = &swcr_auth_hash_hmac_ripemd_160_96; goto authcommon; /* leave this for safety */ authcommon: - (*swd)->sw_ictx = malloc(axf->auth_hash->ctxsize, + (*swd)->sw_ictx = malloc(axf->ctxsize, M_CRYPTO_DATA, M_NOWAIT); if ((*swd)->sw_ictx == NULL) { swcr_freesession(NULL, i); return ENOBUFS; } - (*swd)->sw_octx = malloc(axf->auth_hash->ctxsize, + (*swd)->sw_octx = malloc(axf->ctxsize, M_CRYPTO_DATA, M_NOWAIT); if ((*swd)->sw_octx == NULL) { swcr_freesession(NULL, i); @@ -796,7 +796,7 @@ case CRYPTO_SHA1_KPDK: axf = &swcr_auth_hash_key_sha1; auth2common: - (*swd)->sw_ictx = malloc(axf->auth_hash->ctxsize, + (*swd)->sw_ictx = malloc(axf->ctxsize, M_CRYPTO_DATA, M_NOWAIT); if ((*swd)->sw_ictx == NULL) { swcr_freesession(NULL, i); @@ -827,7 +827,7 @@ case CRYPTO_SHA1: axf = &swcr_auth_hash_sha1; auth3common: - (*swd)->sw_ictx = malloc(axf->auth_hash->ctxsize, + (*swd)->sw_ictx = malloc(axf->ctxsize, M_CRYPTO_DATA, M_NOWAIT); if ((*swd)-
CVS commit: src/sys/opencrypto
Module Name:src Committed By: drochner Date: Tue May 24 18:52:52 UTC 2011 Modified Files: src/sys/opencrypto: cryptosoft.c cryptosoft_xform.c Log Message: Change the way the IV is generated for AES-CTR: use a simple counter instead of arc4random(). AES-CTR is sensitive against IV recurrence (with the same key / nonce), and a random number doesn't give that guarantee. This needs a little API change in cryptosoft -- I've suggested it to Open/FreeBSD, might change it depending on feedback. Thanks to Steven Bellovin for hints. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/opencrypto/cryptosoft.c cvs rdiff -u -r1.19 -r1.20 src/sys/opencrypto/cryptosoft_xform.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/opencrypto/cryptosoft.c diff -u src/sys/opencrypto/cryptosoft.c:1.33 src/sys/opencrypto/cryptosoft.c:1.34 --- src/sys/opencrypto/cryptosoft.c:1.33 Mon May 23 13:51:10 2011 +++ src/sys/opencrypto/cryptosoft.c Tue May 24 18:52:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptosoft.c,v 1.33 2011/05/23 13:51:10 drochner Exp $ */ +/* $NetBSD: cryptosoft.c,v 1.34 2011/05/24 18:52:51 drochner Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $ */ /* $OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $ */ @@ -24,7 +24,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.33 2011/05/23 13:51:10 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.34 2011/05/24 18:52:51 drochner Exp $"); #include #include @@ -92,9 +92,13 @@ /* Initialize the IV */ if (crd->crd_flags & CRD_F_ENCRYPT) { /* IV explicitly provided ? */ - if (crd->crd_flags & CRD_F_IV_EXPLICIT) + if (crd->crd_flags & CRD_F_IV_EXPLICIT) { memcpy(iv, crd->crd_iv, ivlen); - else { + if (exf->reinit) +exf->reinit(sw->sw_kschedule, iv, 0); + } else if (exf->reinit) { + exf->reinit(sw->sw_kschedule, 0, iv); + } else { /* Get random IV */ for (i = 0; i + sizeof (u_int32_t) <= EALG_MAX_BLOCK_LEN; @@ -129,13 +133,12 @@ /* Get IV off buf */ COPYDATA(outtype, buf, crd->crd_inject, ivlen, iv); } + if (exf->reinit) + exf->reinit(sw->sw_kschedule, iv, 0); } ivp = iv; - if (exf->reinit) - exf->reinit(sw->sw_kschedule, iv); - if (outtype == CRYPTO_BUF_CONTIG) { if (exf->reinit) { for (i = crd->crd_skip; Index: src/sys/opencrypto/cryptosoft_xform.c diff -u src/sys/opencrypto/cryptosoft_xform.c:1.19 src/sys/opencrypto/cryptosoft_xform.c:1.20 --- src/sys/opencrypto/cryptosoft_xform.c:1.19 Mon May 23 15:37:36 2011 +++ src/sys/opencrypto/cryptosoft_xform.c Tue May 24 18:52:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptosoft_xform.c,v 1.19 2011/05/23 15:37:36 drochner Exp $ */ +/* $NetBSD: cryptosoft_xform.c,v 1.20 2011/05/24 18:52:51 drochner Exp $ */ /* $FreeBSD: src/sys/opencrypto/xform.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $ */ /* $OpenBSD: xform.c,v 1.19 2002/08/16 22:47:25 dhartmei Exp $ */ @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.19 2011/05/23 15:37:36 drochner Exp $"); +__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.20 2011/05/24 18:52:51 drochner Exp $"); #include #include @@ -68,7 +68,7 @@ void (*decrypt)(void *, uint8_t *); int (*setkey)(uint8_t **, const uint8_t *, int); void (*zerokey)(uint8_t **); - void (*reinit)(void *, const uint8_t *); + void (*reinit)(void *, const uint8_t *, uint8_t *); }; struct swcr_comp_algo { @@ -113,7 +113,7 @@ static void rijndael128_zerokey(u_int8_t **); static void cml_zerokey(u_int8_t **); static void aes_ctr_zerokey(u_int8_t **); -static void aes_ctr_reinit(void *, const u_int8_t *); +static void aes_ctr_reinit(void *, const u_int8_t *, u_int8_t *); static void null_init(void *); static int null_update(void *, const u_int8_t *, u_int16_t); @@ -638,6 +638,9 @@ u_int32_t ac_ek[4*(RIJNDAEL_MAXNR + 1)]; u_int8_t ac_block[AESCTR_BLOCKSIZE]; int ac_nr; + struct { + u_int64_t lastiv; + } ivgenctx; }; static void @@ -678,6 +681,8 @@ return EINVAL; } memcpy(ctx->ac_block, key + len - AESCTR_NONCESIZE, AESCTR_NONCESIZE); + /* random start value for simple counter */ + arc4randbytes(&ctx->ivgenctx.lastiv, sizeof(ctx->ivgenctx.lastiv)); *sched = (void *)ctx; return 0; } @@ -692,10 +697,16 @@ } void -aes_ctr_reinit(void *key, const u_int8_t *iv) +aes_ctr_reinit(void *key, const u_int8_t *iv, u_int8_t *ivout) { struct aes_ctr_ctx *ctx = key; + if (!iv) { + ctx->ivgenctx.lastiv++; + iv = (const u_int8_t *)&ctx->ivgenctx.lastiv; + } + if (ivout) + memcpy(ivout, iv, AESCTR_IVSIZE); memcpy(ctx->ac_block + AESCTR_NONCESIZE, iv, AESCTR_IVSIZE); /* reset counter */ memset(ctx->ac_block + AESCTR_NONCESIZE + AESCTR_IVSIZE, 0, 4);
CVS commit: src/sys/netinet
Module Name:src Committed By: gdt Date: Tue May 24 18:37:53 UTC 2011 Modified Files: src/sys/netinet: tcp_timer.h Log Message: Note units and current value for TCP_DELACK_TICKS. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/netinet/tcp_timer.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/netinet/tcp_timer.h diff -u src/sys/netinet/tcp_timer.h:1.27 src/sys/netinet/tcp_timer.h:1.28 --- src/sys/netinet/tcp_timer.h:1.27 Wed Apr 20 13:35:52 2011 +++ src/sys/netinet/tcp_timer.h Tue May 24 18:37:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_timer.h,v 1.27 2011/04/20 13:35:52 gdt Exp $ */ +/* $NetBSD: tcp_timer.h,v 1.28 2011/05/24 18:37:52 gdt Exp $ */ /*- * Copyright (c) 2001, 2005 The NetBSD Foundation, Inc. @@ -136,6 +136,7 @@ #define TCP_MAXRXTSHIFT 12 /* maximum retransmits */ +/* Acks are delayed for 1 second; constant is in fast ticks. */ #define TCP_DELACK_TICKS (hz / PR_FASTHZ) /* time to delay ACK */ #ifdef TCPTIMERS
CVS commit: src/sys/compat/sys
Module Name:src Committed By: joerg Date: Tue May 24 18:29:23 UTC 2011 Modified Files: src/sys/compat/sys: ipc.h Log Message: Give the body the same static inline treatment as the definition To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/compat/sys/ipc.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/compat/sys/ipc.h diff -u src/sys/compat/sys/ipc.h:1.3 src/sys/compat/sys/ipc.h:1.4 --- src/sys/compat/sys/ipc.h:1.3 Mon Jan 19 19:39:41 2009 +++ src/sys/compat/sys/ipc.h Tue May 24 18:29:23 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ipc.h,v 1.3 2009/01/19 19:39:41 christos Exp $ */ +/* $NetBSD: ipc.h,v 1.4 2011/05/24 18:29:23 joerg Exp $ */ /* * Copyright (c) 1990, 1993 @@ -77,7 +77,7 @@ #undef CVT } -void +static inline void __native_to_ipc_perm14(const struct ipc_perm *perm, struct ipc_perm14 *operm) {
CVS commit: src/sys/dev/pci
Module Name:src Committed By: joerg Date: Tue May 24 18:28:01 UTC 2011 Modified Files: src/sys/dev/pci: twa.c twe.c Log Message: Explicitly get rid of constness. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/pci/twa.c cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pci/twe.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/pci/twa.c diff -u src/sys/dev/pci/twa.c:1.36 src/sys/dev/pci/twa.c:1.37 --- src/sys/dev/pci/twa.c:1.36 Mon Nov 22 23:02:16 2010 +++ src/sys/dev/pci/twa.c Tue May 24 18:28:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: twa.c,v 1.36 2010/11/22 23:02:16 dholland Exp $ */ +/* $NetBSD: twa.c,v 1.37 2011/05/24 18:28:01 joerg Exp $ */ /* $wasabi: twa.c,v 1.27 2006/07/28 18:17:21 wrstuden Exp $ */ /*- @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.36 2010/11/22 23:02:16 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.37 2011/05/24 18:28:01 joerg Exp $"); #include #include @@ -1615,7 +1615,7 @@ if ((i = sysctl_createv(NULL, 0, NULL, NULL, 0, CTLTYPE_STRING, "driver_version", SYSCTL_DESCR("twa driver version"), -NULL, 0, &twaver, 0, +NULL, 0, __UNCONST(&twaver), 0, CTL_HW, node->sysctl_num, CTL_CREATE, CTL_EOL)) != 0) { aprint_error_dev(&sc->twa_dv, "could not create %s.%s.driver_version sysctl\n", Index: src/sys/dev/pci/twe.c diff -u src/sys/dev/pci/twe.c:1.93 src/sys/dev/pci/twe.c:1.94 --- src/sys/dev/pci/twe.c:1.93 Sun Nov 14 05:31:59 2010 +++ src/sys/dev/pci/twe.c Tue May 24 18:28:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: twe.c,v 1.93 2010/11/14 05:31:59 uebayasi Exp $ */ +/* $NetBSD: twe.c,v 1.94 2011/05/24 18:28:01 joerg Exp $ */ /*- * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.93 2010/11/14 05:31:59 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.94 2011/05/24 18:28:01 joerg Exp $"); #include #include @@ -476,7 +476,7 @@ if ((i = sysctl_createv(NULL, 0, NULL, NULL, 0, CTLTYPE_STRING, "driver_version", SYSCTL_DESCR("twe0 driver version"), -NULL, 0, &twever, 0, +NULL, 0, __UNCONST(&twever), 0, CTL_HW, node->sysctl_num, CTL_CREATE, CTL_EOL)) != 0) { aprint_error_dev(&sc->sc_dv, "could not create %s.%s.driver_version sysctl\n",
CVS commit: src/sys/external/bsd/drm/dist/shared-core
Module Name:src Committed By: joerg Date: Tue May 24 18:22:02 UTC 2011 Modified Files: src/sys/external/bsd/drm/dist/shared-core: mga_drv.h Log Message: Use some format specifiers that actually exist To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm/dist/shared-core/mga_drv.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/external/bsd/drm/dist/shared-core/mga_drv.h diff -u src/sys/external/bsd/drm/dist/shared-core/mga_drv.h:1.2 src/sys/external/bsd/drm/dist/shared-core/mga_drv.h:1.3 --- src/sys/external/bsd/drm/dist/shared-core/mga_drv.h:1.2 Thu Feb 24 07:59:44 2011 +++ src/sys/external/bsd/drm/dist/shared-core/mga_drv.h Tue May 24 18:22:02 2011 @@ -285,7 +285,7 @@ do { \ if ( MGA_VERBOSE ) { \ DRM_INFO( "BEGIN_DMA( %d )\n", (n) ); \ - DRM_INFO( " space=0x%x req=0x%Zx\n", \ + DRM_INFO( " space=0x%x req=0x%lx\n", \ dev_priv->prim.space, (n) * DMA_BLOCK_SIZE ); \ }\ prim = dev_priv->prim.start; \ @@ -335,7 +335,7 @@ #define DMA_WRITE( offset, val ) \ do { \ if ( MGA_VERBOSE ) { \ - DRM_INFO( " DMA_WRITE( 0x%08x ) at 0x%04Zx\n", \ + DRM_INFO( " DMA_WRITE( 0x%08x ) at 0x%04lx\n", \ (u32)(val), write + (offset) * sizeof(u32) ); \ }\ *(volatile u32 *)(prim + write + (offset) * sizeof(u32)) = val; \
CVS commit: src/sys/kern
Module Name:src Committed By: joerg Date: Tue May 24 18:18:22 UTC 2011 Modified Files: src/sys/kern: kern_kthread.c Log Message: Use a real panic as safe guard To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/kern/kern_kthread.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_kthread.c diff -u src/sys/kern/kern_kthread.c:1.33 src/sys/kern/kern_kthread.c:1.34 --- src/sys/kern/kern_kthread.c:1.33 Thu May 19 03:07:29 2011 +++ src/sys/kern/kern_kthread.c Tue May 24 18:18:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_kthread.c,v 1.33 2011/05/19 03:07:29 rmind Exp $ */ +/* $NetBSD: kern_kthread.c,v 1.34 2011/05/24 18:18:22 joerg Exp $ */ /*- * Copyright (c) 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_kthread.c,v 1.33 2011/05/19 03:07:29 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_kthread.c,v 1.34 2011/05/24 18:18:22 joerg Exp $"); #include #include @@ -183,7 +183,7 @@ /* And exit.. */ lwp_exit(l); - KASSERT(false); + panic("kthread_exit"); } /*
CVS commit: src/sys/dev/pci
Module Name:src Committed By: joerg Date: Tue May 24 18:17:25 UTC 2011 Modified Files: src/sys/dev/pci: isp_pci.c Log Message: Use proper format string To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/dev/pci/isp_pci.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/pci/isp_pci.c diff -u src/sys/dev/pci/isp_pci.c:1.114 src/sys/dev/pci/isp_pci.c:1.115 --- src/sys/dev/pci/isp_pci.c:1.114 Mon Feb 28 17:17:55 2011 +++ src/sys/dev/pci/isp_pci.c Tue May 24 18:17:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: isp_pci.c,v 1.114 2011/02/28 17:17:55 mjacob Exp $ */ +/* $NetBSD: isp_pci.c,v 1.115 2011/05/24 18:17:24 joerg Exp $ */ /* * Copyright (C) 1997, 1998, 1999 National Aeronautics & Space Administration * All rights reserved. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: isp_pci.c,v 1.114 2011/02/28 17:17:55 mjacob Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isp_pci.c,v 1.115 2011/05/24 18:17:24 joerg Exp $"); #include #include @@ -719,7 +719,7 @@ if (isp->isp_dblev & ISP_LOGCONFIG) { printf("\n"); } else { - printf(dstring); + printf("%s", dstring); } isp->isp_dmatag = pa->pa_dmat;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: joerg Date: Tue May 24 18:11:34 UTC 2011 Modified Files: src/sys/dev/usb: hid.c Log Message: Kill self-assignment To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/dev/usb/hid.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/hid.c diff -u src/sys/dev/usb/hid.c:1.31 src/sys/dev/usb/hid.c:1.32 --- src/sys/dev/usb/hid.c:1.31 Wed Nov 3 22:34:23 2010 +++ src/sys/dev/usb/hid.c Tue May 24 18:11:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hid.c,v 1.31 2010/11/03 22:34:23 dyoung Exp $ */ +/* $NetBSD: hid.c,v 1.32 2011/05/24 18:11:34 joerg Exp $ */ /* $FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hid.c,v 1.31 2010/11/03 22:34:23 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hid.c,v 1.32 2011/05/24 18:11:34 joerg Exp $"); #include #include @@ -178,7 +178,6 @@ case 2: dval = *data++; dval |= *data++ << 8; - dval = /*(int16_t)*/ dval; break; case 4: dval = *data++;
CVS commit: src
Module Name:src Committed By: spz Date: Tue May 24 18:07:12 UTC 2011 Modified Files: src/sys/netinet: icmp6.h src/sys/netinet6: in6.h in6_proto.c ip6_input.c ip6_var.h nd6.h nd6_rtr.c src/sys/sys: param.h src/usr.bin/netstat: inet6.c Log Message: RA flood mitigation via a limit on accepted routes: - introduce a limit for the routes accepted via IPv6 Router Advertisement: a common 2 interface client will have 6, the default limit is 100 and can be adjusted via sysctl - report the current number of routes installed via RA via sysctl - count discarded route additions. Note that one RA message is two routes. This is at present only across all interfaces even though per-interface would be more useful, since the per-interface structure complies to RFC2466 - bump kernel version due to the previous change - adjust netstat to use the new value (with netstat -p icmp6) To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/netinet/icmp6.h cvs rdiff -u -r1.68 -r1.69 src/sys/netinet6/in6.h cvs rdiff -u -r1.91 -r1.92 src/sys/netinet6/in6_proto.c cvs rdiff -u -r1.130 -r1.131 src/sys/netinet6/ip6_input.c cvs rdiff -u -r1.54 -r1.55 src/sys/netinet6/ip6_var.h cvs rdiff -u -r1.53 -r1.54 src/sys/netinet6/nd6.h cvs rdiff -u -r1.80 -r1.81 src/sys/netinet6/nd6_rtr.c cvs rdiff -u -r1.388 -r1.389 src/sys/sys/param.h cvs rdiff -u -r1.58 -r1.59 src/usr.bin/netstat/inet6.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/netinet/icmp6.h diff -u src/sys/netinet/icmp6.h:1.41 src/sys/netinet/icmp6.h:1.42 --- src/sys/netinet/icmp6.h:1.41 Sun May 8 18:42:53 2011 +++ src/sys/netinet/icmp6.h Tue May 24 18:07:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: icmp6.h,v 1.41 2011/05/08 18:42:53 spz Exp $ */ +/* $NetBSD: icmp6.h,v 1.42 2011/05/24 18:07:11 spz Exp $ */ /* $KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $ */ @@ -569,8 +569,9 @@ #define ICMP6_STAT_BADRS 538 /* bad router solicitiation */ #define ICMP6_STAT_BADRA 539 /* bad router advertisement */ #define ICMP6_STAT_BADREDIRECT 540 /* bad redirect message */ +#define ICMP6_STAT_DROPPED_RAROUTE 541 /* discarded routes from router advertisement */ -#define ICMP6_NSTATS 541 +#define ICMP6_NSTATS 542 #define ICMP6_ERRSTAT_DST_UNREACH_NOROUTE 0 #define ICMP6_ERRSTAT_DST_UNREACH_ADMIN 1 Index: src/sys/netinet6/in6.h diff -u src/sys/netinet6/in6.h:1.68 src/sys/netinet6/in6.h:1.69 --- src/sys/netinet6/in6.h:1.68 Fri Sep 11 22:06:29 2009 +++ src/sys/netinet6/in6.h Tue May 24 18:07:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.h,v 1.68 2009/09/11 22:06:29 dyoung Exp $ */ +/* $NetBSD: in6.h,v 1.69 2011/05/24 18:07:11 spz Exp $ */ /* $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $ */ /* @@ -575,9 +575,13 @@ /* 40: reserved */ #define IPV6CTL_MAXFRAGS 41 /* max fragments */ #define IPV6CTL_IFQ 42 /* ip6intrq node */ +#define IPV6CTL_RTADV_MAXROUTES 43 /* maximum number of routes */ + /* via router advertisement */ +#define IPV6CTL_RTADV_NUMROUTES 44 /* current number of routes */ + /* via router advertisement */ /* New entries should be added here from current IPV6CTL_MAXID value. */ /* to define items, should talk with KAME guys first, for *BSD compatibility */ -#define IPV6CTL_MAXID 43 +#define IPV6CTL_MAXID 45 #define IPV6CTL_NAMES { \ { 0, 0 }, \ @@ -623,6 +627,8 @@ { 0, 0 }, \ { "maxfrags", CTLTYPE_INT }, \ { "ifq", CTLTYPE_NODE }, \ + { "rtadv_maxroutes", CTLTYPE_INT }, \ + { "rtadv_numroutes", CTLTYPE_INT }, \ } #endif /* _NETBSD_SOURCE */ Index: src/sys/netinet6/in6_proto.c diff -u src/sys/netinet6/in6_proto.c:1.91 src/sys/netinet6/in6_proto.c:1.92 --- src/sys/netinet6/in6_proto.c:1.91 Tue May 3 17:44:30 2011 +++ src/sys/netinet6/in6_proto.c Tue May 24 18:07:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_proto.c,v 1.91 2011/05/03 17:44:30 dyoung Exp $ */ +/* $NetBSD: in6_proto.c,v 1.92 2011/05/24 18:07:11 spz Exp $ */ /* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.91 2011/05/03 17:44:30 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.92 2011/05/24 18:07:11 spz Exp $"); #include "opt_gateway.h" #include "opt_inet.h" @@ -482,6 +482,13 @@ int ip6_keepfaith = 0; time_t ip6_log_time = (time_t)0L; +int ip6_rtadv_maxroutes = 100; /* (arbitrary) initial maximum number of +* routes via rtadv expected to be +* significantly larger than common use. +* if you need to count: 3 extra initial +* routes, plus 1 per interface after the +* first one, then one per non-linklocal +* prefix */ /* icmp6 */ /* Index: src/sys/netinet6/ip6_input.c di
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: matt Date: Tue May 24 17:45:49 UTC 2011 Modified Files: src/sys/arch/arm/marvell: kirkwood.c Log Message: Merge in the patch in PR/44965 with some improvements (removing ifs when possible). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/marvell/kirkwood.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/marvell/kirkwood.c diff -u src/sys/arch/arm/marvell/kirkwood.c:1.3 src/sys/arch/arm/marvell/kirkwood.c:1.4 --- src/sys/arch/arm/marvell/kirkwood.c:1.3 Sun May 22 21:52:25 2011 +++ src/sys/arch/arm/marvell/kirkwood.c Tue May 24 17:45:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kirkwood.c,v 1.3 2011/05/22 21:52:25 mellon Exp $ */ +/* $NetBSD: kirkwood.c,v 1.4 2011/05/24 17:45:49 matt Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kirkwood.c,v 1.3 2011/05/22 21:52:25 mellon Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kirkwood.c,v 1.4 2011/05/24 17:45:49 matt Exp $"); #define _INTR_PRIVATE @@ -49,12 +49,8 @@ static void kirkwood_intr_init(void); -static void kirkwood_pic_unblock_low_irqs(struct pic_softc *, size_t, uint32_t); -static void kirkwood_pic_unblock_high_irqs(struct pic_softc *, size_t, - uint32_t); -static void kirkwood_pic_block_low_irqs(struct pic_softc *, size_t, uint32_t); -static void kirkwood_pic_block_high_irqs(struct pic_softc *, size_t, uint32_t); -static int kirkwood_pic_find_pending_high_irqs(struct pic_softc *); +static void kirkwood_pic_unblock_irqs(struct pic_softc *, size_t, uint32_t); +static void kirkwood_pic_block_irqs(struct pic_softc *, size_t, uint32_t); static void kirkwood_pic_establish_irq(struct pic_softc *, struct intrsource *); static void kirkwood_pic_source_name(struct pic_softc *, int, char *, size_t); @@ -80,28 +76,16 @@ "Reserved(60)","Reserved(61)","Reserved(62)","Reserved(63)" }; -static struct pic_ops kirkwood_picops_low = { - .pic_unblock_irqs = kirkwood_pic_unblock_low_irqs, - .pic_block_irqs = kirkwood_pic_block_low_irqs, +static struct pic_ops kirkwood_picops = { + .pic_unblock_irqs = kirkwood_pic_unblock_irqs, + .pic_block_irqs = kirkwood_pic_block_irqs, .pic_establish_irq = kirkwood_pic_establish_irq, .pic_source_name = kirkwood_pic_source_name, }; -static struct pic_ops kirkwood_picops_high = { - .pic_unblock_irqs = kirkwood_pic_unblock_high_irqs, - .pic_block_irqs = kirkwood_pic_block_high_irqs, - .pic_find_pending_irqs = kirkwood_pic_find_pending_high_irqs, - .pic_establish_irq = kirkwood_pic_establish_irq, - .pic_source_name = kirkwood_pic_source_name, -}; -static struct pic_softc kirkwood_pic_low = { - .pic_ops = &kirkwood_picops_low, - .pic_maxsources = 32, - .pic_name = "kirkwood_low", -}; -static struct pic_softc kirkwood_pic_high = { - .pic_ops = &kirkwood_picops_high, - .pic_maxsources = 32, - .pic_name = "kirkwood_high", +static struct pic_softc kirkwood_pic = { + .pic_ops = &kirkwood_picops, + .pic_maxsources = 64, + .pic_name = "kirkwood", }; @@ -141,12 +125,7 @@ extern struct pic_softc mvsoc_bridge_pic; void *ih; - pic_add(&kirkwood_pic_low, 0); - - pic_add(&kirkwood_pic_high, 32); - ih = intr_establish(KIRKWOOD_IRQ_HIGH, IPL_HIGH, IST_LEVEL_HIGH, - pic_handle_intr, &kirkwood_pic_high); - KASSERT(ih != NULL); + pic_add(&kirkwood_pic, 0); pic_add(&mvsoc_bridge_pic, 64); ih = intr_establish(KIRKWOOD_IRQ_BRIDGE, IPL_HIGH, IST_LEVEL_HIGH, @@ -158,55 +137,26 @@ /* ARGSUSED */ static void -kirkwood_pic_unblock_low_irqs(struct pic_softc *pic, size_t irqbase, - uint32_t irq_mask) +kirkwood_pic_unblock_irqs(struct pic_softc *pic, size_t irqbase, + uint32_t irq_mask) { + const size_t reg = KIRKWOOD_MLMB_MIRQIMLR + + irqbase * (KIRKWOOD_MLMB_MIRQIMHR - KIRKWOOD_MLMB_MIRQIMLR) / 32; - write_mlmbreg(KIRKWOOD_MLMB_MIRQIMLR, - read_mlmbreg(KIRKWOOD_MLMB_MIRQIMLR) | irq_mask); + KASSERT(irqbase < 64); + write_mlmbreg(reg, read_mlmbreg(reg) | irq_mask); } /* ARGSUSED */ static void -kirkwood_pic_unblock_high_irqs(struct pic_softc *pic, size_t irqbase, - uint32_t irq_mask) +kirkwood_pic_block_irqs(struct pic_softc *pic, size_t irqbase, + uint32_t irq_mask) { + const size_t reg = KIRKWOOD_MLMB_MIRQIMLR + + irqbase * (KIRKWOOD_MLMB_MIRQIMHR - KIRKWOOD_MLMB_MIRQIMLR) / 32; - write_mlmbreg(KIRKWOOD_MLMB_MIRQIMHR, - read_mlmbreg(KIRKWOOD_MLMB_MIRQIMHR) | irq_mask); -} - -/* ARGSUSED */ -static void -kirkwood_pic_block_low_irqs(struct pic_softc *pic, size_t irqbase, - uint32_t irq_mask) -{ - - write_mlmbreg(KIRKWOOD_MLMB_MIRQIMLR, - read_mlmbreg(KIRKWOOD_MLMB_MIRQIMLR) & ~irq_mask); -} - -/* ARGSUSED */ -static void -kirkwood_pic_block_high_irqs(struct pic_softc *pic, size_t irqbase, - uint32_t irq_mask) -{ - - write_mlmbreg(KIRKWOOD_MLMB_MIRQIMHR, - read_mlmbre
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha
Module Name:xsrc Committed By: jakllsch Date: Tue May 24 17:26:49 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha: alphaKbd.c Log Message: Needs "mi.h". To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaKbd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaKbd.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaKbd.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaKbd.c:1.3 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaKbd.c:1.2 Sun Oct 10 05:35:32 2010 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaKbd.c Tue May 24 17:26:49 2011 @@ -41,6 +41,7 @@ / #define NEED_EVENTS +#include "mi.h" #include "alpha.h" #include "keysym.h" #include
CVS commit: src/sys/net
Module Name:src Committed By: matt Date: Tue May 24 17:16:43 UTC 2011 Modified Files: src/sys/net: if_ethersubr.c Log Message: Add code to auto-deencapsulate 0 tagged VLANs. To generate a diff of this commit: cvs rdiff -u -r1.186 -r1.187 src/sys/net/if_ethersubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.186 src/sys/net/if_ethersubr.c:1.187 --- src/sys/net/if_ethersubr.c:1.186 Mon Apr 25 22:14:45 2011 +++ src/sys/net/if_ethersubr.c Tue May 24 17:16:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.186 2011/04/25 22:14:45 yamt Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.187 2011/05/24 17:16:43 matt Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.186 2011/04/25 22:14:45 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.187 2011/05/24 17:16:43 matt Exp $"); #include "opt_inet.h" #include "opt_atalk.h" @@ -115,9 +115,7 @@ #include #include -#if NVLAN > 0 #include -#endif #if NPPPOE > 0 #include @@ -637,6 +635,7 @@ struct ifqueue *inq; uint16_t etype; struct ether_header *eh; + size_t ehlen; #if defined (ISO) || defined (LLC) || defined(NETATALK) struct llc *l; #endif @@ -651,6 +650,7 @@ #endif eh = mtod(m, struct ether_header *); etype = ntohs(eh->ether_type); + ehlen = sizeof(*eh); /* * Determine if the packet is within its size limits. @@ -748,6 +748,7 @@ eh = mtod(m, struct ether_header *); etype = ntohs(eh->ether_type); + ehlen = sizeof(*eh); } #endif @@ -783,8 +784,23 @@ * (and possibly FCS) intact. */ switch (etype) { + case ETHERTYPE_VLAN: { + struct ether_vlan_header *evl = (void *)eh; + /* + * If there is a tag of 0, then the VLAN header was probably + * just being used to store the priority. Extract the ether + * type, and if IP or IPV6, let them deal with it. + */ + if (m->m_len <= sizeof(*evl) + && EVL_VLANOFTAG(evl->evl_tag) == 0) { + etype = ntohs(evl->evl_proto); + ehlen = sizeof(*evl); + if ((m->m_flags & M_PROMISC) == 0 + && (etype == ETHERTYPE_IP +|| etype == ETHERTYPE_IPV6)) +break; + } #if NVLAN > 0 - case ETHERTYPE_VLAN: /* * vlan_input() will either recursively call ether_input() * or drop the packet. @@ -792,9 +808,10 @@ if (((struct ethercom *)ifp)->ec_nvlans != 0) vlan_input(ifp, m); else +#endif /* NVLAN > 0 */ m_freem(m); return; -#endif /* NVLAN > 0 */ + } #if NPPPOE > 0 case ETHERTYPE_PPPOEDISC: case ETHERTYPE_PPPOE: @@ -872,7 +889,7 @@ if (etype > ETHERMTU + sizeof (struct ether_header)) { /* Strip off the Ethernet header. */ - m_adj(m, sizeof(struct ether_header)); + m_adj(m, ehlen); switch (etype) { #ifdef INET
CVS commit: src/sys/dev/pckbport
Module Name:src Committed By: joerg Date: Tue May 24 16:42:53 UTC 2011 Modified Files: src/sys/dev/pckbport: pms.c Log Message: Use proper format string To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/pckbport/pms.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/pckbport/pms.c diff -u src/sys/dev/pckbport/pms.c:1.30 src/sys/dev/pckbport/pms.c:1.31 --- src/sys/dev/pckbport/pms.c:1.30 Wed Feb 24 22:38:08 2010 +++ src/sys/dev/pckbport/pms.c Tue May 24 16:42:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pms.c,v 1.30 2010/02/24 22:38:08 dyoung Exp $ */ +/* $NetBSD: pms.c,v 1.31 2011/05/24 16:42:53 joerg Exp $ */ /*- * Copyright (c) 2004 Kentaro Kurahone. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.30 2010/02/24 22:38:08 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pms.c,v 1.31 2011/05/24 16:42:53 joerg Exp $"); #include "opt_pms.h" @@ -230,7 +230,7 @@ pckbport_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 0); kthread_create(PRI_NONE, 0, NULL, pms_reset_thread, sc, - &sc->sc_event_thread, device_xname(sc->sc_dev)); + &sc->sc_event_thread, "%s", device_xname(sc->sc_dev)); #ifndef PMS_DISABLE_POWERHOOK sc->sc_suspended = 0;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: joerg Date: Tue May 24 16:42:31 UTC 2011 Modified Files: src/sys/dev/usb: pseye.c Log Message: Use proper format string. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/usb/pseye.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/pseye.c diff -u src/sys/dev/usb/pseye.c:1.20 src/sys/dev/usb/pseye.c:1.21 --- src/sys/dev/usb/pseye.c:1.20 Tue Dec 28 00:49:21 2010 +++ src/sys/dev/usb/pseye.c Tue May 24 16:42:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pseye.c,v 1.20 2010/12/28 00:49:21 jmcneill Exp $ */ +/* $NetBSD: pseye.c,v 1.21 2011/05/24 16:42:31 joerg Exp $ */ /*- * Copyright (c) 2008 Jared D. McNeill @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pseye.c,v 1.20 2010/12/28 00:49:21 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pseye.c,v 1.21 2011/05/24 16:42:31 joerg Exp $"); #include #include @@ -812,7 +812,7 @@ if (sc->sc_running == 0) { sc->sc_running = 1; err = kthread_create(PRI_PSEYE, 0, NULL, pseye_transfer_thread, - opaque, NULL, device_xname(sc->sc_dev)); + opaque, NULL, "%s", device_xname(sc->sc_dev)); } else aprint_error_dev(sc->sc_dev, "transfer already in progress\n"); mutex_exit(&sc->sc_mtx);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: joerg Date: Tue May 24 16:42:10 UTC 2011 Modified Files: src/sys/dev/pci: siside.c Log Message: Properly use format string To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/siside.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/pci/siside.c diff -u src/sys/dev/pci/siside.c:1.27 src/sys/dev/pci/siside.c:1.28 --- src/sys/dev/pci/siside.c:1.27 Mon Apr 4 20:37:56 2011 +++ src/sys/dev/pci/siside.c Tue May 24 16:42:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: siside.c,v 1.27 2011/04/04 20:37:56 dyoung Exp $ */ +/* $NetBSD: siside.c,v 1.28 2011/05/24 16:42:10 joerg Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: siside.c,v 1.27 2011/04/04 20:37:56 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siside.c,v 1.28 2011/05/24 16:42:10 joerg Exp $"); #include #include @@ -262,7 +262,7 @@ sc->sc_wdcdev.sc_atac.atac_udma_cap = sis_hostbr_type_match->udma_mode; } - aprint_normal(sis_hostbr_type_match->name); + aprint_normal("%s", sis_hostbr_type_match->name); } else { aprint_normal("5597/5598"); if (rev >= 0xd0) {
CVS commit: src/sys/kern
Module Name:src Committed By: joerg Date: Tue May 24 16:41:23 UTC 2011 Modified Files: src/sys/kern: subr_userconf.c Log Message: Use proper format string To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/kern/subr_userconf.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/subr_userconf.c diff -u src/sys/kern/subr_userconf.c:1.21 src/sys/kern/subr_userconf.c:1.22 --- src/sys/kern/subr_userconf.c:1.21 Sun Apr 24 18:46:23 2011 +++ src/sys/kern/subr_userconf.c Tue May 24 16:41:23 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_userconf.c,v 1.21 2011/04/24 18:46:23 rmind Exp $ */ +/* $NetBSD: subr_userconf.c,v 1.22 2011/05/24 16:41:23 joerg Exp $ */ /* * Copyright (c) 1996 Mats O Jansson @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_userconf.c,v 1.21 2011/04/24 18:46:23 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_userconf.c,v 1.22 2011/05/24 16:41:23 joerg Exp $"); #include "opt_userconf.h" @@ -510,7 +510,7 @@ printf("command argsdescription\n"); while (*userconf_cmds[j] != '\0') { - printf(userconf_cmds[j]); + printf("%s", userconf_cmds[j]); k = strlen(userconf_cmds[j]); while (k < 10) { printf(" ");
CVS commit: src/sys/dev/usb
Module Name:src Committed By: joerg Date: Tue May 24 16:40:21 UTC 2011 Modified Files: src/sys/dev/usb: uvideo.c Log Message: Use proper format string To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/dev/usb/uvideo.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/uvideo.c diff -u src/sys/dev/usb/uvideo.c:1.34 src/sys/dev/usb/uvideo.c:1.35 --- src/sys/dev/usb/uvideo.c:1.34 Mon May 16 10:53:19 2011 +++ src/sys/dev/usb/uvideo.c Tue May 24 16:40:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvideo.c,v 1.34 2011/05/16 10:53:19 drochner Exp $ */ +/* $NetBSD: uvideo.c,v 1.35 2011/05/24 16:40:21 joerg Exp $ */ /* * Copyright (c) 2008 Patrick Mahoney @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvideo.c,v 1.34 2011/05/16 10:53:19 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvideo.c,v 1.35 2011/05/24 16:40:21 joerg Exp $"); #ifdef _MODULE #include @@ -1511,7 +1511,7 @@ bx->bx_running = true; ret = kthread_create(PRI_UVIDEO, 0, NULL, uvideo_stream_recv_bulk_transfer, vs, - NULL, device_xname(sc->sc_dev)); + NULL, "%s", device_xname(sc->sc_dev)); if (ret) { DPRINTF(("uvideo: couldn't create kthread:" " %d\n", err));
CVS commit: src/sys/kern
Module Name:src Committed By: joerg Date: Tue May 24 16:39:56 UTC 2011 Modified Files: src/sys/kern: init_sysctl.c Log Message: Add some needed __UNCONST To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/kern/init_sysctl.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/init_sysctl.c diff -u src/sys/kern/init_sysctl.c:1.180 src/sys/kern/init_sysctl.c:1.181 --- src/sys/kern/init_sysctl.c:1.180 Sat Apr 2 05:07:57 2011 +++ src/sys/kern/init_sysctl.c Tue May 24 16:39:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: init_sysctl.c,v 1.180 2011/04/02 05:07:57 rmind Exp $ */ +/* $NetBSD: init_sysctl.c,v 1.181 2011/05/24 16:39:56 joerg Exp $ */ /*- * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.180 2011/04/02 05:07:57 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.181 2011/05/24 16:39:56 joerg Exp $"); #include "opt_sysv.h" #include "opt_compat_netbsd.h" @@ -213,13 +213,13 @@ CTLFLAG_PERMANENT, CTLTYPE_STRING, "ostype", SYSCTL_DESCR("Operating system type"), - NULL, 0, &ostype, 0, + NULL, 0, __UNCONST(&ostype), 0, CTL_KERN, KERN_OSTYPE, CTL_EOL); sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT, CTLTYPE_STRING, "osrelease", SYSCTL_DESCR("Operating system release"), - NULL, 0, &osrelease, 0, + NULL, 0, __UNCONST(&osrelease), 0, CTL_KERN, KERN_OSRELEASE, CTL_EOL); sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE, @@ -231,7 +231,7 @@ CTLFLAG_PERMANENT, CTLTYPE_STRING, "version", SYSCTL_DESCR("Kernel version"), - NULL, 0, &version, 0, + NULL, 0, __UNCONST(&version), 0, CTL_KERN, KERN_VERSION, CTL_EOL); sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CVS commit: src/sys/dev/ic
Module Name:src Committed By: joerg Date: Tue May 24 16:38:25 UTC 2011 Modified Files: src/sys/dev/ic: iha.c Log Message: Kill redundant () To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/dev/ic/iha.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/ic/iha.c diff -u src/sys/dev/ic/iha.c:1.41 src/sys/dev/ic/iha.c:1.42 --- src/sys/dev/ic/iha.c:1.41 Sat Nov 13 13:52:01 2010 +++ src/sys/dev/ic/iha.c Tue May 24 16:38:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: iha.c,v 1.41 2010/11/13 13:52:01 uebayasi Exp $ */ +/* $NetBSD: iha.c,v 1.42 2011/05/24 16:38:25 joerg Exp $ */ /*- * Copyright (c) 2001, 2002 Izumi Tsutsui @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: iha.c,v 1.41 2010/11/13 13:52:01 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iha.c,v 1.42 2011/05/24 16:38:25 joerg Exp $"); #include #include @@ -2169,7 +2169,7 @@ uint8_t tag, target, lun, msg, abortmsg; if (sc->sc_actscb != NULL) { - if ((sc->sc_actscb->status == STATUS_SELECT)) + if (sc->sc_actscb->status == STATUS_SELECT) iha_push_pend_scb(sc, sc->sc_actscb); sc->sc_actscb = NULL; }
CVS commit: src/sys/net
Module Name:src Committed By: joerg Date: Tue May 24 16:37:49 UTC 2011 Modified Files: src/sys/net: if_gre.c Log Message: Use proper format string To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/net/if_gre.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_gre.c diff -u src/sys/net/if_gre.c:1.144 src/sys/net/if_gre.c:1.145 --- src/sys/net/if_gre.c:1.144 Sat Jun 26 14:24:28 2010 +++ src/sys/net/if_gre.c Tue May 24 16:37:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_gre.c,v 1.144 2010/06/26 14:24:28 kefren Exp $ */ +/* $NetBSD: if_gre.c,v 1.145 2011/05/24 16:37:49 joerg Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.144 2010/06/26 14:24:28 kefren Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gre.c,v 1.145 2011/05/24 16:37:49 joerg Exp $"); #include "opt_atalk.h" #include "opt_gre.h" @@ -350,7 +350,7 @@ sc->sc_fd = -1; rc = kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, gre_fp_recvloop, sc, - NULL, sc->sc_if.if_xname); + NULL, "%s", sc->sc_if.if_xname); if (rc != 0) return -1;
CVS commit: src/sys/dev/cardbus
Module Name:src Committed By: joerg Date: Tue May 24 16:37:04 UTC 2011 Modified Files: src/sys/dev/cardbus: cardslot.c Log Message: Kill redundant () To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/dev/cardbus/cardslot.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/cardbus/cardslot.c diff -u src/sys/dev/cardbus/cardslot.c:1.52 src/sys/dev/cardbus/cardslot.c:1.53 --- src/sys/dev/cardbus/cardslot.c:1.52 Fri Mar 19 01:44:05 2010 +++ src/sys/dev/cardbus/cardslot.c Tue May 24 16:37:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cardslot.c,v 1.52 2010/03/19 01:44:05 dyoung Exp $ */ +/* $NetBSD: cardslot.c,v 1.53 2011/05/24 16:37:04 joerg Exp $ */ /* * Copyright (c) 1999 and 2000 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.52 2010/03/19 01:44:05 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.53 2011/05/24 16:37:04 joerg Exp $"); #include "opt_cardslot.h" @@ -220,7 +220,7 @@ return 0; } - if ((cf->cf_loc[PCMCIABUSCF_CONTROLLER] == PCMCIABUSCF_CONTROLLER_DEFAULT)) { + if (cf->cf_loc[PCMCIABUSCF_CONTROLLER] == PCMCIABUSCF_CONTROLLER_DEFAULT) { return (config_match(parent, cf, aux)); }
CVS commit: src/sys/dev/scsipi
Module Name:src Committed By: joerg Date: Tue May 24 16:35:26 UTC 2011 Modified Files: src/sys/dev/scsipi: atapi_wdc.c Log Message: Fix obvious condition snafu To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/dev/scsipi/atapi_wdc.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/scsipi/atapi_wdc.c diff -u src/sys/dev/scsipi/atapi_wdc.c:1.111 src/sys/dev/scsipi/atapi_wdc.c:1.112 --- src/sys/dev/scsipi/atapi_wdc.c:1.111 Sun Mar 28 20:46:18 2010 +++ src/sys/dev/scsipi/atapi_wdc.c Tue May 24 16:35:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: atapi_wdc.c,v 1.111 2010/03/28 20:46:18 snj Exp $ */ +/* $NetBSD: atapi_wdc.c,v 1.112 2011/05/24 16:35:26 joerg Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.111 2010/03/28 20:46:18 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.112 2011/05/24 16:35:26 joerg Exp $"); #ifndef ATADEBUG #define ATADEBUG @@ -567,7 +567,7 @@ wdc->select(chp, xfer->c_drive); bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_sdh], 0, WDSD_IBM | (xfer->c_drive << 4)); - switch (wdc_wait_for_unbusy(chp, ATAPI_DELAY, wait_flags) < 0) { + switch (wdc_wait_for_unbusy(chp, ATAPI_DELAY, wait_flags)) { case WDCWAIT_OK: break; case WDCWAIT_TOUT:
CVS commit: src/regress/sys/uvm/mmap
Module Name:src Committed By: joerg Date: Tue May 24 16:11:08 UTC 2011 Modified Files: src/regress/sys/uvm/mmap: mmap.c Log Message: Fix format string To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/regress/sys/uvm/mmap/mmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/sys/uvm/mmap/mmap.c diff -u src/regress/sys/uvm/mmap/mmap.c:1.18 src/regress/sys/uvm/mmap/mmap.c:1.19 --- src/regress/sys/uvm/mmap/mmap.c:1.18 Mon Apr 28 20:23:07 2008 +++ src/regress/sys/uvm/mmap/mmap.c Tue May 24 16:11:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mmap.c,v 1.18 2008/04/28 20:23:07 martin Exp $ */ +/* $NetBSD: mmap.c,v 1.19 2011/05/24 16:11:08 joerg Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -433,7 +433,7 @@ if (vec[i] != 0) resident++; if (verbose) - printf("page 0x%lx is %sresident\n", + printf("page 0x%p is %sresident\n", addr + (i * pgsize), vec[i] ? "" : "not "); }
CVS commit: src/regress/sys/kern/lockf
Module Name:src Committed By: joerg Date: Tue May 24 16:04:14 UTC 2011 Modified Files: src/regress/sys/kern/lockf: lockf.c Log Message: Use proper format string To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/regress/sys/kern/lockf/lockf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/sys/kern/lockf/lockf.c diff -u src/regress/sys/kern/lockf/lockf.c:1.7 src/regress/sys/kern/lockf/lockf.c:1.8 --- src/regress/sys/kern/lockf/lockf.c:1.7 Mon Apr 28 20:23:07 2008 +++ src/regress/sys/kern/lockf/lockf.c Tue May 24 16:04:14 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: lockf.c,v 1.7 2008/04/28 20:23:07 martin Exp $ */ +/* $NetBSD: lockf.c,v 1.8 2011/05/24 16:04:14 joerg Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -69,7 +69,7 @@ fd = open (lockfile, O_RDWR, 0); if (fd < 0) - err(1, lockfile); + err(1, "%s", lockfile); printf("%d: start\n", id);
CVS commit: src/external/bsd/openldap/dist/libraries/libldap
Module Name:src Committed By: joerg Date: Tue May 24 16:03:15 UTC 2011 Modified Files: src/external/bsd/openldap/dist/libraries/libldap: os-ip.c os-local.c Log Message: Fix formatting of time_t To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/bsd/openldap/dist/libraries/libldap/os-ip.c cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/openldap/dist/libraries/libldap/os-local.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/openldap/dist/libraries/libldap/os-ip.c diff -u src/external/bsd/openldap/dist/libraries/libldap/os-ip.c:1.4 src/external/bsd/openldap/dist/libraries/libldap/os-ip.c:1.5 --- src/external/bsd/openldap/dist/libraries/libldap/os-ip.c:1.4 Sun Dec 12 15:46:33 2010 +++ src/external/bsd/openldap/dist/libraries/libldap/os-ip.c Tue May 24 16:03:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: os-ip.c,v 1.4 2010/12/12 15:46:33 adam Exp $ */ +/* $NetBSD: os-ip.c,v 1.5 2011/05/24 16:03:15 joerg Exp $ */ /* os-ip.c -- platform-specific TCP & UDP related code */ /* OpenLDAP: pkg/ldap/libraries/libldap/os-ip.c,v 1.118.2.20 2010/04/13 20:22:58 kurt Exp */ @@ -283,8 +283,8 @@ int rc; - osip_debug(ld, "ldap_int_poll: fd: %d tm: %ld\n", - s, tvp ? tvp->tv_sec : -1L, 0); + osip_debug(ld, "ldap_int_poll: fd: %d tm: %jd\n", + s, tvp ? (intmax_t)tvp->tv_sec : -1, 0); #ifdef HAVE_POLL { @@ -432,8 +432,8 @@ opt_tv = &tv; } - osip_debug(ld, "ldap_pvt_connect: fd: %d tm: %ld async: %d\n", - s, opt_tv ? tv.tv_sec : -1L, async); + osip_debug(ld, "ldap_pvt_connect: fd: %d tm: %jd async: %d\n", + s, opt_tv ? (intmax_t)tv.tv_sec : -1, async); if ( opt_tv && ldap_pvt_ndelay_on(ld, s) == -1 ) return ( -1 ); Index: src/external/bsd/openldap/dist/libraries/libldap/os-local.c diff -u src/external/bsd/openldap/dist/libraries/libldap/os-local.c:1.5 src/external/bsd/openldap/dist/libraries/libldap/os-local.c:1.6 --- src/external/bsd/openldap/dist/libraries/libldap/os-local.c:1.5 Sun Dec 12 15:46:33 2010 +++ src/external/bsd/openldap/dist/libraries/libldap/os-local.c Tue May 24 16:03:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: os-local.c,v 1.5 2010/12/12 15:46:33 adam Exp $ */ +/* $NetBSD: os-local.c,v 1.6 2011/05/24 16:03:15 joerg Exp $ */ /* os-local.c -- platform-specific domain socket code */ /* OpenLDAP: pkg/ldap/libraries/libldap/os-local.c,v 1.44.2.10 2010/04/13 20:22:59 kurt Exp */ @@ -178,8 +178,8 @@ opt_tv = &tv; } - oslocal_debug(ld, "ldap_connect_timeout: fd: %d tm: %ld async: %d\n", - s, opt_tv ? tv.tv_sec : -1L, async); + oslocal_debug(ld, "ldap_connect_timeout: fd: %d tm: %jd async: %d\n", + s, opt_tv ? (intmax_t)tv.tv_sec : -1, async); if ( ldap_pvt_ndelay_on(ld, s) == -1 ) return -1;
CVS commit: src/external/gpl2/lvm2/dist/lib/format_text
Module Name:src Committed By: joerg Date: Tue May 24 15:51:00 UTC 2011 Modified Files: src/external/gpl2/lvm2/dist/lib/format_text: export.c Log Message: Fix printing of time_t To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/gpl2/lvm2/dist/lib/format_text/export.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/lvm2/dist/lib/format_text/export.c diff -u src/external/gpl2/lvm2/dist/lib/format_text/export.c:1.1.1.3 src/external/gpl2/lvm2/dist/lib/format_text/export.c:1.2 --- src/external/gpl2/lvm2/dist/lib/format_text/export.c:1.1.1.3 Wed Dec 2 00:26:29 2009 +++ src/external/gpl2/lvm2/dist/lib/format_text/export.c Tue May 24 15:51:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: export.c,v 1.1.1.3 2009/12/02 00:26:29 haad Exp $ */ +/* $NetBSD: export.c,v 1.2 2011/05/24 15:51:00 joerg Exp $ */ /* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. @@ -346,7 +346,7 @@ outf(f, "creation_host = \"%s\"\t# %s %s %s %s %s", _utsname.nodename, _utsname.sysname, _utsname.nodename, _utsname.release, _utsname.version, _utsname.machine); - outf(f, "creation_time = %lu\t# %s", t, ctime(&t)); + outf(f, "creation_time = %jd\t# %s", (intmax_t)t, ctime(&t)); return 1; }
CVS commit: src/external/apache2/mDNSResponder/dist/mDNSShared
Module Name:src Committed By: joerg Date: Tue May 24 15:44:28 UTC 2011 Modified Files: src/external/apache2/mDNSResponder/dist/mDNSShared: dnssd_clientstub.c Log Message: Fix another format string To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c diff -u src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c:1.2 src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c:1.3 --- src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c:1.2 Tue May 24 15:30:31 2011 +++ src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c Tue May 24 15:44:28 2011 @@ -458,7 +458,7 @@ { // Should never happen. If it does, it indicates some OS bug, // or that the mDNSResponder daemon crashed (which should never happen). - syslog(LOG_WARNING, "dnssd_clientstub read_all(%d) failed %ld/%d %d %s", sd, num_read, len, + syslog(LOG_WARNING, "dnssd_clientstub read_all(%d) failed %zd/%d %d %s", sd, num_read, len, (num_read < 0) ? dnssd_errno : 0, (num_read < 0) ? dnssd_strerror(dnssd_errno) : ""); return (num_read < 0 && dnssd_errno == dnssd_EWOULDBLOCK) ? read_all_wouldblock : read_all_fail;
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha
Module Name:xsrc Committed By: jakllsch Date: Tue May 24 15:42:25 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha: alphaMouse.c Log Message: Needs "mi.h". To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c:1.3 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c:1.4 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c:1.3 Sun Oct 10 05:28:49 2010 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c Tue May 24 15:42:25 2011 @@ -52,7 +52,8 @@ */ #define NEED_EVENTS -#include"alpha.h" +#include "mi.h" +#include "alpha.h" #include Bool alphaActiveZaphod = TRUE;
CVS commit: src/external/apache2/mDNSResponder/dist/mDNSShared
Module Name:src Committed By: joerg Date: Tue May 24 15:30:31 UTC 2011 Modified Files: src/external/apache2/mDNSResponder/dist/mDNSShared: dnssd_clientstub.c Log Message: Fix format string To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c diff -u src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c:1.1.1.1 src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c:1.2 --- src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c:1.1.1.1 Tue Sep 29 22:14:16 2009 +++ src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c Tue May 24 15:30:31 2011 @@ -432,7 +432,7 @@ { // Should never happen. If it does, it indicates some OS bug, // or that the mDNSResponder daemon crashed (which should never happen). - syslog(LOG_WARNING, "dnssd_clientstub write_all(%d) failed %ld/%d %d %s", sd, num_written, len, + syslog(LOG_WARNING, "dnssd_clientstub write_all(%d) failed %zd/%d %d %s", sd, num_written, len, (num_written < 0) ? dnssd_errno : 0, (num_written < 0) ? dnssd_strerror(dnssd_errno) : ""); return -1;
CVS commit: src/tests/libexec/ld.elf_so
Module Name:src Committed By: joerg Date: Tue May 24 15:24:28 UTC 2011 Modified Files: src/tests/libexec/ld.elf_so: h_df_1_noopen.c Log Message: Use proper format string To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/h_df_1_noopen.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/libexec/ld.elf_so/h_df_1_noopen.c diff -u src/tests/libexec/ld.elf_so/h_df_1_noopen.c:1.2 src/tests/libexec/ld.elf_so/h_df_1_noopen.c:1.3 --- src/tests/libexec/ld.elf_so/h_df_1_noopen.c:1.2 Thu Mar 17 15:59:32 2011 +++ src/tests/libexec/ld.elf_so/h_df_1_noopen.c Tue May 24 15:24:28 2011 @@ -39,7 +39,7 @@ handle = dlopen("libpthread.so", RTLD_NOLOAD); if (handle == NULL) - errx(1, dlerror()); + errx(1, "%s", dlerror()); printf("libpthread loaded successfully\n"); return 0;
CVS commit: src/sys/dev/dm
Module Name:src Committed By: joerg Date: Tue May 24 15:23:42 UTC 2011 Modified Files: src/sys/dev/dm: dm_ioctl.c Log Message: Fix logic error To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/dm/dm_ioctl.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/dm/dm_ioctl.c diff -u src/sys/dev/dm/dm_ioctl.c:1.24 src/sys/dev/dm/dm_ioctl.c:1.25 --- src/sys/dev/dm/dm_ioctl.c:1.24 Mon Dec 6 09:03:40 2010 +++ src/sys/dev/dm/dm_ioctl.c Tue May 24 15:23:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dm_ioctl.c,v 1.24 2010/12/06 09:03:40 haad Exp $ */ +/* $NetBSD: dm_ioctl.c,v 1.25 2011/05/24 15:23:41 joerg Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -915,7 +915,7 @@ prop_dictionary_set_int32(target_dict, DM_TABLE_STAT, dmv->table_head.cur_active_table); - if (flags |= DM_STATUS_TABLE_FLAG) { + if (flags & DM_STATUS_TABLE_FLAG) { params = table_en->target->status (table_en->target_config);
CVS commit: src/tests/lib/libc/gen
Module Name:src Committed By: joerg Date: Tue May 24 15:20:37 UTC 2011 Modified Files: src/tests/lib/libc/gen: t_siginfo.c Log Message: Use volatile for explicit 0 dereference To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libc/gen/t_siginfo.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/gen/t_siginfo.c diff -u src/tests/lib/libc/gen/t_siginfo.c:1.10 src/tests/lib/libc/gen/t_siginfo.c:1.11 --- src/tests/lib/libc/gen/t_siginfo.c:1.10 Wed Mar 2 03:42:56 2011 +++ src/tests/lib/libc/gen/t_siginfo.c Tue May 24 15:20:37 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_siginfo.c,v 1.10 2011/03/02 03:42:56 riz Exp $ */ +/* $NetBSD: t_siginfo.c,v 1.11 2011/05/24 15:20:37 joerg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -224,7 +224,7 @@ switch ((child = fork())) { case 0: sleep(1); - *(long *)0 = 0; + *(volatile long *)0 = 0; atf_tc_fail("Child did not segfault"); /* NOTREACHED */ case -1: @@ -403,7 +403,7 @@ sigemptyset(&sa.sa_mask); sigaction(SIGSEGV, &sa, NULL); - *(long *)0 = 0; + *(volatile long *)0 = 0; atf_tc_fail("Test did not fault as expected"); }
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: joerg Date: Tue May 24 14:27:07 UTC 2011 Modified Files: src/crypto/external/bsd/openssh/dist: ssh-pkcs11-helper.c Log Message: Kill redundant unused extern. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/openssh/dist/ssh-pkcs11-helper.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssh/dist/ssh-pkcs11-helper.c diff -u src/crypto/external/bsd/openssh/dist/ssh-pkcs11-helper.c:1.2 src/crypto/external/bsd/openssh/dist/ssh-pkcs11-helper.c:1.3 --- src/crypto/external/bsd/openssh/dist/ssh-pkcs11-helper.c:1.2 Sun Nov 21 18:59:04 2010 +++ src/crypto/external/bsd/openssh/dist/ssh-pkcs11-helper.c Tue May 24 14:27:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ssh-pkcs11-helper.c,v 1.2 2010/11/21 18:59:04 adam Exp $ */ +/* $NetBSD: ssh-pkcs11-helper.c,v 1.3 2011/05/24 14:27:07 joerg Exp $ */ /* $OpenBSD: ssh-pkcs11-helper.c,v 1.3 2010/02/24 06:12:53 djm Exp $ */ /* * Copyright (c) 2010 Markus Friedl. All rights reserved. @@ -16,7 +16,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "includes.h" -__RCSID("$NetBSD: ssh-pkcs11-helper.c,v 1.2 2010/11/21 18:59:04 adam Exp $"); +__RCSID("$NetBSD: ssh-pkcs11-helper.c,v 1.3 2011/05/24 14:27:07 joerg Exp $"); #include #include @@ -270,7 +270,6 @@ SyslogFacility log_facility = SYSLOG_FACILITY_AUTH; LogLevel log_level = SYSLOG_LEVEL_ERROR; char buf[4*4096]; - extern char *optarg; extern char *__progname; TAILQ_INIT(&pkcs11_keylist);
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: joerg Date: Tue May 24 14:26:55 UTC 2011 Modified Files: src/crypto/external/bsd/openssh/dist: auth1.c Log Message: Use proper format string To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/openssh/dist/auth1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssh/dist/auth1.c diff -u src/crypto/external/bsd/openssh/dist/auth1.c:1.3 src/crypto/external/bsd/openssh/dist/auth1.c:1.4 --- src/crypto/external/bsd/openssh/dist/auth1.c:1.3 Sun Nov 21 18:29:48 2010 +++ src/crypto/external/bsd/openssh/dist/auth1.c Tue May 24 14:26:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: auth1.c,v 1.3 2010/11/21 18:29:48 adam Exp $ */ +/* $NetBSD: auth1.c,v 1.4 2011/05/24 14:26:55 joerg Exp $ */ /* $OpenBSD: auth1.c,v 1.74 2010/06/25 08:46:17 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -12,7 +12,7 @@ */ #include "includes.h" -__RCSID("$NetBSD: auth1.c,v 1.3 2010/11/21 18:29:48 adam Exp $"); +__RCSID("$NetBSD: auth1.c,v 1.4 2011/05/24 14:26:55 joerg Exp $"); #include #include @@ -390,7 +390,7 @@ msg[len] = '\0'; else msg = "Access denied."; - packet_disconnect(msg); + packet_disconnect("%s", msg); } #endif
CVS commit: src/sys/fs/tmpfs
Module Name:src Committed By: rmind Date: Tue May 24 14:18:03 UTC 2011 Modified Files: src/sys/fs/tmpfs: tmpfs_subr.c Log Message: tmpfs_free_node: comment out assert, which can fire e.g. on shutdown. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/fs/tmpfs/tmpfs_subr.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/fs/tmpfs/tmpfs_subr.c diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.65 src/sys/fs/tmpfs/tmpfs_subr.c:1.66 --- src/sys/fs/tmpfs/tmpfs_subr.c:1.65 Tue May 24 01:09:47 2011 +++ src/sys/fs/tmpfs/tmpfs_subr.c Tue May 24 14:18:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_subr.c,v 1.65 2011/05/24 01:09:47 rmind Exp $ */ +/* $NetBSD: tmpfs_subr.c,v 1.66 2011/05/24 14:18:03 rmind Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.65 2011/05/24 01:09:47 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.66 2011/05/24 14:18:03 rmind Exp $"); #include #include @@ -201,7 +201,7 @@ } break; case VDIR: - KASSERT(TAILQ_EMPTY(&node->tn_spec.tn_dir.tn_dir)); + /* KASSERT(TAILQ_EMPTY(&node->tn_spec.tn_dir.tn_dir)); */ KASSERT(node->tn_spec.tn_dir.tn_parent || node == tmp->tm_root); break; default:
CVS commit: src/external/bsd/byacc/bin
Module Name:src Committed By: joerg Date: Tue May 24 13:48:16 UTC 2011 Modified Files: src/external/bsd/byacc/bin: Makefile Log Message: Provide correct GCC_NORETURN To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/byacc/bin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/byacc/bin/Makefile diff -u src/external/bsd/byacc/bin/Makefile:1.1 src/external/bsd/byacc/bin/Makefile:1.2 --- src/external/bsd/byacc/bin/Makefile:1.1 Thu Oct 29 00:56:35 2009 +++ src/external/bsd/byacc/bin/Makefile Tue May 24 13:48:16 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2009/10/29 00:56:35 christos Exp $ +# $NetBSD: Makefile,v 1.2 2011/05/24 13:48:16 joerg Exp $ .include "bsd.own.mk" @@ -6,4 +6,6 @@ SRCS= closure.c error.c lalr.c lr0.c main.c mkpar.c output.c reader.c \ skeleton.c symtab.c verbose.c warshall.c graph.c +CPPFLAGS+= -DGCC_NORETURN=__dead + .include
CVS commit: src/usr.sbin/pf/pfs
Module Name:src Committed By: joerg Date: Tue May 24 13:41:53 UTC 2011 Modified Files: src/usr.sbin/pf/pfs: token.l Log Message: No input needed To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/pf/pfs/token.l 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/pf/pfs/token.l diff -u src/usr.sbin/pf/pfs/token.l:1.1 src/usr.sbin/pf/pfs/token.l:1.2 --- src/usr.sbin/pf/pfs/token.l:1.1 Fri May 7 17:41:58 2010 +++ src/usr.sbin/pf/pfs/token.l Tue May 24 13:41:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: token.l,v 1.1 2010/05/07 17:41:58 degroote Exp $ */ +/* $NetBSD: token.l,v 1.2 2011/05/24 13:41:53 joerg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: token.l,v 1.1 2010/05/07 17:41:58 degroote Exp $"); +__RCSID("$NetBSD: token.l,v 1.2 2011/05/24 13:41:53 joerg Exp $"); #endif #include @@ -50,6 +50,7 @@ %} %option nounput +%option noinput %%
CVS commit: src/usr.sbin/rpc.yppasswdd
Module Name:src Committed By: joerg Date: Tue May 24 13:27:16 UTC 2011 Modified Files: src/usr.sbin/rpc.yppasswdd: rpc.yppasswdd.c Log Message: Properly use format strings To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.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/rpc.yppasswdd/rpc.yppasswdd.c diff -u src/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c:1.13 src/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c:1.14 --- src/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c:1.13 Tue Oct 20 00:51:14 2009 +++ src/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c Tue May 24 13:27:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rpc.yppasswdd.c,v 1.13 2009/10/20 00:51:14 snj Exp $ */ +/* $NetBSD: rpc.yppasswdd.c,v 1.14 2011/05/24 13:27:16 joerg Exp $ */ /* * Copyright (c) 1994 Mats O Jansson @@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: rpc.yppasswdd.c,v 1.13 2009/10/20 00:51:14 snj Exp $"); +__RCSID("$NetBSD: rpc.yppasswdd.c,v 1.14 2011/05/24 13:27:16 joerg Exp $"); #endif /* not lint */ #include @@ -93,7 +93,7 @@ arglen = strlen(argv[i]); if ((len + arglen) > (int)(sizeof(make_arg) - 2)) - errx(EXIT_FAILURE, strerror(E2BIG)); + errx(EXIT_FAILURE, "%s", strerror(E2BIG)); make_arg[len++] = ' '; (void)strcpy(&make_arg[len], argv[i]); len += arglen;
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: joerg Date: Tue May 24 13:26:41 UTC 2011 Modified Files: src/usr.sbin/syslogd: tls.c Log Message: Properly use format strings To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/syslogd/tls.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/syslogd/tls.c diff -u src/usr.sbin/syslogd/tls.c:1.5 src/usr.sbin/syslogd/tls.c:1.6 --- src/usr.sbin/syslogd/tls.c:1.5 Thu May 13 17:52:12 2010 +++ src/usr.sbin/syslogd/tls.c Tue May 24 13:26:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tls.c,v 1.5 2010/05/13 17:52:12 tnozaki Exp $ */ +/* $NetBSD: tls.c,v 1.6 2011/05/24 13:26:41 joerg Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include -__RCSID("$NetBSD: tls.c,v 1.5 2010/05/13 17:52:12 tnozaki Exp $"); +__RCSID("$NetBSD: tls.c,v 1.6 2011/05/24 13:26:41 joerg Exp $"); #ifndef DISABLE_TLS #include "syslogd.h" @@ -829,7 +829,7 @@ error = getaddrinfo(bindhostname, (port ? port : "syslog-tls"), &hints, &res); if (error) { - logerror(gai_strerror(error)); + logerror("%s", gai_strerror(error)); errno = 0; die(0, 0, NULL); } @@ -989,7 +989,7 @@ error = getaddrinfo(conn_info->hostname, (conn_info->port ? conn_info->port : "syslog-tls"), &hints, &res); if (error) { - logerror(gai_strerror(error)); + logerror("%s", gai_strerror(error)); return false; }
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: joerg Date: Tue May 24 13:26:04 UTC 2011 Modified Files: src/usr.sbin/syslogd: syslogd.c Log Message: Explicitly mark a NEWREF as unused To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/usr.sbin/syslogd/syslogd.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/syslogd/syslogd.c diff -u src/usr.sbin/syslogd/syslogd.c:1.101 src/usr.sbin/syslogd/syslogd.c:1.102 --- src/usr.sbin/syslogd/syslogd.c:1.101 Tue May 24 13:25:25 2011 +++ src/usr.sbin/syslogd/syslogd.c Tue May 24 13:26:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: syslogd.c,v 1.101 2011/05/24 13:25:25 joerg Exp $ */ +/* $NetBSD: syslogd.c,v 1.102 2011/05/24 13:26:04 joerg Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #else -__RCSID("$NetBSD: syslogd.c,v 1.101 2011/05/24 13:25:25 joerg Exp $"); +__RCSID("$NetBSD: syslogd.c,v 1.102 2011/05/24 13:26:04 joerg Exp $"); #endif #endif /* not lint */ @@ -2129,7 +2129,7 @@ * this enables the buffer in the else branch to be freed * --> every branch needs one NEWREF() or buf_msg_new()! */ if (buffer) { - NEWREF(buffer); + (void)NEWREF(buffer); } else { if (f->f_prevcount > 1) { /* possible syslog-sign incompatibility:
CVS commit: src/usr.sbin/syslogd
Module Name:src Committed By: joerg Date: Tue May 24 13:25:25 UTC 2011 Modified Files: src/usr.sbin/syslogd: syslogd.c Log Message: Properly use format strings To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/usr.sbin/syslogd/syslogd.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/syslogd/syslogd.c diff -u src/usr.sbin/syslogd/syslogd.c:1.100 src/usr.sbin/syslogd/syslogd.c:1.101 --- src/usr.sbin/syslogd/syslogd.c:1.100 Wed Jun 9 21:55:42 2010 +++ src/usr.sbin/syslogd/syslogd.c Tue May 24 13:25:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: syslogd.c,v 1.100 2010/06/09 21:55:42 riz Exp $ */ +/* $NetBSD: syslogd.c,v 1.101 2011/05/24 13:25:25 joerg Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #else -__RCSID("$NetBSD: syslogd.c,v 1.100 2010/06/09 21:55:42 riz Exp $"); +__RCSID("$NetBSD: syslogd.c,v 1.101 2011/05/24 13:25:25 joerg Exp $"); #endif #endif /* not lint */ @@ -2320,7 +2320,7 @@ &f->f_un.f_pipe.f_pid)) < 0) { f->f_type = F_UNUSED; message_queue_freeall(f); -logerror(f->f_un.f_pipe.f_pname); +logerror("%s", f->f_un.f_pipe.f_pname); break; } else if (!qentry) /* prevent recursion */ SEND_QUEUE(f); @@ -2350,7 +2350,7 @@ &f->f_un.f_pipe.f_pid)) < 0) { f->f_type = F_UNUSED; message_queue_freeall(f); - logerror(f->f_un.f_pipe.f_pname); + logerror("%s", f->f_un.f_pipe.f_pname); break; } if (writev(f->f_file, iov, v - iov) < 0) { @@ -2367,7 +2367,7 @@ } if (e != 0 && !error) { errno = e; -logerror(f->f_un.f_pipe.f_pname); +logerror("%s", f->f_un.f_pipe.f_pname); } } if (e == 0 && qentry) { /* sent buffered msg */ @@ -2394,7 +2394,7 @@ int lasterror = f->f_lasterror; f->f_lasterror = e; if (lasterror != e) - logerror(f->f_un.f_fname); + logerror("%s", f->f_un.f_fname); error = true; /* enqueue on return */ } (void)close(f->f_file); @@ -2406,7 +2406,7 @@ O_WRONLY|O_APPEND, 0); if (f->f_file < 0) { f->f_type = F_UNUSED; - logerror(f->f_un.f_fname); + logerror("%s", f->f_un.f_fname); message_queue_freeall(f); } else goto again; @@ -2414,7 +2414,7 @@ f->f_type = F_UNUSED; errno = e; f->f_lasterror = e; -logerror(f->f_un.f_fname); +logerror("%s", f->f_un.f_fname); message_queue_freeall(f); } } else { @@ -2534,7 +2534,7 @@ if ((p = ttymsg(iov, iovcnt, ep->line, TTYMSGTIME)) != NULL) { errno = 0; /* already in msg */ -logerror(p); +logerror("%s", p); } continue; } @@ -2546,7 +2546,7 @@ if ((p = ttymsg(iov, iovcnt, ep->line, TTYMSGTIME)) != NULL) { errno = 0; /* already in msg */ - logerror(p); + logerror("%s", p); } break; } @@ -3548,7 +3548,7 @@ #ifndef DISABLE_TLS if (tls_status_msg) { - loginfo(tls_status_msg); + loginfo("%s", tls_status_msg); free(tls_status_msg); } DPRINTF((D_NET|D_TLS), "Preparing sockets for TLS\n"); @@ -3788,7 +3788,7 @@ error = getaddrinfo(f->f_un.f_forw.f_hname, "syslog", &hints, &res); if (error) { - logerror(gai_strerror(error)); + logerror("%s", gai_strerror(error)); break; } f->f_un.f_forw.f_addr = res; @@ -3804,7 +3804,7 @@ (void)strlcpy(f->f_un.f_fname, p, sizeof(f->f_un.f_fname)); if ((f->f_file = open(p, O_WRONLY|O_APPEND, 0)) < 0) { f->f_type = F_UNUSED; - logerror(p); + logerror("%s", p); break; } if (syncfile) @@ -3941,7 +3941,7 @@ hints.ai_socktype = SOCK_DGRAM; error = getaddrinfo(hostname, "syslog", &hints, &res); if (error) { - logerror(gai_strerror(error)); + logerror("%s", gai_strerror(error)); errno = 0; die(0, 0, NULL); } @@ -4074,7 +4074,7 @@ (void) snprintf(errmsg, sizeof(errmsg), "Warning: cannot change pipe to pid %d to " "non-blocking.", (int) pid); - logerror(errmsg); + logerror("%s", errmsg); } *rpid = pid; return pfd[1]; @@ -4146,7 +4146,7 @@ (void) snprintf(buf, sizeof(buf), "Logging subprocess %d (%s) exited %s %d.", pid, name, reason, code); - logerror(buf); + logerror("%s", buf); } struct event *
CVS commit: src/usr.sbin/rbootd
Module Name:src Committed By: joerg Date: Tue May 24 13:19:55 UTC 2011 Modified Files: src/usr.sbin/rbootd: rbootd.c Log Message: Use proper format string To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/rbootd/rbootd.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/rbootd/rbootd.c diff -u src/usr.sbin/rbootd/rbootd.c:1.22 src/usr.sbin/rbootd/rbootd.c:1.23 --- src/usr.sbin/rbootd/rbootd.c:1.22 Tue Feb 8 20:20:28 2011 +++ src/usr.sbin/rbootd/rbootd.c Tue May 24 13:19:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rbootd.c,v 1.22 2011/02/08 20:20:28 rmind Exp $ */ +/* $NetBSD: rbootd.c,v 1.23 2011/05/24 13:19:55 joerg Exp $ */ /* * Copyright (c) 1988, 1992 The University of Utah and the Center @@ -52,7 +52,7 @@ #if 0 static char sccsid[] = "@(#)rbootd.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: rbootd.c,v 1.22 2011/02/08 20:20:28 rmind Exp $"); +__RCSID("$NetBSD: rbootd.c,v 1.23 2011/05/24 13:19:55 joerg Exp $"); #endif #endif /* not lint */ @@ -151,7 +151,7 @@ if ((IntfName = BpfGetIntfName(&errmsg)) == NULL) { /* backslash to avoid trigraph ??) */ syslog(LOG_NOTICE, "restarted (?\?)"); - syslog(LOG_ERR, errmsg); + syslog(LOG_ERR, "%s", errmsg); Exit(0); } }
CVS commit: src/usr.sbin/mopd
Module Name:src Committed By: joerg Date: Tue May 24 13:08:17 UTC 2011 Modified Files: src/usr.sbin/mopd/common: dl.c print.c put.c rc.c src/usr.sbin/mopd/mopd: process.c Log Message: Kill redundant () To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/mopd/common/dl.c cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/mopd/common/print.c \ src/usr.sbin/mopd/common/put.c src/usr.sbin/mopd/common/rc.c cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/mopd/mopd/process.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/mopd/common/dl.c diff -u src/usr.sbin/mopd/common/dl.c:1.7 src/usr.sbin/mopd/common/dl.c:1.8 --- src/usr.sbin/mopd/common/dl.c:1.7 Tue Nov 17 18:58:07 2009 +++ src/usr.sbin/mopd/common/dl.c Tue May 24 13:08:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dl.c,v 1.7 2009/11/17 18:58:07 drochner Exp $ */ +/* $NetBSD: dl.c,v 1.8 2011/05/24 13:08:16 joerg Exp $ */ /* * Copyright (c) 1993-95 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #include #ifndef lint -__RCSID("$NetBSD: dl.c,v 1.7 2009/11/17 18:58:07 drochner Exp $"); +__RCSID("$NetBSD: dl.c,v 1.8 2011/05/24 13:08:16 joerg Exp $"); #endif #include "os.h" @@ -189,7 +189,7 @@ tmpc = mopGetChar(pkt,&idx); /* Error */ (void)fprintf(fd,"Error: %02x (",tmpc); - if ((tmpc == 0)) { + if (tmpc == 0) { (void)fprintf(fd,"no error)\n"); } else { (void)fprintf(fd,"error)\n"); Index: src/usr.sbin/mopd/common/print.c diff -u src/usr.sbin/mopd/common/print.c:1.6 src/usr.sbin/mopd/common/print.c:1.7 --- src/usr.sbin/mopd/common/print.c:1.6 Tue Nov 17 18:58:07 2009 +++ src/usr.sbin/mopd/common/print.c Tue May 24 13:08:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.6 2009/11/17 18:58:07 drochner Exp $ */ +/* $NetBSD: print.c,v 1.7 2011/05/24 13:08:16 joerg Exp $ */ /* * Copyright (c) 1993-96 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #include #ifndef lint -__RCSID("$NetBSD: print.c,v 1.6 2009/11/17 18:58:07 drochner Exp $"); +__RCSID("$NetBSD: print.c,v 1.7 2011/05/24 13:08:16 joerg Exp $"); #endif #include @@ -523,18 +523,18 @@ case MOP_K_INFO_SFID: tmpc = mopGetChar(pkt,idx); (void)fprintf(fd,"Software ID : %02x ",tmpc); - if ((tmpc == 0)) { + if (tmpc == 0) { (void)fprintf(fd,"No software id"); } - if ((tmpc == 254)) { + if (tmpc == 254) { (void)fprintf(fd,"Maintenance system"); tmpc = 0; } - if ((tmpc == 255)) { + if (tmpc == 255) { (void)fprintf(fd,"Standard operating system"); tmpc = 0; } - if ((tmpc > 0)) { + if (tmpc > 0) { (void)fprintf(fd,"'"); for (i = 0; i < ((int) tmpc); i++) { (void)fprintf(fd,"%c", Index: src/usr.sbin/mopd/common/put.c diff -u src/usr.sbin/mopd/common/put.c:1.6 src/usr.sbin/mopd/common/put.c:1.7 --- src/usr.sbin/mopd/common/put.c:1.6 Tue Nov 17 18:58:07 2009 +++ src/usr.sbin/mopd/common/put.c Tue May 24 13:08:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: put.c,v 1.6 2009/11/17 18:58:07 drochner Exp $ */ +/* $NetBSD: put.c,v 1.7 2011/05/24 13:08:16 joerg Exp $ */ /* * Copyright (c) 1993-95 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #include #ifndef lint -__RCSID("$NetBSD: put.c,v 1.6 2009/11/17 18:58:07 drochner Exp $"); +__RCSID("$NetBSD: put.c,v 1.7 2011/05/24 13:08:16 joerg Exp $"); #endif #include "os.h" @@ -79,7 +79,7 @@ time_t tnow; struct tm *timenow; - if ((value == 0)) { + if (value == 0) { tnow = time(NULL); } else { tnow = value; Index: src/usr.sbin/mopd/common/rc.c diff -u src/usr.sbin/mopd/common/rc.c:1.6 src/usr.sbin/mopd/common/rc.c:1.7 --- src/usr.sbin/mopd/common/rc.c:1.6 Tue Nov 17 18:58:07 2009 +++ src/usr.sbin/mopd/common/rc.c Tue May 24 13:08:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rc.c,v 1.6 2009/11/17 18:58:07 drochner Exp $ */ +/* $NetBSD: rc.c,v 1.7 2011/05/24 13:08:16 joerg Exp $ */ /* * Copyright (c) 1993-95 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #include #ifndef lint -__RCSID("$NetBSD: rc.c,v 1.6 2009/11/17 18:58:07 drochner Exp $"); +__RCSID("$NetBSD: rc.c,v 1.7 2011/05/24 13:08:16 joerg Exp $"); #endif #include "os.h" @@ -68,7 +68,7 @@ break; case MOP_K_CODE_BOT: - if ((moplen == 5)) { + if (moplen == 5) { tmps = mopGetShort(pkt,&idx); (void)fprintf(fd,"Verification : %04x\n",tmps); } else { @@ -111,18 +111,18 @@ tmpc = mopGetChar(pkt,&idx); /* Software ID */ (void)fprintf(fd,"Software ID : %02x ",tmpc); - if ((tmpc == 0)) { + if (tmpc == 0) { (void)fprintf(fd,"No software id"); } - if ((tmpc == 254)) { + if (tmpc == 254) { (void)fprintf(fd,"Maintenance system"); tmpc = 0; } - if ((tmpc == 255)) { + if (tmpc == 255) { (void)fprintf(fd,"Standard operating system"); tmpc = 0; } - if ((tmpc > 0)) { + if (tmpc > 0) { (void)fprintf(fd,"'"); for
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: joerg Date: Tue May 24 13:03:20 UTC 2011 Modified Files: src/usr.sbin/ldpd: socketops.c Log Message: Packed pointers are non-sense To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/ldpd/socketops.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/ldpd/socketops.c diff -u src/usr.sbin/ldpd/socketops.c:1.5 src/usr.sbin/ldpd/socketops.c:1.6 --- src/usr.sbin/ldpd/socketops.c:1.5 Sat Jan 22 19:46:46 2011 +++ src/usr.sbin/ldpd/socketops.c Tue May 24 13:03:19 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: socketops.c,v 1.5 2011/01/22 19:46:46 kefren Exp $ */ +/* $NetBSD: socketops.c,v 1.6 2011/05/24 13:03:19 joerg Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -752,7 +752,7 @@ struct init_tlv *itlv; struct label_map_tlv *lmtlv; struct fec_tlv *fectlv; - struct label_tlv *__packed labeltlv; + struct label_tlv *labeltlv; struct notification_tlv *nottlv; struct hello_info *hi;
CVS commit: src/usr.sbin/isdn/isdntrace
Module Name:src Committed By: joerg Date: Tue May 24 13:02:37 UTC 2011 Modified Files: src/usr.sbin/isdn/isdntrace: trace.c Log Message: Kill redundant externs To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/isdn/isdntrace/trace.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/isdn/isdntrace/trace.c diff -u src/usr.sbin/isdn/isdntrace/trace.c:1.10 src/usr.sbin/isdn/isdntrace/trace.c:1.11 --- src/usr.sbin/isdn/isdntrace/trace.c:1.10 Thu Apr 16 05:56:33 2009 +++ src/usr.sbin/isdn/isdntrace/trace.c Tue May 24 13:02:37 2011 @@ -35,7 +35,7 @@ * trace.c - print traces of D (B) channel activity for isdn4bsd * - * - * $Id: trace.c,v 1.10 2009/04/16 05:56:33 lukem Exp $ + * $Id: trace.c,v 1.11 2011/05/24 13:02:37 joerg Exp $ * * $FreeBSD$ * @@ -121,9 +121,6 @@ int main(int argc, char *argv[]) { - extern int optind; - extern int opterr; - extern char *optarg; char devicename[80]; char headerbuf[256];
CVS commit: src/usr.sbin/flashctl
Module Name:src Committed By: joerg Date: Tue May 24 13:01:53 UTC 2011 Modified Files: src/usr.sbin/flashctl: flashctl.c Log Message: Properly use format strings To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/flashctl/flashctl.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/flashctl/flashctl.c diff -u src/usr.sbin/flashctl/flashctl.c:1.3 src/usr.sbin/flashctl/flashctl.c:1.4 --- src/usr.sbin/flashctl/flashctl.c:1.3 Mon Apr 4 18:30:07 2011 +++ src/usr.sbin/flashctl/flashctl.c Tue May 24 13:01:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: flashctl.c,v 1.3 2011/04/04 18:30:07 ahoka Exp $ */ +/* $NetBSD: flashctl.c,v 1.4 2011/05/24 13:01:53 joerg Exp $ */ /*- * Copyright (c) 2010 Department of Software Engineering, @@ -85,7 +85,7 @@ if (argc == 2) { error = to_intmax(&n, argv[0]); if (error) { -warnx(strerror(error)); +warnx("%s", strerror(error)); goto out; } ep.ep_addr = n; @@ -95,7 +95,7 @@ } else { error = to_intmax(&n, argv[1]); if (error) { - warnx(strerror(error)); + warnx("%s", strerror(error)); goto out; } ep.ep_len = n; @@ -198,7 +198,7 @@ error = to_intmax(&n, argv[0]); if (error) { - warnx(strerror(error)); + warnx("%s", strerror(error)); goto out; }
CVS commit: src/usr.bin/xlint
Module Name:src Committed By: joerg Date: Tue May 24 12:49:11 UTC 2011 Modified Files: src/usr.bin/xlint/lint1: decl.c src/usr.bin/xlint/lint2: msg.c Log Message: Fix format string usage To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.10 -r1.11 src/usr.bin/xlint/lint2/msg.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/xlint/lint1/decl.c diff -u src/usr.bin/xlint/lint1/decl.c:1.51 src/usr.bin/xlint/lint1/decl.c:1.52 --- src/usr.bin/xlint/lint1/decl.c:1.51 Fri Oct 2 21:49:30 2009 +++ src/usr.bin/xlint/lint1/decl.c Tue May 24 12:49:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: decl.c,v 1.51 2009/10/02 21:49:30 christos Exp $ */ +/* $NetBSD: decl.c,v 1.52 2011/05/24 12:49:11 joerg Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: decl.c,v 1.51 2009/10/02 21:49:30 christos Exp $"); +__RCSID("$NetBSD: decl.c,v 1.52 2011/05/24 12:49:11 joerg Exp $"); #endif #include @@ -881,7 +881,7 @@ switch (tp->t_tspec) { case FUNC: /* compiler takes size of function */ - LERROR(msgs[12]); + LERROR("%s", msgs[12]); /* NOTREACHED */ case STRUCT: case UNION: Index: src/usr.bin/xlint/lint2/msg.c diff -u src/usr.bin/xlint/lint2/msg.c:1.10 src/usr.bin/xlint/lint2/msg.c:1.11 --- src/usr.bin/xlint/lint2/msg.c:1.10 Sat Apr 26 19:38:30 2008 +++ src/usr.bin/xlint/lint2/msg.c Tue May 24 12:49:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.c,v 1.10 2008/04/26 19:38:30 christos Exp $ */ +/* $NetBSD: msg.c,v 1.11 2011/05/24 12:49:11 joerg Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: msg.c,v 1.10 2008/04/26 19:38:30 christos Exp $"); +__RCSID("$NetBSD: msg.c,v 1.11 2011/05/24 12:49:11 joerg Exp $"); #endif #include @@ -131,7 +131,7 @@ if (len > blen) buf = xrealloc(buf, blen = len); if (line != 0) { - (void)sprintf(buf, "%s%s(%hu)", + (void)sprintf(buf, "%s%s(%d)", fn, qm ? "?" : "", line); } else { (void)sprintf(buf, "%s", fn);
CVS commit: src/usr.bin/tip
Module Name:src Committed By: joerg Date: Tue May 24 12:46:16 UTC 2011 Modified Files: src/usr.bin/tip: hunt.c Log Message: Properly use format string To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/tip/hunt.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/tip/hunt.c diff -u src/usr.bin/tip/hunt.c:1.16 src/usr.bin/tip/hunt.c:1.17 --- src/usr.bin/tip/hunt.c:1.16 Thu Dec 14 17:09:43 2006 +++ src/usr.bin/tip/hunt.c Tue May 24 12:46:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.16 2006/12/14 17:09:43 christos Exp $ */ +/* $NetBSD: hunt.c,v 1.17 2011/05/24 12:46:16 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)hunt.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: hunt.c,v 1.16 2006/12/14 17:09:43 christos Exp $"); +__RCSID("$NetBSD: hunt.c,v 1.17 2011/05/24 12:46:16 joerg Exp $"); #endif /* not lint */ #include "tip.h" @@ -76,7 +76,7 @@ } (void)alarm(0); if (FD < 0) { - warn(cp); + warn("%s", cp); deadfl = 1; } else if (!deadfl) { struct termios cntrl;
CVS commit: src/usr.bin/sdpquery
Module Name:src Committed By: joerg Date: Tue May 24 12:44:30 UTC 2011 Modified Files: src/usr.bin/sdpquery: print.c Log Message: Properly use format strings To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/sdpquery/print.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/sdpquery/print.c diff -u src/usr.bin/sdpquery/print.c:1.7 src/usr.bin/sdpquery/print.c:1.8 --- src/usr.bin/sdpquery/print.c:1.7 Tue Dec 14 15:18:20 2010 +++ src/usr.bin/sdpquery/print.c Tue May 24 12:44:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.7 2010/12/14 15:18:20 plunky Exp $ */ +/* $NetBSD: print.c,v 1.8 2011/05/24 12:44:30 joerg Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: print.c,v 1.7 2010/12/14 15:18:20 plunky Exp $"); +__RCSID("$NetBSD: print.c,v 1.8 2011/05/24 12:44:30 joerg Exp $"); #include #include @@ -1097,7 +1097,7 @@ sep = "\n"; while (sdp_get_uint8(&list, &v)) { - printf(sep); + printf("%s", sep); sep = ", "; switch(v) { @@ -1127,7 +1127,7 @@ sep = "\n"; while (sdp_get_uint8(&list, &v)) { - printf(sep); + printf("%s", sep); sep = ", "; switch(v) { @@ -1433,7 +1433,7 @@ printf(" (v%d.%d", (v >> 8), (v & 0xff)); sep = "; "; while (sdp_get_uint16(&seq, &v)) { - printf(sep); + printf("%s", sep); sep = ", "; switch (v) {
CVS commit: src/usr.bin/rpcinfo
Module Name:src Committed By: joerg Date: Tue May 24 12:42:25 UTC 2011 Modified Files: src/usr.bin/rpcinfo: rpcinfo.c Log Message: Fix usage() to actually not return To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/usr.bin/rpcinfo/rpcinfo.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/rpcinfo/rpcinfo.c diff -u src/usr.bin/rpcinfo/rpcinfo.c:1.32 src/usr.bin/rpcinfo/rpcinfo.c:1.33 --- src/usr.bin/rpcinfo/rpcinfo.c:1.32 Thu Feb 10 00:05:52 2011 +++ src/usr.bin/rpcinfo/rpcinfo.c Tue May 24 12:42:25 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rpcinfo.c,v 1.32 2011/02/10 00:05:52 christos Exp $ */ +/* $NetBSD: rpcinfo.c,v 1.33 2011/05/24 12:42:25 joerg Exp $ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for @@ -153,7 +153,7 @@ static void deletereg(const char *, int, char **); static void print_rmtcallstat(int, const rpcb_stat *); static void print_getaddrstat(int, const rpcb_stat *); -static void usage(void)__attribute__((__noreturn__)); +static void usage(void) __dead; static rpcprog_t getprognum(const char *); static rpcvers_t getvers(const char *); static const char *spaces(size_t); @@ -1499,6 +1499,7 @@ (void)fprintf(stderr, "\t%s -b prognum versnum\n", getprogname()); (void)fprintf(stderr, "\t%s -d [-T netid] prognum versnum\n", getprogname()); + exit(0); } static rpcprog_t
CVS commit: src/usr.bin/radioctl
Module Name:src Committed By: joerg Date: Tue May 24 12:40:12 UTC 2011 Modified Files: src/usr.bin/radioctl: radioctl.c Log Message: Properly use format strings. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.bin/radioctl/radioctl.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/radioctl/radioctl.c diff -u src/usr.bin/radioctl/radioctl.c:1.8 src/usr.bin/radioctl/radioctl.c:1.9 --- src/usr.bin/radioctl/radioctl.c:1.8 Mon Apr 13 04:24:29 2009 +++ src/usr.bin/radioctl/radioctl.c Tue May 24 12:40:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: radioctl.c,v 1.8 2009/04/13 04:24:29 lukem Exp $ */ +/* $NetBSD: radioctl.c,v 1.9 2011/05/24 12:40:11 joerg Exp $ */ /* $OpenBSD: radioctl.c,v 1.5 2001/12/18 18:42:19 mickey Exp $ */ /* $RuOBSD: radioctl.c,v 1.4 2001/10/20 18:09:10 pva Exp $ */ @@ -29,7 +29,7 @@ #include #ifndef lint -__RCSID("$NetBSD: radioctl.c,v 1.8 2009/04/13 04:24:29 lukem Exp $"); +__RCSID("$NetBSD: radioctl.c,v 1.9 2011/05/24 12:40:11 joerg Exp $"); #endif #include @@ -459,13 +459,13 @@ printf("%umkV", ri.lock); break; case OPTION_MUTE: - printf(ri.mute ? onchar : offchar); + printf("%s", ri.mute ? onchar : offchar); break; case OPTION_MONO: - printf(ri.stereo ? offchar : onchar); + printf("%s", ri.stereo ? offchar : onchar); break; case OPTION_STEREO: - printf(ri.stereo ? onchar : offchar); + printf("%s", ri.stereo ? onchar : offchar); break; case OPTION_VOLUME: default:
CVS commit: src/usr.bin/mkesdb
Module Name:src Committed By: joerg Date: Tue May 24 12:35:36 UTC 2011 Modified Files: src/usr.bin/mkesdb: yacc.y Log Message: Properly use format string. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.bin/mkesdb/yacc.y 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/mkesdb/yacc.y diff -u src/usr.bin/mkesdb/yacc.y:1.4 src/usr.bin/mkesdb/yacc.y:1.5 --- src/usr.bin/mkesdb/yacc.y:1.4 Thu Jun 2 02:09:25 2005 +++ src/usr.bin/mkesdb/yacc.y Tue May 24 12:35:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: yacc.y,v 1.4 2005/06/02 02:09:25 lukem Exp $ */ +/* $NetBSD: yacc.y,v 1.5 2011/05/24 12:35:36 joerg Exp $ */ %{ /*- @@ -33,7 +33,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: yacc.y,v 1.4 2005/06/02 02:09:25 lukem Exp $"); +__RCSID("$NetBSD: yacc.y,v 1.5 2011/05/24 12:35:36 joerg Exp $"); #endif /* not lint */ #include @@ -331,7 +331,7 @@ case 1: in = fopen(argv[0], "r"); if (!in) - err(EXIT_FAILURE, argv[0]); + err(EXIT_FAILURE, "%s", argv[0]); break; default: usage();
CVS commit: src/usr.bin/mkcsmapper
Module Name:src Committed By: joerg Date: Tue May 24 12:35:01 UTC 2011 Modified Files: src/usr.bin/mkcsmapper: yacc.y Log Message: Properly use format string To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/mkcsmapper/yacc.y 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/mkcsmapper/yacc.y diff -u src/usr.bin/mkcsmapper/yacc.y:1.7 src/usr.bin/mkcsmapper/yacc.y:1.8 --- src/usr.bin/mkcsmapper/yacc.y:1.7 Sat Sep 9 14:35:17 2006 +++ src/usr.bin/mkcsmapper/yacc.y Tue May 24 12:35:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: yacc.y,v 1.7 2006/09/09 14:35:17 tnozaki Exp $ */ +/* $NetBSD: yacc.y,v 1.8 2011/05/24 12:35:01 joerg Exp $ */ %{ /*- @@ -33,7 +33,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: yacc.y,v 1.7 2006/09/09 14:35:17 tnozaki Exp $"); +__RCSID("$NetBSD: yacc.y,v 1.8 2011/05/24 12:35:01 joerg Exp $"); #endif /* not lint */ #include @@ -718,7 +718,7 @@ case 1: in = fopen(argv[0], "r"); if (!in) - err(EXIT_FAILURE, argv[0]); + err(EXIT_FAILURE, "%s", argv[0]); break; default: usage();
CVS commit: src/usr.bin/mail
Module Name:src Committed By: joerg Date: Tue May 24 12:33:22 UTC 2011 Modified Files: src/usr.bin/mail: mime_detach.c support.c Log Message: Use proper format strings. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/mail/mime_detach.c cvs rdiff -u -r1.22 -r1.23 src/usr.bin/mail/support.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/mail/mime_detach.c diff -u src/usr.bin/mail/mime_detach.c:1.5 src/usr.bin/mail/mime_detach.c:1.6 --- src/usr.bin/mail/mime_detach.c:1.5 Fri Aug 28 14:26:50 2009 +++ src/usr.bin/mail/mime_detach.c Tue May 24 12:33:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mime_detach.c,v 1.5 2009/08/28 14:26:50 christos Exp $ */ +/* $NetBSD: mime_detach.c,v 1.6 2011/05/24 12:33:22 joerg Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include #ifndef __lint__ -__RCSID("$NetBSD: mime_detach.c,v 1.5 2009/08/28 14:26:50 christos Exp $"); +__RCSID("$NetBSD: mime_detach.c,v 1.6 2011/05/24 12:33:22 joerg Exp $"); #endif /* not __lint__ */ #include @@ -166,7 +166,7 @@ return DETACH_RENAME; } } - warn(fname); + warn("%s", fname); if (fd != -1) (void)close(fd); Index: src/usr.bin/mail/support.c diff -u src/usr.bin/mail/support.c:1.22 src/usr.bin/mail/support.c:1.23 --- src/usr.bin/mail/support.c:1.22 Fri Apr 10 13:08:25 2009 +++ src/usr.bin/mail/support.c Tue May 24 12:33:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: support.c,v 1.22 2009/04/10 13:08:25 christos Exp $ */ +/* $NetBSD: support.c,v 1.23 2011/05/24 12:33:22 joerg Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)aux.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: support.c,v 1.22 2009/04/10 13:08:25 christos Exp $"); +__RCSID("$NetBSD: support.c,v 1.23 2011/05/24 12:33:22 joerg Exp $"); #endif #endif /* not lint */ @@ -733,7 +733,7 @@ size_t len; if ((f = Fopen(fname, "r")) == NULL) { - warn(fname); + warn("%s", fname); return; } while ((line = fgetln(f, &len)) != NULL) {
CVS commit: src/usr.bin/m4
Module Name:src Committed By: joerg Date: Tue May 24 12:32:36 UTC 2011 Modified Files: src/usr.bin/m4: tokenizer.l Log Message: Doesn't need input. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.bin/m4/tokenizer.l 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/m4/tokenizer.l diff -u src/usr.bin/m4/tokenizer.l:1.4 src/usr.bin/m4/tokenizer.l:1.5 --- src/usr.bin/m4/tokenizer.l:1.4 Thu Oct 29 14:49:03 2009 +++ src/usr.bin/m4/tokenizer.l Tue May 24 12:32:36 2011 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: tokenizer.l,v 1.4 2009/10/29 14:49:03 christos Exp $ */ +/* $NetBSD: tokenizer.l,v 1.5 2011/05/24 12:32:36 joerg Exp $ */ /* $OpenBSD: tokenizer.l,v 1.6 2008/08/21 21:00:14 espie Exp $ */ /* * Copyright (c) 2004 Marc Espie @@ -20,7 +20,7 @@ #include "nbtool_config.h" #endif #include "parser.h" -__RCSID("$NetBSD: tokenizer.l,v 1.4 2009/10/29 14:49:03 christos Exp $"); +__RCSID("$NetBSD: tokenizer.l,v 1.5 2011/05/24 12:32:36 joerg Exp $"); #include #include #include @@ -37,6 +37,7 @@ %} %option nounput +%option noinput delim [ \t\n] ws {delim}+
CVS commit: src/usr.bin/less/less
Module Name:src Committed By: joerg Date: Tue May 24 12:31:56 UTC 2011 Modified Files: src/usr.bin/less/less: prompt.c Log Message: Fix const issues To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/less/less/prompt.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/less/less/prompt.c diff -u src/usr.bin/less/less/prompt.c:1.13 src/usr.bin/less/less/prompt.c:1.14 --- src/usr.bin/less/less/prompt.c:1.13 Sat Feb 16 07:20:54 2008 +++ src/usr.bin/less/less/prompt.c Tue May 24 12:31:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: prompt.c,v 1.13 2008/02/16 07:20:54 matt Exp $ */ +/* $NetBSD: prompt.c,v 1.14 2011/05/24 12:31:56 joerg Exp $ */ /* * Copyright (C) 1984-2004 Mark Nudelman @@ -71,8 +71,8 @@ static POSITION curr_byte __P((int)); static int cond __P((int, int)); static void protochar __P((int, int, int)); -static char *skipcond __P((char *)); -static char *wherechar __P((char *, int *)); +static const char *skipcond __P((const char *)); +static const char *wherechar __P((const char *, int *)); /* * Initialize the prompt prototype strings. @@ -401,9 +401,9 @@ * where to resume parsing the string. * We must keep track of nested IFs and skip them properly. */ - static char * + static const char * skipcond(p) - register char *p; + register const char *p; { register int iflevel; @@ -459,9 +459,9 @@ /* * Decode a char that represents a position on the screen. */ - static char * + static const char * wherechar(p, wp) - char *p; + const char *p; int *wp; { switch (*p) @@ -485,10 +485,10 @@ */ public char * pr_expand(proto, maxwidth) - char *proto; + const char *proto; int maxwidth; { - register char *p; + register const char *p; register int c; int where;
CVS commit: src/usr.bin/ldd
Module Name:src Committed By: joerg Date: Tue May 24 12:27:30 UTC 2011 Modified Files: src/usr.bin/ldd: ldd.c Log Message: Fix sign compare To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.bin/ldd/ldd.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/ldd/ldd.c diff -u src/usr.bin/ldd/ldd.c:1.18 src/usr.bin/ldd/ldd.c:1.19 --- src/usr.bin/ldd/ldd.c:1.18 Tue Mar 29 20:56:35 2011 +++ src/usr.bin/ldd/ldd.c Tue May 24 12:27:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ldd.c,v 1.18 2011/03/29 20:56:35 joerg Exp $ */ +/* $NetBSD: ldd.c,v 1.19 2011/05/24 12:27:29 joerg Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ldd.c,v 1.18 2011/03/29 20:56:35 joerg Exp $"); +__RCSID("$NetBSD: ldd.c,v 1.19 2011/05/24 12:27:29 joerg Exp $"); #endif /* not lint */ #include @@ -212,7 +212,7 @@ if (strncmp(libname, "lib", 3) == 0 && (cp = strstr(libname, ".so")) != NULL) { - int i = cp - (libname + 3); + size_t i = cp - (libname + 3); if (i >= sizeof(libnamebuf)) i = sizeof(libnamebuf) - 1;
CVS commit: src/usr.bin/extattr
Module Name:src Committed By: joerg Date: Tue May 24 12:25:05 UTC 2011 Modified Files: src/usr.bin/extattr: getextattr.c Log Message: Don't use user input as format string To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/extattr/getextattr.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/extattr/getextattr.c diff -u src/usr.bin/extattr/getextattr.c:1.3 src/usr.bin/extattr/getextattr.c:1.4 --- src/usr.bin/extattr/getextattr.c:1.3 Sat Jun 17 08:32:42 2006 +++ src/usr.bin/extattr/getextattr.c Tue May 24 12:25:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: getextattr.c,v 1.3 2006/06/17 08:32:42 elad Exp $ */ +/* $NetBSD: getextattr.c,v 1.4 2011/05/24 12:25:05 joerg Exp $ */ /*- * Copyright (c) 2002, 2003 Networks Associates Technology, Inc. @@ -178,7 +178,7 @@ error = extattr_string_to_namespace(argv[0], &attrnamespace); if (error) - err(1, argv[0]); + err(1, "%s", argv[0]); argc--; argv++; if (what != EALS) {
CVS commit: src/usr.bin/error
Module Name:src Committed By: joerg Date: Tue May 24 12:24:23 UTC 2011 Modified Files: src/usr.bin/error: touch.c Log Message: Simplify To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.bin/error/touch.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/error/touch.c diff -u src/usr.bin/error/touch.c:1.25 src/usr.bin/error/touch.c:1.26 --- src/usr.bin/error/touch.c:1.25 Sat May 21 00:43:52 2011 +++ src/usr.bin/error/touch.c Tue May 24 12:24:22 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: touch.c,v 1.25 2011/05/21 00:43:52 christos Exp $ */ +/* $NetBSD: touch.c,v 1.26 2011/05/24 12:24:22 joerg Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: touch.c,v 1.25 2011/05/21 00:43:52 christos Exp $"); +__RCSID("$NetBSD: touch.c,v 1.26 2011/05/24 12:24:22 joerg Exp $"); #endif /* not lint */ #include @@ -443,10 +443,11 @@ my_nerrors = my_files[ix+1] - my_files[ix]; if (my_nerrors != nterrors && !previewed) { - fprintf(stdout, terse - ? "Uninserted errors\n" - : ">>Uninserted errors for file \"%s\" follow.\n", - name); + if (terse) + printf("Uninserted errors\n"); + else + printf(">>Uninserted errors for file \"%s\" follow.\n", + name); } EITERATE(erpp, my_files, ix) {
CVS commit: src/usr.bin/deroff
Module Name:src Committed By: joerg Date: Tue May 24 12:19:11 UTC 2011 Modified Files: src/usr.bin/deroff: deroff.c Log Message: Kill self assignment To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/deroff/deroff.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/deroff/deroff.c diff -u src/usr.bin/deroff/deroff.c:1.7 src/usr.bin/deroff/deroff.c:1.8 --- src/usr.bin/deroff/deroff.c:1.7 Fri Aug 7 14:05:58 2009 +++ src/usr.bin/deroff/deroff.c Tue May 24 12:19:11 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: deroff.c,v 1.7 2009/08/07 14:05:58 wiz Exp $ */ +/* $NetBSD: deroff.c,v 1.8 2011/05/24 12:19:11 joerg Exp $ */ /* taken from: OpenBSD: deroff.c,v 1.6 2004/06/02 14:58:46 tom Exp */ @@ -74,7 +74,7 @@ #if 0 static const char sccsid[] = "@(#)deroff.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$NetBSD: deroff.c,v 1.7 2009/08/07 14:05:58 wiz Exp $"; +static const char rcsid[] = "$NetBSD: deroff.c,v 1.8 2011/05/24 12:19:11 joerg Exp $"; #endif #endif /* not lint */ @@ -998,7 +998,7 @@ */ if (((np - cp) > constant) && (inquote || (chars[(unsigned char)cp[0]] == LETTER))) { - for (cp = cp; cp < np; cp++) + for (; cp < np; cp++) putchar(*cp); last = np[-1]; found++;
CVS commit: src/dist/bzip2
Module Name:src Committed By: joerg Date: Tue May 24 12:18:03 UTC 2011 Modified Files: src/dist/bzip2: bzip2recover.c Log Message: Use portable macros To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/dist/bzip2/bzip2recover.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/bzip2/bzip2recover.c diff -u src/dist/bzip2/bzip2recover.c:1.7 src/dist/bzip2/bzip2recover.c:1.8 --- src/dist/bzip2/bzip2recover.c:1.7 Tue Mar 18 17:35:36 2008 +++ src/dist/bzip2/bzip2recover.c Tue May 24 12:18:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bzip2recover.c,v 1.7 2008/03/18 17:35:36 christos Exp $ */ +/* $NetBSD: bzip2recover.c,v 1.8 2011/05/24 12:18:03 joerg Exp $ */ /*---*/ @@ -23,6 +23,7 @@ /* This program is a complete hack and should be rewritten properly. It isn't very complicated. */ +#include #include #include #include @@ -38,9 +39,9 @@ This change occurred in version 1.0.2; all prior versions have the 512MB limitation. */ -#ifdef __GNUC__ - typedef unsigned long long int MaybeUInt64; -# define MaybeUInt64_FMT "%Lu" +#if 1 + typedef uint64_t MaybeUInt64; +# define MaybeUInt64_FMT "%" PRIu64 #else #ifdef _MSC_VER typedef unsigned __int64 MaybeUInt64;
CVS commit: src/sbin/wsconsctl
Module Name:src Committed By: joerg Date: Tue May 24 12:07:14 UTC 2011 Modified Files: src/sbin/wsconsctl: map_scan.l Log Message: input is unused To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sbin/wsconsctl/map_scan.l Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/wsconsctl/map_scan.l diff -u src/sbin/wsconsctl/map_scan.l:1.6 src/sbin/wsconsctl/map_scan.l:1.7 --- src/sbin/wsconsctl/map_scan.l:1.6 Tue Nov 30 12:22:06 2010 +++ src/sbin/wsconsctl/map_scan.l Tue May 24 12:07:14 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: map_scan.l,v 1.6 2010/11/30 12:22:06 phx Exp $ */ +/* $NetBSD: map_scan.l,v 1.7 2011/05/24 12:07:14 joerg Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -51,6 +51,7 @@ %} %option noyywrap +%option noinput %%
CVS commit: src/sbin/veriexecctl
Module Name:src Committed By: joerg Date: Tue May 24 12:06:25 UTC 2011 Modified Files: src/sbin/veriexecctl: veriexecctl_conf.l Log Message: input is unused. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sbin/veriexecctl/veriexecctl_conf.l Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/veriexecctl/veriexecctl_conf.l diff -u src/sbin/veriexecctl/veriexecctl_conf.l:1.14 src/sbin/veriexecctl/veriexecctl_conf.l:1.15 --- src/sbin/veriexecctl/veriexecctl_conf.l:1.14 Thu Oct 29 14:49:03 2009 +++ src/sbin/veriexecctl/veriexecctl_conf.l Tue May 24 12:06:25 2011 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: veriexecctl_conf.l,v 1.14 2009/10/29 14:49:03 christos Exp $ */ +/* $NetBSD: veriexecctl_conf.l,v 1.15 2011/05/24 12:06:25 joerg Exp $ */ /*- * Copyright 2005 Elad Efrat @@ -82,6 +82,7 @@ PCHAR (\\.|[^ \t]) %option nounput +%option noinput %%
CVS commit: src/sbin/scsictl
Module Name:src Committed By: joerg Date: Tue May 24 12:04:18 UTC 2011 Modified Files: src/sbin/scsictl: scsictl.c Log Message: Decide on printing an int as int and not as short. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sbin/scsictl/scsictl.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/scsictl/scsictl.c diff -u src/sbin/scsictl/scsictl.c:1.31 src/sbin/scsictl/scsictl.c:1.32 --- src/sbin/scsictl/scsictl.c:1.31 Mon Apr 28 20:23:09 2008 +++ src/sbin/scsictl/scsictl.c Tue May 24 12:04:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: scsictl.c,v 1.31 2008/04/28 20:23:09 martin Exp $ */ +/* $NetBSD: scsictl.c,v 1.32 2011/05/24 12:04:18 joerg Exp $ */ /*- * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include #ifndef lint -__RCSID("$NetBSD: scsictl.c,v 1.31 2008/04/28 20:23:09 martin Exp $"); +__RCSID("$NetBSD: scsictl.c,v 1.32 2011/05/24 12:04:18 joerg Exp $"); #endif @@ -510,7 +510,7 @@ (mode_page.format_page.bytes_s[1]); if (j != DEV_BSIZE) - printf("current disk sector size: %hd\n", j); + printf("current disk sector size: %d\n", j); memset(&cmd, 0, sizeof(cmd));
CVS commit: src/sbin/routed
Module Name:src Committed By: joerg Date: Tue May 24 12:03:04 UTC 2011 Modified Files: src/sbin/routed: parms.c Log Message: Use bitwise operators, logical and with a constant doesn't make sense To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sbin/routed/parms.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/routed/parms.c diff -u src/sbin/routed/parms.c:1.24 src/sbin/routed/parms.c:1.25 --- src/sbin/routed/parms.c:1.24 Mon Oct 26 02:53:15 2009 +++ src/sbin/routed/parms.c Tue May 24 12:03:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: parms.c,v 1.24 2009/10/26 02:53:15 christos Exp $ */ +/* $NetBSD: parms.c,v 1.25 2011/05/24 12:03:04 joerg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #include #ifdef __NetBSD__ -__RCSID("$NetBSD: parms.c,v 1.24 2009/10/26 02:53:15 christos Exp $"); +__RCSID("$NetBSD: parms.c,v 1.25 2011/05/24 12:03:04 joerg Exp $"); #elif defined(__FreeBSD__) __RCSID("$FreeBSD$"); #else @@ -900,11 +900,11 @@ if ((0 != (new->parm_int_state & GROUP_IS_SOL_OUT) && 0 != (parmp->parm_int_state & GROUP_IS_SOL_OUT) && 0 != ((new->parm_int_state ^ parmp->parm_int_state) - && GROUP_IS_SOL_OUT)) + & GROUP_IS_SOL_OUT)) || (0 != (new->parm_int_state & GROUP_IS_ADV_OUT) && 0 != (parmp->parm_int_state & GROUP_IS_ADV_OUT) && 0 != ((new->parm_int_state ^ parmp->parm_int_state) - && GROUP_IS_ADV_OUT)) + & GROUP_IS_ADV_OUT)) || (new->parm_rdisc_pref != 0 && parmp->parm_rdisc_pref != 0 && new->parm_rdisc_pref != parmp->parm_rdisc_pref)
CVS commit: src/sbin/ifconfig
Module Name:src Committed By: joerg Date: Tue May 24 11:38:56 UTC 2011 Modified Files: src/sbin/ifconfig: af_inetany.c Log Message: Don't use address strings as format string. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sbin/ifconfig/af_inetany.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/ifconfig/af_inetany.c diff -u src/sbin/ifconfig/af_inetany.c:1.13 src/sbin/ifconfig/af_inetany.c:1.14 --- src/sbin/ifconfig/af_inetany.c:1.13 Mon Dec 13 17:35:08 2010 +++ src/sbin/ifconfig/af_inetany.c Tue May 24 11:38:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: af_inetany.c,v 1.13 2010/12/13 17:35:08 pooka Exp $ */ +/* $NetBSD: af_inetany.c,v 1.14 2011/05/24 11:38:56 joerg Exp $ */ /*- * Copyright (c) 2008 David Young. All rights reserved. @@ -27,7 +27,7 @@ #include #ifndef lint -__RCSID("$NetBSD: af_inetany.c,v 1.13 2010/12/13 17:35:08 pooka Exp $"); +__RCSID("$NetBSD: af_inetany.c,v 1.14 2011/05/24 11:38:56 joerg Exp $"); #endif /* not lint */ #include @@ -92,9 +92,9 @@ param->gifaddr.cmd == 0) return; else if (prog_ioctl(s, param->gifaddr.cmd, param->dgreq.buf) == -1) - err(EXIT_FAILURE, param->gifaddr.desc); + err(EXIT_FAILURE, "%s", param->gifaddr.desc); else if (prog_ioctl(s, param->difaddr.cmd, param->dgreq.buf) == -1) - err(EXIT_FAILURE, param->difaddr.desc); + err(EXIT_FAILURE, "%s", param->difaddr.desc); else return; @@ -157,20 +157,20 @@ if (prog_ioctl(s, param->gifaddr.cmd, param->dgreq.buf) == 0) { rc = prog_ioctl(s, param->difaddr.cmd, param->dgreq.buf); if (rc == -1) -err(EXIT_FAILURE, param->difaddr.desc); +err(EXIT_FAILURE, "%s", param->difaddr.desc); } else if (errno == EADDRNOTAVAIL) ; /* No address was assigned yet. */ else - err(EXIT_FAILURE, param->gifaddr.desc); + err(EXIT_FAILURE, "%s", param->gifaddr.desc); } else if (delete) { loadbuf(¶m->dgaddr, addr); if (prog_ioctl(s, param->difaddr.cmd, param->dgreq.buf) == -1) - err(EXIT_FAILURE, param->difaddr.desc); + err(EXIT_FAILURE, "%s", param->difaddr.desc); return; } if (param->pre_aifaddr != NULL && (*param->pre_aifaddr)(env, param) == -1) err(EXIT_FAILURE, "pre-%s", param->aifaddr.desc); if (prog_ioctl(s, param->aifaddr.cmd, param->req.buf) == -1) - err(EXIT_FAILURE, param->aifaddr.desc); + err(EXIT_FAILURE, "%s", param->aifaddr.desc); }
CVS commit: src/sys
Module Name:src Committed By: mrg Date: Tue May 24 10:08:03 UTC 2011 Modified Files: src/sys/arch/sparc64/sparc64: autoconf.c src/sys/dev/ic: mpt.c Log Message: for SPI devices, allow platform code to set "scsi-initiator-id" device property, and if set, use it instead of pfp.PortSCSIID. on sparc64 systems on "scsi" or "scsi-2" devices, look from our node up the tree for a "scsi-initiator-id" property, and if present, copy it into the device properties. this fixes mpt(4) issues on PRIMEPOWER250 (and probably other) systems. idea from freebsd r207243/r207287, but reworked to use our device properties instead of platform #ifdefs. look in "device_type" as well as "name" for "ethernet" or "network", and also look to see if a "local-mac-address" is set when choosing if this may be a network device. fixes bge(4) nul ethernet address on the same PRIMEPOWER250. To generate a diff of this commit: cvs rdiff -u -r1.177 -r1.178 src/sys/arch/sparc64/sparc64/autoconf.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/mpt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/autoconf.c diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.177 src/sys/arch/sparc64/sparc64/autoconf.c:1.178 --- src/sys/arch/sparc64/sparc64/autoconf.c:1.177 Thu May 12 05:42:22 2011 +++ src/sys/arch/sparc64/sparc64/autoconf.c Tue May 24 10:08:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.177 2011/05/12 05:42:22 mrg Exp $ */ +/* $NetBSD: autoconf.c,v 1.178 2011/05/24 10:08:03 mrg Exp $ */ /* * Copyright (c) 1996 @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.177 2011/05/12 05:42:22 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.178 2011/05/24 10:08:03 mrg Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -938,16 +938,22 @@ if (ofnode != 0) { uint8_t eaddr[ETHER_ADDR_LEN]; char tmpstr[32]; + char tmpstr2[32]; + int node; + uint32_t id = 0; uint64_t nwwn = 0, pwwn = 0; prop_dictionary_t dict; prop_data_t blob; prop_number_t pwwnd = NULL, nwwnd = NULL; + prop_number_t idd = NULL; device_setofnode(dev, ofnode); dev_path_exact_match(dev, ofnode); if (OF_getprop(ofnode, "name", tmpstr, sizeof(tmpstr)) <= 0) tmpstr[0] = 0; + if (OF_getprop(ofnode, "device_type", tmpstr2, sizeof(tmpstr2)) <= 0) + tmpstr2[0] = 0; /* * If this is a network interface, note the @@ -955,7 +961,11 @@ */ if (strcmp(tmpstr, "network") == 0 || strcmp(tmpstr, "ethernet") == 0 + || strcmp(tmpstr2, "network") == 0 + || strcmp(tmpstr2, "ethernet") == 0 || OF_getprop(ofnode, "mac-address", &eaddr, sizeof(eaddr)) + >= ETHER_ADDR_LEN + || OF_getprop(ofnode, "local-mac-address", &eaddr, sizeof(eaddr)) >= ETHER_ADDR_LEN) { dict = device_properties(dev); @@ -963,7 +973,8 @@ /* * Is it a network interface with FCode? */ - if (strcmp(tmpstr, "network") == 0) { + if (strcmp(tmpstr, "network") == 0 || + strcmp(tmpstr2, "network") == 0) { prop_dictionary_set_bool(dict, "without-seeprom", true); prom_getether(ofnode, eaddr); @@ -980,8 +991,7 @@ noether: /* is this a FC node? */ - if (OF_getprop(ofnode, "device_type", tmpstr, - sizeof(tmpstr)) > 0 && strcmp(tmpstr, "scsi-fcp") == 0) { + if (strcmp(tmpstr, "scsi-fcp") == 0) { dict = device_properties(dev); @@ -1001,6 +1011,25 @@ prop_object_release(nwwnd); } } + + /* is this an spi device? look for scsi-initiator-id */ + if (strcmp(tmpstr2, "scsi") == 0 || + strcmp(tmpstr2, "scsi-2") == 0) { + + dict = device_properties(dev); + + for (node = ofnode; node != 0; node = OF_parent(node)) { +if (OF_getprop(node, "scsi-initiator-id", &id, +sizeof(id)) <= 0) + continue; + +idd = prop_number_create_unsigned_integer(id); +prop_dictionary_set(dict, + "scsi-initiator-id", idd); +prop_object_release(idd); +break; + } + } } /* Index: src/sys/dev/ic/mpt.c diff -u src/sys/dev/ic/mpt.c:1.14 src/sys/dev/ic/mpt.c:1.15 --- src/sys/dev/ic/mpt.c:1.14 Wed Apr 28 22:45:27 2010 +++ src/sys/dev/ic/mpt.c Tue May 24 10:08:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mpt.c,v 1.14 2010/04/28 22:45:27 chs Exp $ */ +/* $NetBSD: mpt.c,v 1.15 2011/05/24 10:08:03 mrg Exp $ */ /* * Copyright (c) 2000, 2001 by Greg Ansley @@ -110,7 +110,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mpt.c,v 1.14 2010/04/28 22:45:27 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpt.c,v 1.15 2011/05/24 10:08:03 mrg Exp $"); #include @@ -1131,7 +1131,9 @@ int try; MSG_IOC_FACTS_REPLY facts; MSG_PORT_FACTS_REPLY pfp; - u_int32_t pptr; +prop_dictionary_t dict; +uint32_t ini_id; +uint32_t pptr; int val; /* Put all request buffers (back) on the free list */ @@ -1151,6 +1153,8 @@ if (mpt_hw_ini
CVS commit: src/sys/dev/isa
Module Name:src Committed By: mrg Date: Tue May 24 09:28:03 UTC 2011 Modified Files: src/sys/dev/isa: pcppi.c Log Message: avoid mutex locking botch and introduce an unlocked version of pcppi_bell_stop(). fixes a problem reported in private email. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/isa/pcppi.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/isa/pcppi.c diff -u src/sys/dev/isa/pcppi.c:1.36 src/sys/dev/isa/pcppi.c:1.37 --- src/sys/dev/isa/pcppi.c:1.36 Tue May 3 04:27:13 2011 +++ src/sys/dev/isa/pcppi.c Tue May 24 09:28:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pcppi.c,v 1.36 2011/05/03 04:27:13 mrg Exp $ */ +/* $NetBSD: pcppi.c,v 1.37 2011/05/24 09:28:03 mrg Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.36 2011/05/03 04:27:13 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.37 2011/05/24 09:28:03 mrg Exp $"); #include "attimer.h" @@ -66,6 +66,7 @@ DVF_DETACH_SHUTDOWN); static int pcppisearch(device_t, cfdata_t, const int *, void *); +static void pcppi_bell_stop_unlocked(void*); static void pcppi_bell_stop(void*); #if NATTIMER > 0 @@ -285,7 +286,7 @@ cv_broadcast(&sc->sc_stop_cv); } if (pitch == 0 || period == 0) { - pcppi_bell_stop(sc); + pcppi_bell_stop_unlocked(sc); sc->sc_bellpitch = 0; mutex_exit(&sc->sc_lock); return; @@ -305,7 +306,7 @@ sc->sc_bellactive = 1; if (slp & PCPPI_BELL_POLL) { delay((period * 100) / hz); - pcppi_bell_stop(sc); + pcppi_bell_stop_unlocked(sc); } else { sc->sc_timeout = 1; callout_reset(&sc->sc_bell_ch, period, pcppi_bell_stop, sc); @@ -319,11 +320,10 @@ } static void -pcppi_bell_stop(void *arg) +pcppi_bell_stop_unlocked(void *arg) { struct pcppi_softc *sc = arg; - mutex_enter(&sc->sc_lock); sc->sc_timeout = 0; /* disable bell */ @@ -333,6 +333,15 @@ sc->sc_bellactive = 0; if (sc->sc_slp) cv_broadcast(&sc->sc_stop_cv); +} + +static void +pcppi_bell_stop(void *arg) +{ + struct pcppi_softc *sc = arg; + + mutex_enter(&sc->sc_lock); + pcppi_bell_stop_unlocked(arg); mutex_exit(&sc->sc_lock); }