From owner-cvs-src@FreeBSD.ORG Sat Jul 2 19:57:31 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org 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 CBB8516A41C; Sat, 2 Jul 2005 19:57:31 +0000 (GMT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5B2243D49; Sat, 2 Jul 2005 19:57:31 +0000 (GMT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j62JvVkw011085; Sat, 2 Jul 2005 19:57:31 GMT (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j62JvVhP011084; Sat, 2 Jul 2005 19:57:31 GMT (envelope-from marcel) Message-Id: <200507021957.j62JvVhP011084@repoman.freebsd.org> From: Marcel Moolenaar Date: Sat, 2 Jul 2005 19:57:31 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/amd64/amd64 dump_machdep.c src/sys/i386/i386 dump_machdep.c src/sys/ia64/ia64 dump_machdep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 02 Jul 2005 19:57:31 -0000 marcel 2005-07-02 19:57:31 UTC FreeBSD src repository Modified files: sys/amd64/amd64 dump_machdep.c sys/i386/i386 dump_machdep.c sys/ia64/ia64 dump_machdep.c Log: Fix a buglet that was present in the ia64 code and that got inherited by amd64 and i386: For buffered writes we collect data and write it out a ${DEV_BSIZE}-sized block at a time. The fragsz variable is used to keep track of how much data we have collected in the buffer so far and it's reset to zero immediately after writing a block to the dump device. When the last, possibly partially filled buffer is flushed, we didn't reset fragsz to 0 and as such would stop reflecting reality. Since we currently only need to do buffered writes once, this isn't a problem. However, when kernel dumps are made by hand (say by callling doadump from within DDB), the improperly cleared state from the first call to dumpsys causes the next call to dumpsys to create an invalid code file. This change resets fragsz after flushing the partially filled buffer so that it fixes the two problems at once. Approved by: re (scottl) Revision Changes Path 1.11 +1 -0 src/sys/amd64/amd64/dump_machdep.c 1.11 +1 -0 src/sys/i386/i386/dump_machdep.c 1.13 +1 -0 src/sys/ia64/ia64/dump_machdep.c