From owner-freebsd-current@FreeBSD.ORG Thu Jul 28 14:09:35 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CB7F106564A for ; Thu, 28 Jul 2011 14:09:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 55EBF8FC1F for ; Thu, 28 Jul 2011 14:09:33 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA24652 for ; Thu, 28 Jul 2011 17:09:32 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4E316D9C.6060007@FreeBSD.org> Date: Thu, 28 Jul 2011 17:09:32 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110705 Thunderbird/5.0 MIME-Version: 1.0 To: freebsd-current@FreeBSD.org X-Enigmail-Version: 1.2pre Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: oddities with fgrep X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2011 14:09:35 -0000 $ fgrep -w -r CS drm ... drm/include/drm/drm_mode.h:#define DRM_MODE_FLAG_NCSYNC (1<<8) $ fgrep -w -r CSY drm ... drm/include/drm/drm_mode.h:#define DRM_MODE_FLAG_NCSYNC (1<<8) $ fgrep -w -r CSYN drm (exit 1) $ fgrep -w -r NCS drm (exit 1) $ fgrep -w CS drm/include/drm/drm_mode.h (exit 1) So looks like a potential bug in some optimization. -w works correctly without -r. With -r it works correctly for some substrings, but not for others. -- Andriy Gapon