Fix checksum writing in signboot.shqemu-0.10.91-0.4.rc1.fc12
commitee595f99ba7ff80b46a736a06f7e53998d926563
authorAlexander Graf <agraf@suse.de>
Sat, 1 Aug 2009 09:48:31 +0000 (1 11:48 +0200)
committerMark McLoughlin <markmc@redhat.com>
Tue, 4 Aug 2009 14:43:12 +0000 (4 15:43 +0100)
treea18d0675cfc7fc2154e72d5ac9b540ba611ff386
parent729b681039015c718e476b8f294480b179ed726d
Fix checksum writing in signboot.sh

The printf command takes an octal value after \, so we have to convert
our decimal representation to octal first and then write it.

This unbreaks extboot signing. Multiboot wasn't affected yet because
the checksum was < 8.

Spotted and first patch by Glauber Costa <glommer@redhat.com>.
Printf idea by Paolo Bonzini <bonzini@gnu.org>.

(cherry picked from commit d8b69b34761f7b3fb8f476712b631d1dd3f1b2a5)

Signed-off-by: Alexander Graf <agraf@suse.de>
CC: Glauber Costa <glommer@redhat.com>
CC: Paolo Bonzini <bonzini@gnu.org>
CC: Jan Ondrej <ondrejj@salstar.sk>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Fedora-patch: qemu-fix-extboot-signrom.patch
pc-bios/optionrom/signrom.sh