From owner-cvs-src@FreeBSD.ORG Thu Feb 5 13:08:07 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 509C616A4CE; Thu, 5 Feb 2004 13:08:07 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9063743D5C; Thu, 5 Feb 2004 13:07:55 -0800 (PST) (envelope-from iedowse@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i15L7o0B050028; Thu, 5 Feb 2004 13:07:50 -0800 (PST) (envelope-from iedowse@repoman.freebsd.org) Received: (from iedowse@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i15L7oxj050027; Thu, 5 Feb 2004 13:07:50 -0800 (PST) (envelope-from iedowse) Message-Id: <200402052107.i15L7oxj050027@repoman.freebsd.org> From: Ian Dowse Date: Thu, 5 Feb 2004 13:07:50 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sbin/dmesg dmesg.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2004 21:08:07 -0000 iedowse 2004/02/05 13:07:50 PST FreeBSD src repository Modified files: sbin/dmesg dmesg.c Log: Don't print the oldest line in the message buffer if the buffer is full, since that line is almost always incomplete. Make the parsing of <%d> lines more strict. Also simplify the logic a little: - Start off by making the buffer linear so that we don't have to deal with it wrapping around (suggested by bde). - Process line by line rather than byte at a time. Revision Changes Path 1.21 +54 -51 src/sbin/dmesg/dmesg.c