From owner-freebsd-current@FreeBSD.ORG Fri Oct 22 13:37:06 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 172F31065693 for ; Fri, 22 Oct 2010 13:37:06 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id C5C838FC1C for ; Fri, 22 Oct 2010 13:37:05 +0000 (UTC) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 137C99CB080 for ; Fri, 22 Oct 2010 15:37:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by lev.vlakno.cz (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dP-B7Rn4PzVi for ; Fri, 22 Oct 2010 15:37:02 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 627529CB432 for ; Fri, 22 Oct 2010 15:37:02 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.4/8.14.4/Submit) id o9MDb2h0023535 for current@freebsd.org; Fri, 22 Oct 2010 15:37:02 +0200 (CEST) (envelope-from rdivacky) Date: Fri, 22 Oct 2010 15:37:02 +0200 From: Roman Divacky To: current@freebsd.org Message-ID: <20101022133702.GA22912@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3MwIy2ne0vdjdPXF" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: [PATCH]: boot2 optimizations to shrink it X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2010 13:37:06 -0000 --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, can you guys review this patch: http://lev.vlakno.cz/~rdivacky/boot2.safe.patch It shrinks boot2 by 52 bytes by: eliminating memcpy() calls buffer shrinking as we are only ever called with argument < 256 for the %u modifier constifying write-only variable Rui Paulo tested this, is this patch ok? May I commit this? thank you, roman --3MwIy2ne0vdjdPXF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkzBk34ACgkQLVEj6D3CBEz/7ACbBO1YrWsbcHa2C12CBHNPlMbl 9SoAn3/3GPZP+Lr9A/nSRo+UDDCh56bN =PbfE -----END PGP SIGNATURE----- --3MwIy2ne0vdjdPXF--