CVS commit: [uebayasi-xip] src/sys/miscfs/genfs
Module Name:src Committed By: uebayasi Date: Mon Sep 27 08:25:38 UTC 2010 Modified Files: src/sys/miscfs/genfs [uebayasi-xip]: genfs_io.c Log Message: genfs_do_getpages_xip1: Adjust locking. Although XIP never does real I/O, it's called without PGO_LOCKED in some cases. Leave vmobjlock unlocked in that case. To generate a diff of this commit: cvs rdiff -u -r1.36.2.25 -r1.36.2.26 src/sys/miscfs/genfs/genfs_io.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/miscfs/genfs/genfs_io.c diff -u src/sys/miscfs/genfs/genfs_io.c:1.36.2.25 src/sys/miscfs/genfs/genfs_io.c:1.36.2.26 --- src/sys/miscfs/genfs/genfs_io.c:1.36.2.25 Sun Sep 26 15:18:11 2010 +++ src/sys/miscfs/genfs/genfs_io.c Mon Sep 27 08:25:37 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: genfs_io.c,v 1.36.2.25 2010/09/26 15:18:11 uebayasi Exp $ */ +/* $NetBSD: genfs_io.c,v 1.36.2.26 2010/09/27 08:25:37 uebayasi Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.36.2.25 2010/09/26 15:18:11 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.36.2.26 2010/09/27 08:25:37 uebayasi Exp $"); #include "opt_xip.h" @@ -832,8 +832,8 @@ UVMHIST_LOG(ubchist, "xip npages=%d sbkoff=%lx ebkoff=%lx", npages, (long)sbkoff, (long)ebkoff, 0); - if ((flags & PGO_LOCKED) == 0) - mutex_exit(&uobj->vmobjlock); + KASSERT(mutex_owned(&uobj->vmobjlock)); + mutex_exit(&uobj->vmobjlock); off = offset; for (i = 0; i < npages; i++) { @@ -896,9 +896,7 @@ off += PAGE_SIZE; } - if ((flags & PGO_LOCKED) == 0) - mutex_enter(&uobj->vmobjlock); - KASSERT(mutex_owned(&uobj->vmobjlock)); + mutex_enter(&uobj->vmobjlock); for (i = 0; i < npages; i++) { struct vm_page *pg = pps[i]; @@ -1519,10 +1517,12 @@ npages = maxpages; orignpages = npages; + KASSERT(mutex_owned(&uobj->vmobjlock)); error = genfs_do_getpages_xip1(vp, off, pgs, &npages, 0, VM_PROT_ALL, 0, PGO_LOCKED); KASSERT(error == 0); KASSERT(npages == orignpages); + KASSERT(mutex_owned(&uobj->vmobjlock)); for (i = 0; i < npages; i++) { pg = pgs[i]; if (pg == NULL || pg == PGO_DONTCARE) @@ -1559,6 +1559,7 @@ KASSERT(uobj->uo_npages == 0); done: + KASSERT(mutex_owned(&uobj->vmobjlock)); mutex_exit(&uobj->vmobjlock); return 0; }
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: vanhu Date: Mon Sep 27 11:57:59 UTC 2010 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: isakmp_xauth.c Log Message: fixed some typos in logs (reported by fazaeli (at) sepehrs.com) To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 \ src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.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/dist/ipsec-tools/src/racoon/isakmp_xauth.c diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c:1.20 src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c:1.21 --- src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c:1.20 Mon Apr 20 13:23:55 2009 +++ src/crypto/dist/ipsec-tools/src/racoon/isakmp_xauth.c Mon Sep 27 11:57:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: isakmp_xauth.c,v 1.20 2009/04/20 13:23:55 tteras Exp $ */ +/* $NetBSD: isakmp_xauth.c,v 1.21 2010/09/27 11:57:59 vanhu Exp $ */ /* Id: isakmp_xauth.c,v 1.38 2006/08/22 18:17:17 manubsd Exp */ @@ -507,7 +507,7 @@ if (!auth_added) { if (rad_config(radius_auth_state, NULL) != 0) { plog(LLV_ERROR, LOCATION, NULL, -"Cannot open librarius config file: %s\n", +"Cannot open libradius config file: %s\n", rad_strerror(radius_auth_state)); rad_close(radius_auth_state); radius_auth_state = NULL; @@ -547,7 +547,7 @@ if (!acct_added) { if (rad_config(radius_acct_state, NULL) != 0) { plog(LLV_ERROR, LOCATION, NULL, -"Cannot open librarius config file: %s\n", +"Cannot open libradius config file: %s\n", rad_strerror(radius_acct_state)); rad_close(radius_acct_state); radius_acct_state = NULL;
CVS commit: src/sys/dev/ic
Module Name:src Committed By: kiyohara Date: Mon Sep 27 12:29:03 UTC 2010 Modified Files: src/sys/dev/ic: lan9118reg.h Log Message: Add some IDs. (9210/9211/9220/9221) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/lan9118reg.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/ic/lan9118reg.h diff -u src/sys/dev/ic/lan9118reg.h:1.2 src/sys/dev/ic/lan9118reg.h:1.3 --- src/sys/dev/ic/lan9118reg.h:1.2 Wed Dec 2 12:51:50 2009 +++ src/sys/dev/ic/lan9118reg.h Mon Sep 27 12:29:03 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: lan9118reg.h,v 1.2 2009/12/02 12:51:50 kiyohara Exp $ */ +/* $NetBSD: lan9118reg.h,v 1.3 2010/09/27 12:29:03 kiyohara Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -38,6 +38,11 @@ #define LAN9218_ID_9217 0x117a #define LAN9218_ID_9218 0x118a +#define LAN9210_ID_9210 0x9210 +#define LAN9210_ID_9211 0x9211 +#define LAN9220_ID_9220 0x9220 +#define LAN9220_ID_9221 0x9221 + #define IS_LAN9118(id) ((id) >= LAN9118_ID_9115 && (id) <= LAN9118_ID_9118) #define IS_LAN9218(id) ((id) >= LAN9218_ID_9215 && (id) <= LAN9218_ID_9218)
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Mon Sep 27 12:48:01 UTC 2010 Modified Files: src/doc: 3RDPARTY Log Message: mdocml-1.10.6 out. To generate a diff of this commit: cvs rdiff -u -r1.778 -r1.779 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.778 src/doc/3RDPARTY:1.779 --- src/doc/3RDPARTY:1.778 Thu Sep 23 21:34:14 2010 +++ src/doc/3RDPARTY Mon Sep 27 12:48:01 2010 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.778 2010/09/23 21:34:14 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.779 2010/09/27 12:48:01 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -631,7 +631,7 @@ Package: mdocml Version: 1.9.9 -Current Vers: 1.9.9 +Current Vers: 1.10.6 Maintainer: Kristaps Džonsons Archive Site: http://mdocml.bsd.lv/snapshots/ Home Page: http://mdocml.bsd.lv/
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: tnozaki Date: Mon Sep 27 16:50:13 UTC 2010 Modified Files: src/lib/libc/stdio: fmemopen.c Log Message: fix off-by-one, pointed out by enami-san, thanks! To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/stdio/fmemopen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/fmemopen.c diff -u src/lib/libc/stdio/fmemopen.c:1.3 src/lib/libc/stdio/fmemopen.c:1.4 --- src/lib/libc/stdio/fmemopen.c:1.3 Sat Sep 25 14:00:30 2010 +++ src/lib/libc/stdio/fmemopen.c Mon Sep 27 16:50:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: fmemopen.c,v 1.3 2010/09/25 14:00:30 tron Exp $ */ +/* $NetBSD: fmemopen.c,v 1.4 2010/09/27 16:50:13 tnozaki Exp $ */ /*- * Copyright (c)2007, 2010 Takehiko NOZAKI, @@ -29,7 +29,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fmemopen.c,v 1.3 2010/09/25 14:00:30 tron Exp $"); +__RCSID("$NetBSD: fmemopen.c,v 1.4 2010/09/27 16:50:13 tnozaki Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -70,7 +70,7 @@ fmemopen_write(void *cookie, const char *buf, int nbytes) { struct fmemopen_cookie *p; - char *s, *t; + char *s; _DIAGASSERT(cookie != NULL); _DIAGASSERT(buf != NULL && nbytes > 0); @@ -79,16 +79,18 @@ if (p->cur >= p->tail) return 0; s = p->cur; - t = p->tail - 1; do { - if (p->cur == t) { - if (*buf == '\0') -*p->cur++ = *buf++; + if (p->cur == p->tail - 1) { + if (*buf == '\0') { +*p->cur++ = '\0'; +goto ok; + } break; } *p->cur++ = *buf++; } while (--nbytes > 0); *p->cur = '\0'; +ok: if (p->cur > p->eob) p->eob = p->cur;
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: tnozaki Date: Mon Sep 27 17:08:29 UTC 2010 Modified Files: src/lib/libc/stdio: fmemopen.c Log Message: validate flags/oflags from __sflag() befere call __sfp(). reviewed by enami-san, thanks. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/stdio/fmemopen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/fmemopen.c diff -u src/lib/libc/stdio/fmemopen.c:1.4 src/lib/libc/stdio/fmemopen.c:1.5 --- src/lib/libc/stdio/fmemopen.c:1.4 Mon Sep 27 16:50:13 2010 +++ src/lib/libc/stdio/fmemopen.c Mon Sep 27 17:08:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: fmemopen.c,v 1.4 2010/09/27 16:50:13 tnozaki Exp $ */ +/* $NetBSD: fmemopen.c,v 1.5 2010/09/27 17:08:29 tnozaki Exp $ */ /*- * Copyright (c)2007, 2010 Takehiko NOZAKI, @@ -29,7 +29,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fmemopen.c,v 1.4 2010/09/27 16:50:13 tnozaki Exp $"); +__RCSID("$NetBSD: fmemopen.c,v 1.5 2010/09/27 17:08:29 tnozaki Exp $"); #endif /* LIBC_SCCS and not lint */ #include @@ -154,29 +154,25 @@ FILE * fmemopen(void * __restrict buf, size_t size, const char * __restrict mode) { - int oflags; + int flags, oflags; FILE *fp; struct fmemopen_cookie *cookie; - if (size < (size_t)1) { - errno = EINVAL; + if (size < (size_t)1) + goto invalid; + + flags = __sflags(mode, &oflags); + if (flags == 0) return NULL; - } + + if ((oflags & O_RDWR) == 0 && buf == NULL) + goto invalid; fp = __sfp(); if (fp == NULL) return NULL; fp->_file = -1; - fp->_flags = __sflags(mode, &oflags); - if (fp->_flags == 0) - return NULL; - - if ((oflags & O_RDWR) == 0 && buf == NULL) { - errno = EINVAL; - goto release; - } - cookie = malloc(sizeof(*cookie)); if (cookie == NULL) goto release; @@ -206,13 +202,18 @@ cookie->cur = (oflags & O_APPEND) ? cookie->eob : cookie->head; - fp->_write = (fp->_flags & __SRD) ? NULL : &fmemopen_write; - fp->_read = (fp->_flags & __SWR) ? NULL : &fmemopen_read; + fp->_flags = flags; + fp->_write = (flags & __SRD) ? NULL : &fmemopen_write; + fp->_read = (flags & __SWR) ? NULL : &fmemopen_read; fp->_seek = &fmemopen_seek; fp->_cookie = (void *)cookie; return fp; +invalid: + errno = EINVAL; + return NULL; + release: fp->_flags = 0; return NULL;
CVS commit: src/sys
Module Name:src Committed By: christos Date: Mon Sep 27 21:25:39 UTC 2010 Modified Files: src/sys/dev/pci: agp.c src/sys/sys: agpio.h Log Message: backwards compat code for paddr_t being 32 bits. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/agp.c cvs rdiff -u -r1.5 -r1.6 src/sys/sys/agpio.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/pci/agp.c diff -u src/sys/dev/pci/agp.c:1.69 src/sys/dev/pci/agp.c:1.70 --- src/sys/dev/pci/agp.c:1.69 Tue Jun 15 23:35:01 2010 +++ src/sys/dev/pci/agp.c Mon Sep 27 17:25:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: agp.c,v 1.69 2010/06/16 03:35:01 riz Exp $ */ +/* $NetBSD: agp.c,v 1.70 2010/09/27 21:25:38 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -65,7 +65,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.69 2010/06/16 03:35:01 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.70 2010/09/27 21:25:38 christos Exp $"); #include #include @@ -944,6 +944,20 @@ case AGPIOC_SETUP: return agp_setup_user(sc, (agp_setup *)data); +#ifndef __LP64__ /* Wish ifdef knew about sizeof */ + case AGPIOC_OALLOCATE: { + agp_allocate aga; + agp_oallocate *oaga = data; + + aga.key = oaga->key; + aga.pg_count = oaga->pg_count; + aga.type = oaga->type; + aga.physical = oaga->physical; + + return agp_allocate_user(sc, &aga); + } +#endif + case AGPIOC_ALLOCATE: return agp_allocate_user(sc, (agp_allocate *)data); Index: src/sys/sys/agpio.h diff -u src/sys/sys/agpio.h:1.5 src/sys/sys/agpio.h:1.6 --- src/sys/sys/agpio.h:1.5 Mon Dec 26 13:41:36 2005 +++ src/sys/sys/agpio.h Mon Sep 27 17:25:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: agpio.h,v 1.5 2005/12/26 18:41:36 perry Exp $ */ +/* $NetBSD: agpio.h,v 1.6 2010/09/27 21:25:38 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -65,6 +65,7 @@ #define AGPIOC_RESERVE_IOW (AGPIOC_BASE, 4, agp_region) #define AGPIOC_PROTECT_IOW (AGPIOC_BASE, 5, agp_region) #endif +#define AGPIOC_OALLOCATE _IOWR(AGPIOC_BASE, 6, agp_oallocate) #define AGPIOC_ALLOCATE _IOWR(AGPIOC_BASE, 6, agp_allocate) #define AGPIOC_DEALLOCATE _IOW (AGPIOC_BASE, 7, int) #define AGPIOC_BIND _IOW (AGPIOC_BASE, 8, agp_bind) @@ -107,6 +108,16 @@ } agp_region; #endif +typedef struct _agp_oallocate { + int key; /* tag of allocation*/ + size_t pg_count; /* number of pages */ + uint32_t type; /* 0 == normal, other devspec */ + u_long physical; /* device specific (some devices + * need a phys address of the + * actual page behind the gatt + * table)*/ +} agp_oallocate; + typedef struct _agp_allocate { int key; /* tag of allocation*/ size_t pg_count; /* number of pages */ @@ -116,7 +127,6 @@ * actual page behind the gatt * table)*/ } agp_allocate; - typedef struct _agp_bind { int key; /* tag of allocation*/ off_t pg_start; /* starting page to populate*/
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Mon Sep 27 22:49:46 UTC 2010 Modified Files: src/sys/sys: agpio.h Log Message: move the compat code in the .c file. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/sys/agpio.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/sys/agpio.h diff -u src/sys/sys/agpio.h:1.6 src/sys/sys/agpio.h:1.7 --- src/sys/sys/agpio.h:1.6 Mon Sep 27 17:25:38 2010 +++ src/sys/sys/agpio.h Mon Sep 27 18:49:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: agpio.h,v 1.6 2010/09/27 21:25:38 christos Exp $ */ +/* $NetBSD: agpio.h,v 1.7 2010/09/27 22:49:46 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -65,7 +65,6 @@ #define AGPIOC_RESERVE_IOW (AGPIOC_BASE, 4, agp_region) #define AGPIOC_PROTECT_IOW (AGPIOC_BASE, 5, agp_region) #endif -#define AGPIOC_OALLOCATE _IOWR(AGPIOC_BASE, 6, agp_oallocate) #define AGPIOC_ALLOCATE _IOWR(AGPIOC_BASE, 6, agp_allocate) #define AGPIOC_DEALLOCATE _IOW (AGPIOC_BASE, 7, int) #define AGPIOC_BIND _IOW (AGPIOC_BASE, 8, agp_bind) @@ -108,16 +107,6 @@ } agp_region; #endif -typedef struct _agp_oallocate { - int key; /* tag of allocation*/ - size_t pg_count; /* number of pages */ - uint32_t type; /* 0 == normal, other devspec */ - u_long physical; /* device specific (some devices - * need a phys address of the - * actual page behind the gatt - * table)*/ -} agp_oallocate; - typedef struct _agp_allocate { int key; /* tag of allocation*/ size_t pg_count; /* number of pages */ @@ -127,6 +116,7 @@ * actual page behind the gatt * table)*/ } agp_allocate; + typedef struct _agp_bind { int key; /* tag of allocation*/ off_t pg_start; /* starting page to populate*/
CVS commit: src/sys/dev/pci
Module Name:src Committed By: christos Date: Mon Sep 27 22:53:47 UTC 2010 Modified Files: src/sys/dev/pci: agp.c Log Message: move all the compat code here, and #ifdef __i386__ from mrg. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/dev/pci/agp.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/agp.c diff -u src/sys/dev/pci/agp.c:1.70 src/sys/dev/pci/agp.c:1.71 --- src/sys/dev/pci/agp.c:1.70 Mon Sep 27 17:25:38 2010 +++ src/sys/dev/pci/agp.c Mon Sep 27 18:53:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: agp.c,v 1.70 2010/09/27 21:25:38 christos Exp $ */ +/* $NetBSD: agp.c,v 1.71 2010/09/27 22:53:46 christos Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -65,7 +65,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.70 2010/09/27 21:25:38 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agp.c,v 1.71 2010/09/27 22:53:46 christos Exp $"); #include #include @@ -944,7 +944,24 @@ case AGPIOC_SETUP: return agp_setup_user(sc, (agp_setup *)data); -#ifndef __LP64__ /* Wish ifdef knew about sizeof */ +#ifdef __i386__ +{ + /* + * Handle paddr_t change from 32 bit for non PAE kernels + * to 64 bit. + */ +#define AGPIOC_OALLOCATE _IOWR(AGPIOC_BASE, 6, agp_oallocate) + + typedef struct _agp_oallocate { + int key; /* tag of allocation*/ + size_t pg_count; /* number of pages */ + uint32_t type; /* 0 == normal, other devspec */ + u_long physical; /* device specific (some devices + * need a phys address of the + * actual page behind the gatt + * table)*/ + } agp_oallocate; + case AGPIOC_OALLOCATE: { agp_allocate aga; agp_oallocate *oaga = data; @@ -956,8 +973,8 @@ return agp_allocate_user(sc, &aga); } +} #endif - case AGPIOC_ALLOCATE: return agp_allocate_user(sc, (agp_allocate *)data);
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: enami Date: Tue Sep 28 00:39:56 UTC 2010 Modified Files: src/lib/libc/stdio: fmemopen.3 Log Message: Add missing period at the end of sentense. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/stdio/fmemopen.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/fmemopen.3 diff -u src/lib/libc/stdio/fmemopen.3:1.3 src/lib/libc/stdio/fmemopen.3:1.4 --- src/lib/libc/stdio/fmemopen.3:1.3 Sat Sep 25 09:44:08 2010 +++ src/lib/libc/stdio/fmemopen.3 Tue Sep 28 00:39:56 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: fmemopen.3,v 1.3 2010/09/25 09:44:08 wiz Exp $ +.\" $NetBSD: fmemopen.3,v 1.4 2010/09/28 00:39:56 enami Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -98,7 +98,7 @@ The stream also keeps track of the .Fa size of the -.Fa buffer +.Fa buffer . The .Fa size is initialized depending on the mode:
CVS commit: src/gnu/dist/grep/src
Module Name:src Committed By: dholland Date: Tue Sep 28 00:54:04 UTC 2010 Modified Files: src/gnu/dist/grep/src: grep.c Log Message: Fix -o behavior with patterns that match the empty string, as per PR 43896. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/gnu/dist/grep/src/grep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/grep/src/grep.c diff -u src/gnu/dist/grep/src/grep.c:1.12 src/gnu/dist/grep/src/grep.c:1.13 --- src/gnu/dist/grep/src/grep.c:1.12 Thu Aug 28 03:59:06 2008 +++ src/gnu/dist/grep/src/grep.c Tue Sep 28 00:54:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: grep.c,v 1.12 2008/08/28 03:59:06 lukem Exp $ */ +/* $NetBSD: grep.c,v 1.13 2010/09/28 00:54:04 dholland Exp $ */ /* grep.c - main driver file for grep. Copyright 1992, 1997-1999, 2000 Free Software Foundation, Inc. @@ -542,7 +542,10 @@ if (b == lim) break; if (match_size == 0) - break; + { + beg++; + continue; + } if(color_option) printf("\33[%sm", grep_color); fwrite(b, sizeof (char), match_size, stdout);