From 7f8f2b6bae71ce2a57f0ed2d2bd2eaded50e6d07 Mon Sep 17 00:00:00 2001 From: fjoe Date: Thu, 4 Oct 2012 09:53:59 +0000 Subject: [PATCH] Revert changes that ocassionally got into r241192. Pointy hat to: me git-svn-id: svn://svn.freebsd.org/base/stable/9@241193 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- Makefile.inc1 | 4 ---- gnu/usr.bin/gdb/Makefile.inc | 1 - gnu/usr.bin/gdb/arch/amd64/Makefile | 2 +- gnu/usr.bin/gdb/arch/amd64/init.c | 2 -- gnu/usr.bin/gdb/arch/arm/Makefile | 2 +- gnu/usr.bin/gdb/arch/arm/init.c | 2 -- gnu/usr.bin/gdb/arch/i386/Makefile | 2 +- gnu/usr.bin/gdb/arch/i386/init.c | 2 -- gnu/usr.bin/gdb/arch/ia64/Makefile | 2 +- gnu/usr.bin/gdb/arch/ia64/init.c | 2 -- gnu/usr.bin/gdb/arch/mips/Makefile | 2 +- gnu/usr.bin/gdb/arch/mips/init.c | 3 ++- gnu/usr.bin/gdb/arch/powerpc/Makefile | 2 +- gnu/usr.bin/gdb/arch/powerpc/init.c | 2 -- gnu/usr.bin/gdb/arch/powerpc64/Makefile | 2 +- gnu/usr.bin/gdb/arch/powerpc64/init.c | 2 -- kerberos5/usr.bin/kadmin/Makefile | 4 ++-- kerberos5/usr.sbin/ktutil/Makefile | 4 ++-- rescue/rescue/Makefile | 4 ++-- sys/fs/ext2fs/ext2_bmap.c | 14 ++++++++------ sys/fs/ext2fs/ext2_extern.h | 2 +- sys/fs/ext2fs/ext2_vnops.c | 10 +++++----- usr.bin/grep/util.c | 4 ++++ 23 files changed, 33 insertions(+), 43 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index ea923726d..b2c0efb35 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -172,11 +172,7 @@ OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH} .endif WORLDTMP= ${OBJTREE}${.CURDIR}/tmp # /usr/games added for fortune which depend on strfile -.if defined(NO_WORLDTMP) -BPATH= ${PATH} -.else BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/usr/games -.endif XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games STRICTTMPPATH= ${BPATH}:${XPATH} TMPPATH= ${STRICTTMPPATH}:${PATH} diff --git a/gnu/usr.bin/gdb/Makefile.inc b/gnu/usr.bin/gdb/Makefile.inc index 0ff6f0173..5b8bb9bae 100644 --- a/gnu/usr.bin/gdb/Makefile.inc +++ b/gnu/usr.bin/gdb/Makefile.inc @@ -45,7 +45,6 @@ CFLAGS+= -I${CNTRB_GDB}/gdb/config CFLAGS+= -I${CNTRB_BU}/include CFLAGS+= -I${CNTRB_GDB}/include CFLAGS+= -I${CNTRB_BU}/bfd -DEBUG_FLAGS= -g -O0 GENSRCS+= nm.h tm.h diff --git a/gnu/usr.bin/gdb/arch/amd64/Makefile b/gnu/usr.bin/gdb/arch/amd64/Makefile index fc03ba4ca..a43e894e7 100644 --- a/gnu/usr.bin/gdb/arch/amd64/Makefile +++ b/gnu/usr.bin/gdb/arch/amd64/Makefile @@ -5,7 +5,7 @@ GENSRCS+= xm.h LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= amd64-nat.c amd64bsd-nat.c amd64fbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= amd64-tdep.c amd64fbsd-tdep.c i386-tdep.c i386bsd-tdep.c \ i386fbsd-tdep-fixed.c i387-tdep.c diff --git a/gnu/usr.bin/gdb/arch/amd64/init.c b/gnu/usr.bin/gdb/arch/amd64/init.c index 99b485d47..1b296f4a9 100644 --- a/gnu/usr.bin/gdb/arch/amd64/init.c +++ b/gnu/usr.bin/gdb/arch/amd64/init.c @@ -12,7 +12,6 @@ extern initialize_file_ftype _initialize_i386fbsd_tdep; extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; -extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -127,7 +126,6 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); diff --git a/gnu/usr.bin/gdb/arch/arm/Makefile b/gnu/usr.bin/gdb/arch/arm/Makefile index f0303ae3d..22aee06a7 100644 --- a/gnu/usr.bin/gdb/arch/arm/Makefile +++ b/gnu/usr.bin/gdb/arch/arm/Makefile @@ -2,7 +2,7 @@ GENSRCS+= xm.h LIBSRCS+= armfbsd-nat.c -LIBSRCS+= arm-tdep.c armfbsd-tdep.c solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= arm-tdep.c armfbsd-tdep.c solib.c solib-svr4.c .if !defined(GDB_CROSS_DEBUGGER) LIBSRCS+= fbsd-threads.c .endif diff --git a/gnu/usr.bin/gdb/arch/arm/init.c b/gnu/usr.bin/gdb/arch/arm/init.c index 6a8965eee..d4064dadd 100644 --- a/gnu/usr.bin/gdb/arch/arm/init.c +++ b/gnu/usr.bin/gdb/arch/arm/init.c @@ -10,7 +10,6 @@ extern initialize_file_ftype _initialize_armfbsd_tdep; extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; -extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -123,7 +122,6 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); diff --git a/gnu/usr.bin/gdb/arch/i386/Makefile b/gnu/usr.bin/gdb/arch/i386/Makefile index 64cc769d5..3d9627890 100644 --- a/gnu/usr.bin/gdb/arch/i386/Makefile +++ b/gnu/usr.bin/gdb/arch/i386/Makefile @@ -5,7 +5,7 @@ GENSRCS+= xm.h LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= i386-nat.c i386bsd-nat.c i386fbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= i386-tdep.c i386bsd-tdep.c i386fbsd-tdep-fixed.c i387-tdep.c nm.h: diff --git a/gnu/usr.bin/gdb/arch/i386/init.c b/gnu/usr.bin/gdb/arch/i386/init.c index 86f73bcf2..7675d8e68 100644 --- a/gnu/usr.bin/gdb/arch/i386/init.c +++ b/gnu/usr.bin/gdb/arch/i386/init.c @@ -11,7 +11,6 @@ extern initialize_file_ftype _initialize_i386fbsd_tdep; extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; -extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -127,7 +126,6 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); diff --git a/gnu/usr.bin/gdb/arch/ia64/Makefile b/gnu/usr.bin/gdb/arch/ia64/Makefile index 626347681..2fe489999 100644 --- a/gnu/usr.bin/gdb/arch/ia64/Makefile +++ b/gnu/usr.bin/gdb/arch/ia64/Makefile @@ -4,7 +4,7 @@ LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= ia64-fbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= ia64-fbsd-tdep.c ia64-tdep.c nm.h: diff --git a/gnu/usr.bin/gdb/arch/ia64/init.c b/gnu/usr.bin/gdb/arch/ia64/init.c index 2fe65e709..ee383e9c9 100644 --- a/gnu/usr.bin/gdb/arch/ia64/init.c +++ b/gnu/usr.bin/gdb/arch/ia64/init.c @@ -10,7 +10,6 @@ extern initialize_file_ftype _initialize_ia64_fbsd_tdep; extern initialize_file_ftype _initialize_ia64_tdep; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; -extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -123,7 +122,6 @@ initialize_all_files (void) _initialize_ia64_tdep (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); diff --git a/gnu/usr.bin/gdb/arch/mips/Makefile b/gnu/usr.bin/gdb/arch/mips/Makefile index f77c9ff70..a6d4d9e14 100644 --- a/gnu/usr.bin/gdb/arch/mips/Makefile +++ b/gnu/usr.bin/gdb/arch/mips/Makefile @@ -3,7 +3,7 @@ .if !defined(GDB_CROSS_DEBUGGER) LIBSRCS+= mipsfbsd-nat.c fbsd-threads.c .endif -LIBSRCS+= solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= mips-tdep.c mipsfbsd-tdep.c fbsd-proc.c nm.h: diff --git a/gnu/usr.bin/gdb/arch/mips/init.c b/gnu/usr.bin/gdb/arch/mips/init.c index 2d6355eab..491b2b3ee 100644 --- a/gnu/usr.bin/gdb/arch/mips/init.c +++ b/gnu/usr.bin/gdb/arch/mips/init.c @@ -121,7 +121,6 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); @@ -134,7 +133,9 @@ initialize_all_files (void) _initialize_infptrace (); _initialize_inftarg (); _initialize_thread_db (); +#if 0 _initialize_svr4_lm (); +#endif #endif _initialize_remote (); _initialize_dcache (); diff --git a/gnu/usr.bin/gdb/arch/powerpc/Makefile b/gnu/usr.bin/gdb/arch/powerpc/Makefile index 237e912f5..fa41a237d 100644 --- a/gnu/usr.bin/gdb/arch/powerpc/Makefile +++ b/gnu/usr.bin/gdb/arch/powerpc/Makefile @@ -4,7 +4,7 @@ LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= ppcfbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= ppc-sysv-tdep.c ppcfbsd-tdep.c rs6000-tdep.c nm.h: diff --git a/gnu/usr.bin/gdb/arch/powerpc/init.c b/gnu/usr.bin/gdb/arch/powerpc/init.c index e9afbb200..5b96bd513 100644 --- a/gnu/usr.bin/gdb/arch/powerpc/init.c +++ b/gnu/usr.bin/gdb/arch/powerpc/init.c @@ -10,7 +10,6 @@ extern initialize_file_ftype _initialize_ppcfbsd_tdep; extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; -extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -123,7 +122,6 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); diff --git a/gnu/usr.bin/gdb/arch/powerpc64/Makefile b/gnu/usr.bin/gdb/arch/powerpc64/Makefile index 237e912f5..fa41a237d 100644 --- a/gnu/usr.bin/gdb/arch/powerpc64/Makefile +++ b/gnu/usr.bin/gdb/arch/powerpc64/Makefile @@ -4,7 +4,7 @@ LIBSRCS+= fbsd-proc.c fbsd-threads.c gcore.c LIBSRCS+= ppcfbsd-nat.c .endif -LIBSRCS+= solib.c solib-svr4.c solib-legacy.c +LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= ppc-sysv-tdep.c ppcfbsd-tdep.c rs6000-tdep.c nm.h: diff --git a/gnu/usr.bin/gdb/arch/powerpc64/init.c b/gnu/usr.bin/gdb/arch/powerpc64/init.c index e9afbb200..5b96bd513 100644 --- a/gnu/usr.bin/gdb/arch/powerpc64/init.c +++ b/gnu/usr.bin/gdb/arch/powerpc64/init.c @@ -10,7 +10,6 @@ extern initialize_file_ftype _initialize_ppcfbsd_tdep; extern initialize_file_ftype _initialize_corelow; extern initialize_file_ftype _initialize_solib; extern initialize_file_ftype _initialize_svr4_solib; -extern initialize_file_ftype _initialize_svr4_lm; extern initialize_file_ftype _initialize_ser_hardwire; extern initialize_file_ftype _initialize_ser_pipe; extern initialize_file_ftype _initialize_ser_tcp; @@ -123,7 +122,6 @@ initialize_all_files (void) _initialize_corelow (); _initialize_solib (); _initialize_svr4_solib (); - _initialize_svr4_lm (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); diff --git a/kerberos5/usr.bin/kadmin/Makefile b/kerberos5/usr.bin/kadmin/Makefile index 060e23056..253c1e810 100644 --- a/kerberos5/usr.bin/kadmin/Makefile +++ b/kerberos5/usr.bin/kadmin/Makefile @@ -29,11 +29,11 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken \ DPADD= ${LIBKADM5CLNT} ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBHX509} \ ${LIBSL} ${LIBROKEN} ${LIBVERS} ${LIBASN1} \ ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \ - ${LIBEDIT} ${LIBNCURSES} ${LDAPDPADD} + ${LIBREADLINE} ${LIBNCURSES} ${LDAPDPADD} LDADD= -lkadm5clnt -lkadm5srv -lhdb -lkrb5 -lhx509 \ ${LIBSL} -lroken ${LIBVERS} -lasn1 \ -lcrypto -lcrypt -lcom_err \ - -ledit -lncurses ${LDAPLDADD} + -lreadline -lncurses ${LDAPLDADD} LDFLAGS=${LDAPLDFLAGS} .include diff --git a/kerberos5/usr.sbin/ktutil/Makefile b/kerberos5/usr.sbin/ktutil/Makefile index 9ac69a6be..5f60afb42 100644 --- a/kerberos5/usr.sbin/ktutil/Makefile +++ b/kerberos5/usr.sbin/ktutil/Makefile @@ -18,10 +18,10 @@ SRCS= add.c \ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/sl -I. DPADD= ${LIBKADM5CLNT} ${LIBKRB5} ${LIBHX509} ${LIBSL} ${LIBROKEN} ${LIBVERS} \ ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} ${LIBCOM_ERR} \ - ${LIBEDIT} ${LIBNCURSES} + ${LIBREADLINE} ${LIBNCURSES} LDADD= -lkadm5clnt -lkrb5 -lhx509 ${LIBSL} -lroken ${LIBVERS} \ -lasn1 -lcrypto -lcrypt -lcom_err \ - -ledit -lncurses + -lreadline -lncurses .include diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index 8bb8f1f71..9eea2394a 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -123,9 +123,9 @@ CRUNCH_LIBS+= -lalias -lcam -lcurses -ldevstat -lipsec CRUNCH_LIBS+= -lipx .endif .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -lnvpair -lzfs -lpthread -luutil -lumem +CRUNCH_LIBS+= -lavl -lnvpair -lpthread -lzfs -luutil -lumem .endif -CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lsbuf -lufs -lz +CRUNCH_LIBS+= -lgeom -lbsdxml -ljail -lkiconv -lmd -lreadline -lsbuf -lufs -lz .if ${MACHINE_CPUARCH} == "i386" CRUNCH_PROGS_sbin+= bsdlabel sconfig fdisk diff --git a/sys/fs/ext2fs/ext2_bmap.c b/sys/fs/ext2fs/ext2_bmap.c index c17bc4bbc..ba8eb6321 100644 --- a/sys/fs/ext2fs/ext2_bmap.c +++ b/sys/fs/ext2fs/ext2_bmap.c @@ -66,6 +66,7 @@ ext2_bmap(ap) int *a_runb; } */ *ap; { + int32_t blkno; int error; /* @@ -77,8 +78,9 @@ ext2_bmap(ap) if (ap->a_bnp == NULL) return (0); - error = ext2_bmaparray(ap->a_vp, ap->a_bn, ap->a_bnp, + error = ext2_bmaparray(ap->a_vp, ap->a_bn, &blkno, ap->a_runp, ap->a_runb); + *ap->a_bnp = blkno; return (error); } @@ -99,8 +101,8 @@ ext2_bmap(ap) int ext2_bmaparray(vp, bn, bnp, runp, runb) struct vnode *vp; - daddr_t bn; - daddr_t *bnp; + int32_t bn; + int32_t *bnp; int *runp; int *runb; { @@ -110,8 +112,8 @@ ext2_bmaparray(vp, bn, bnp, runp, runb) struct mount *mp; struct vnode *devvp; struct indir a[NIADDR+1], *ap; - daddr_t daddr; - daddr_t metalbn; + int32_t daddr; + long metalbn; int error, num, maxrun = 0, bsize; int *nump; @@ -145,7 +147,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb) if (*bnp == 0) { *bnp = -1; } else if (runp) { - daddr_t bnb = bn; + int32_t bnb = bn; for (++bn; bn < NDADDR && *runp < maxrun && is_sequential(ump, ip->i_db[bn - 1], ip->i_db[bn]); ++bn, ++*runp); diff --git a/sys/fs/ext2fs/ext2_extern.h b/sys/fs/ext2fs/ext2_extern.h index 4915c188e..d3ab058ac 100644 --- a/sys/fs/ext2fs/ext2_extern.h +++ b/sys/fs/ext2fs/ext2_extern.h @@ -54,7 +54,7 @@ int ext2_blkatoff(struct vnode *, off_t, char **, struct buf **); void ext2_blkfree(struct inode *, int32_t, long); int32_t ext2_blkpref(struct inode *, int32_t, int, int32_t *, int32_t); int ext2_bmap(struct vop_bmap_args *); -int ext2_bmaparray(struct vnode *, daddr_t, daddr_t *, int *, int *); +int ext2_bmaparray(struct vnode *, int32_t, int32_t *, int *, int *); void ext2_clusteracct(struct m_ext2fs *, char *, int, daddr_t, int); void ext2_dirbad(struct inode *ip, doff_t offset, char *how); void ext2_ei2i(struct ext2fs_dinode *, struct inode *); diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index 4ac8a6d2d..ed862f0ae 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -1429,28 +1429,29 @@ ext2_strategy(ap) struct vnode *vp = ap->a_vp; struct inode *ip; struct bufobj *bo; + int32_t blkno; int error; ip = VTOI(vp); if (vp->v_type == VBLK || vp->v_type == VCHR) panic("ext2_strategy: spec"); if (bp->b_blkno == bp->b_lblkno) { - error = ext2_bmaparray(vp, bp->b_lblkno, &bp->b_blkno, NULL, NULL); + error = ext2_bmaparray(vp, bp->b_lblkno, &blkno, NULL, NULL); + bp->b_blkno = blkno; if (error) { bp->b_error = error; bp->b_ioflags |= BIO_ERROR; bufdone(bp); return (0); } - if (bp->b_blkno == -1) + if ((long)bp->b_blkno == -1) vfs_bio_clrbuf(bp); } - if (bp->b_blkno == -1) { + if ((long)bp->b_blkno == -1) { bufdone(bp); return (0); } bp->b_iooffset = dbtob(bp->b_blkno); - printf("%s: bp->b_iooffset %lld, bp->b_blkno %lld\n", __func__, (long long) bp->b_iooffset, (long long) bp->b_blkno); bo = VFSTOEXT2(vp->v_mount)->um_bo; BO_STRATEGY(bo, bp); return (0); @@ -1751,7 +1752,6 @@ ext2_read(ap) if (bytesinfile < xfersize) xfersize = bytesinfile; - printf("%s: lbn %lld\n", __func__, (long long) lbn); if (lblktosize(fs, nextlbn) >= ip->i_size) error = bread(vp, lbn, size, NOCRED, &bp); else if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c index 379b428ad..4fb12406f 100644 --- a/usr.bin/grep/util.c +++ b/usr.bin/grep/util.c @@ -336,6 +336,10 @@ procline(struct str *l, int nottext) break; } + /* One pass if we are not recording matches */ + if ((color == NULL && !oflag) || qflag || lflag) + break; + if (st == (size_t)pmatch.rm_so) break; /* No matches */ } -- 2.45.0