From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NhM0C-00053a-6X for mharc-grub-devel@gnu.org; Tue, 16 Feb 2010 06:54:04 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NhM0A-00052V-Fn for grub-devel@gnu.org; Tue, 16 Feb 2010 06:54:02 -0500 Received: from [140.186.70.92] (port=44757 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NhM08-00051M-De for grub-devel@gnu.org; Tue, 16 Feb 2010 06:54:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NhM07-0005vJ-CQ for grub-devel@gnu.org; Tue, 16 Feb 2010 06:54:00 -0500 Received: from mail-bw0-f219.google.com ([209.85.218.219]:52549) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NhM07-0005vD-5u for grub-devel@gnu.org; Tue, 16 Feb 2010 06:53:59 -0500 Received: by bwz19 with SMTP id 19so3832779bwz.8 for ; Tue, 16 Feb 2010 03:53:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type; bh=TEB3WP8bKabsCrjvBvG1cOLZOLud+lV7luFqbCkCQi4=; b=U5YViKBcmlMjBgbahIn27NNXpRaJaQdADbCqRaMUVx3nChFW4SVovEqgsvaNPONjsP yIrlA3DqUubyD9vqbG7aMgDyYl+YkelQnoarB1n0NCUJPwQxdpOiClKRCbH8SD8+Vgp2 8SXBz8ezYTUraKMbEdsGe3NE6q2CUf5Tez3vI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=wK/MaeWBJFA6YsDVs2IkA6NQHWk94hh8aGlyWHaf8CTqobD7YMlxjr88ARUXfY8hVf Nn51njdT37j41s4DFJbHi2peT86olJsDTypej6hx0A1mPdhvAua7M2qU5bX3DDkQek8/ J0PDQmn95qsFX/DSjUAl4qzA40JaaHVVVOmmg= Received: by 10.204.20.76 with SMTP id e12mr2319749bkb.126.1266321237931; Tue, 16 Feb 2010 03:53:57 -0800 (PST) Received: from debian.bg45.phnet ([81.62.76.105]) by mx.google.com with ESMTPS id 15sm3058649bwz.0.2010.02.16.03.53.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Feb 2010 03:53:56 -0800 (PST) Message-ID: <4B7A874F.7010208@gmail.com> Date: Tue, 16 Feb 2010 12:53:51 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) MIME-Version: 1.0 To: The development of GNU GRUB References: <20100210114021.GF4409@riva.ucam.org> In-Reply-To: <20100210114021.GF4409@riva.ucam.org> X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig6E952A82D7F2952132A12977" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: Colin Watson , Colin King Subject: Re: [PATCH] Trim a few bytes from boot.img X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2010 11:54:03 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6E952A82D7F2952132A12977 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Colin Watson wrote: > A while back, I was looking for eight extra bytes in boot.img so that I= > could put a keyboard modifier check in there, allowing me to avoid > printing "GRUB loading" by default, which my boss^3 has been asking me > for, without crippling debugging in the process. I knew I could find a= > few by shortening error messages (e.g. "Hard Disk" -> "HD"), but I aske= d > Colin King, one of our kernel hackers, if he could find a nicer > approach. He came up with a patch which I massaged a bit into this. > What do people think? > > It seems as if it might be generally useful to have a bit of spare spac= e > in here, although I would certainly appreciate it if people didn't use > it all at once. ;-) > =20 Looks goo. Can you merge it into experimental? > 2010-02-10 Colin King > 2010-02-10 Colin Watson > > Shrink the pre-partition-table part of boot.img by eight bytes. > > * boot/i386/pc/boot.S (ERR): New macro. > (chs_mode): Use ERR. > (geometry_error): Likewise. > (hd_probe_error): Remove. This is only used once, so we wrwite > it inline instead. > (read_error): Instead of printing read_error_string, just set up > %si and fall through to ... > (error_message): ... this new function, also used by ERR. > > =3D=3D=3D modified file 'boot/i386/pc/boot.S' > --- boot/i386/pc/boot.S 2010-01-03 22:05:07 +0000 > +++ boot/i386/pc/boot.S 2010-02-10 11:32:08 +0000 > @@ -27,6 +27,7 @@ > =20 > /* Print message string */ > #define MSG(x) movw $x, %si; call LOCAL(message) > +#define ERR(x) movw $x, %si; jmp LOCAL(error_message) > =20 > .file "boot.S" > =20 > @@ -233,7 +234,7 @@ LOCAL(chs_mode): > jz LOCAL(floppy_probe) > =20 > /* Nope, we definitely have a hard disk, and we're screwed. */ > - jmp LOCAL(hd_probe_error) > + ERR(hd_probe_error_string) > =20 > LOCAL(final_init): > /* set the mode to zero */ > @@ -360,22 +361,15 @@ LOCAL(copy_buffer): > * BIOS Geometry translation error (past the end of the disk geometry!= ). > */ > LOCAL(geometry_error): > - MSG(geometry_error_string) > - jmp LOCAL(general_error) > - > -/* > - * Disk probe failure. > - */ > -LOCAL(hd_probe_error): > - MSG(hd_probe_error_string) > - jmp LOCAL(general_error) > + ERR(geometry_error_string) > =20 > /* > * Read error on the disk. > */ > LOCAL(read_error): > - MSG(read_error_string) > - > + movw $read_error_string, %si > +LOCAL(error_message): > + call LOCAL(message) > LOCAL(general_error): > MSG(general_error_string) > =20 > > Thanks, > > =20 --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig6E952A82D7F2952132A12977 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iF4EAREKAAYFAkt6h08ACgkQNak7dOguQgkYuQD/cQ8nO1Ht2tKVWEoF3VTmuR4U uDhY5XSEsv5ayTfc0fkA/0NEkj9gvmI1lDOBFsqrT2Hoj37Qcyv86FH5wh4EcQA6 =n4BH -----END PGP SIGNATURE----- --------------enig6E952A82D7F2952132A12977--