From owner-svn-src-head@FreeBSD.ORG Tue May 26 09:02:17 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D1D8106566B; Tue, 26 May 2009 09:02:17 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206045082.chello.pl [87.206.45.82]) by mx1.freebsd.org (Postfix) with ESMTP id 482058FC0C; Tue, 26 May 2009 09:02:12 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id ED1DC45CAC; Tue, 26 May 2009 10:30:14 +0200 (CEST) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id F2C3E4569A; Tue, 26 May 2009 10:30:08 +0200 (CEST) Date: Tue, 26 May 2009 10:30:12 +0200 From: Pawel Jakub Dawidek To: Ulf Lilleengen Message-ID: <20090526083011.GB1491@garage.freebsd.pl> References: <200905260729.n4Q7TIDL050084@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tjCHc7DPkfUGtrlw" Content-Disposition: inline In-Reply-To: <200905260729.n4Q7TIDL050084@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r192797 - head/sys/geom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2009 09:02:17 -0000 --tjCHc7DPkfUGtrlw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 26, 2009 at 07:29:18AM +0000, Ulf Lilleengen wrote: > Author: lulf > Date: Tue May 26 07:29:17 2009 > New Revision: 192797 > URL: http://svn.freebsd.org/changeset/base/192797 >=20 > Log: > - Add 'show bio' DDB command. > =20 > MFC after: 3 weeks >=20 > Modified: > head/sys/geom/geom_subr.c [...] > +static void > +db_print_bio_flags(struct bio *bp) > +{ > + int comma; > + > + comma =3D 0; > + printf(" flags: "); > + if (bp->bio_flags & BIO_ERROR) { > + printf("BIO_ERROR"); > + comma =3D 1; > + } > + if (bp->bio_flags & BIO_DONE) { > + printf("%sBIO_ERROR", (comma ? ", " : "")); I think you wanted BIO_DONE here. > +/* > + * Print useful information in a BIO > + */ > +DB_SHOW_COMMAND(bio, db_show_bio) > +{ > + struct bio *bp; > + > + if (have_addr) { > + bp =3D (struct bio *)addr; > + printf("BIO %p\n", bp); > + db_print_bio_cmd(bp); > + db_print_bio_flags(bp); > + printf(" cflags: 0x%hhx\n", bp->bio_cflags); > + printf(" pflags: 0x%hhx\n", bp->bio_pflags); > + printf(" offset: %lld\n", bp->bio_offset); > + printf(" length: %lld\n", bp->bio_length); > + printf(" bcount: %ld\n", bp->bio_bcount); > + printf(" resid: %ld\n", bp->bio_resid); > + printf(" completed: %lld\n", bp->bio_completed); > + printf(" children: %u\n", bp->bio_children); > + printf(" inbed: %u\n", bp->bio_inbed); > + printf(" error: %d\n", bp->bio_error); > + printf(" parent: %p\n", bp->bio_parent); > + printf(" driver1: %p\n", bp->bio_driver1); > + printf(" driver2: %p\n", bp->bio_driver2); > + printf(" caller1: %p\n", bp->bio_caller1); > + printf(" caller2: %p\n", bp->bio_caller2); > + printf(" bio_from: %p\n", bp->bio_from); > + printf(" bio_to: %p\n", bp->bio_to); > + } > +} In DDB functions you should use db_printf() instead of printf(). --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --tjCHc7DPkfUGtrlw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKG6iSForvXbEpPzQRAsuQAJ9l/RuwTaIfTc309YPqYG94yE354gCg34wW 7ENtPCpwRu1O4ESdljEpP9I= =kE2V -----END PGP SIGNATURE----- --tjCHc7DPkfUGtrlw--