Date: Wed, 11 Mar 2009 10:25:46 -0400 From: Coleman Kane <cokane@FreeBSD.org> To: Poul-Henning Kamp <phk@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r189691 - head/sbin/recoverdisk Message-ID: <1236781546.1906.5.camel@localhost> In-Reply-To: <200903111037.n2BAb2tj093282@svn.freebsd.org> References: <200903111037.n2BAb2tj093282@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1236781546.1906.5.camel>