From owner-svn-src-head@FreeBSD.ORG Wed Mar 11 14:27:20 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 ACD941065688 for ; Wed, 11 Mar 2009 14:27:20 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from mail-out2.fuse.net (mail-out2.fuse.net [216.68.8.171]) by mx1.freebsd.org (Postfix) with ESMTP id 6680F8FC2A for ; Wed, 11 Mar 2009 14:27:20 +0000 (UTC) (envelope-from cokane@FreeBSD.org) X-CNFS-Analysis: v=1.0 c=1 a=iN0ZH7lpZ6IA:10 a=Hkso0HQtS48A:10 a=6I5d2MoRAAAA:8 a=gc_eYPclRjOCZIDIgsYA:9 a=-WD4RW5RINnYu1z37KsA:7 a=caVS4gsAzbbO0KR1ksb2SZCsdtIA:4 a=LY0hPdMaydYA:10 a=DZTxF9fASv3EVdVCP7wA:9 a=Xno9aq8Plulj1ZE4s1aBbDpa-mcA:4 a=rPt6xJ-oxjAA:10 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Authentication-Results: gwout2 smtp.mail=cokane@FreeBSD.org; spf=softfail Received-SPF: softfail (gwout2: transitional domain FreeBSD.org does not designate 74.215.227.9 as permitted sender) Received: from [74.215.227.9] ([74.215.227.9:50501] helo=discordia) by gwout2 (envelope-from ) (ecelerity 2.2.2.37 r(28805/28810M)) with ESMTP id 16/FE-12703-74AC7B94; Wed, 11 Mar 2009 10:27:19 -0400 Received: by discordia (Postfix, from userid 103) id 94C7435A7D8; Wed, 11 Mar 2009 10:27:18 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.1.8-gr1 (2007-02-13) on discordia X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8-gr1 Received: from [172.31.1.6] (unknown [172.31.1.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by discordia (Postfix) with ESMTP id 95EA635A7D9; Wed, 11 Mar 2009 10:27:04 -0400 (EDT) From: Coleman Kane To: Poul-Henning Kamp In-Reply-To: <200903111037.n2BAb2tj093282@svn.freebsd.org> References: <200903111037.n2BAb2tj093282@svn.freebsd.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-7BbJhmSH/KFHHR4R0DV1" Organization: FreeBSD Project Date: Wed, 11 Mar 2009 10:25:46 -0400 Message-Id: <1236781546.1906.5.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.24.4 FreeBSD GNOME Team Port Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r189691 - head/sbin/recoverdisk 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: Wed, 11 Mar 2009 14:27:22 -0000 --=-7BbJhmSH/KFHHR4R0DV1 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2009-03-11 at 10:37 +0000, Poul-Henning Kamp wrote: > Author: phk > Date: Wed Mar 11 10:37:02 2009 > New Revision: 189691 > URL: http://svn.freebsd.org/changeset/base/189691 >=20 > Log: > Some improvements to recoverdisk >=20 > Modified: > head/sbin/recoverdisk/recoverdisk.1 > head/sbin/recoverdisk/recoverdisk.c >=20 < ... snip ... > >=20 > Modified: head/sbin/recoverdisk/recoverdisk.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sbin/recoverdisk/recoverdisk.c Wed Mar 11 09:57:11 2009 (r189690= ) > +++ head/sbin/recoverdisk/recoverdisk.c Wed Mar 11 10:37:02 2009 (r189691= ) < ... snip ... > > @@ -215,6 +213,17 @@ main(int argc, char * const argv[]) > flags |=3D O_CREAT | O_TRUNC; > } > =20 > + if (bigsize < minsize) > + bigsize =3D minsize; > + > + for (ch =3D 0; (bigsize >> ch) > minsize; ch++) > + continue; > + medsize =3D bigsize >> (ch / 2); > + medsize =3D (medsize / minsize) * minsize; > + > + fprintf(stderr, "Bigsize =3D %u, medsize =3D %u, minsize =3D %u\n", > + bigsize, medsize, minsize); > + > buf =3D malloc(bigsize); > if (buf =3D=3D NULL) > err(1, "Cannot allocate %jd bytes buffer", (intmax_t)bigsize); > =20 That new fprintf warns in the case where sizeof(size_t) !=3D sizeof(unsigned int), such as is the case on amd64. --=20 Coleman Kane --=-7BbJhmSH/KFHHR4R0DV1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAkm3yeMACgkQcMSxQcXat5e+qwCbBt2KBvcccG5lqBVs3FpnpIlB bzgAnRDv7LDPv1FdmQRRb8oJ75G048x/ =xJr5 -----END PGP SIGNATURE----- --=-7BbJhmSH/KFHHR4R0DV1--