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>.

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>
Message-Id: 
1 file changed
tree: 9879efa937041f6ab886d808d3f2e9837cb9fac6
  1. audio/
  2. block/
  3. bsd-user/
  4. darwin-user/
  5. fpu/
  6. gdb-xml/
  7. hw/
  8. linux-user/
  9. pc-bios/
  10. slirp/
  11. target-alpha/
  12. target-arm/
  13. target-cris/
  14. target-i386/
  15. target-m68k/
  16. target-microblaze/
  17. target-mips/
  18. target-ppc/
  19. target-sh4/
  20. target-sparc/
  21. tcg/
  22. tests/
  23. .gitignore
  24. a.out.h
  25. acl.c
  26. acl.h
  27. aes.c
  28. aes.h
  29. aio.c
  30. alpha-dis.c
  31. alpha.ld
  32. arm-dis.c
  33. arm-semi.c
  34. arm.ld
  35. balloon.h
  36. block.c
  37. block.h
  38. block_int.h
  39. bswap.h
  40. bt-host.c
  41. bt-host.h
  42. bt-vhci.c
  43. buffered_file.c
  44. buffered_file.h
  45. cache-utils.c
  46. cache-utils.h
  47. Changelog
  48. cmd.c
  49. cmd.h
  50. cocoa.m
  51. CODING_STYLE
  52. configure
  53. console.c
  54. console.h
  55. COPYING
  56. COPYING.LIB
  57. cpu-all.h
  58. cpu-common.h
  59. cpu-defs.h
  60. cpu-exec.c
  61. create_config
  62. cris-dis.c
  63. curses.c
  64. curses_keys.h
  65. cutils.c
  66. d3des.c
  67. d3des.h
  68. def-helper.h
  69. device_tree.c
  70. device_tree.h
  71. dis-asm.h
  72. disas.c
  73. disas.h
  74. dma-helpers.c
  75. dma.h
  76. dyngen-exec.h
  77. elf.h
  78. elf_ops.h
  79. exec-all.h
  80. exec.c
  81. feature_to_c.sh
  82. gdbstub.c
  83. gdbstub.h
  84. gen-icount.h
  85. host-utils.c
  86. host-utils.h
  87. hostregs_helper.h
  88. hpet.h
  89. hppa-dis.c
  90. hppa.ld
  91. hxtool
  92. i386-dis.c
  93. i386.ld
  94. ia64.ld
  95. ioport-user.c
  96. ioport.c
  97. ioport.h
  98. keymaps.c
  99. keymaps.h
  100. kqemu.c
  101. kqemu.h
  102. kvm-all.c
  103. kvm.h
  104. libfdt_env.h
  105. LICENSE
  106. loader.c
  107. m68k-dis.c
  108. m68k-semi.c
  109. m68k.ld
  110. MAINTAINERS
  111. Makefile
  112. Makefile.hw
  113. Makefile.target
  114. microblaze-dis.c
  115. migration-exec.c
  116. migration-tcp.c
  117. migration.c
  118. migration.h
  119. mips-dis.c
  120. mips.ld
  121. module.c
  122. module.h
  123. monitor.c
  124. monitor.h
  125. nbd.c
  126. nbd.h
  127. net-checksum.c
  128. net.c
  129. net.h
  130. osdep.c
  131. osdep.h
  132. pci-ids.txt
  133. posix-aio-compat.c
  134. posix-aio-compat.h
  135. ppc-dis.c
  136. ppc.ld
  137. ppc64.ld
  138. qemu-aio.h
  139. qemu-binfmt-conf.sh
  140. qemu-char.c
  141. qemu-char.h
  142. qemu-common.h
  143. qemu-config.c
  144. qemu-config.h
  145. qemu-doc.texi
  146. qemu-img-cmds.hx
  147. qemu-img.c
  148. qemu-img.texi
  149. qemu-io.c
  150. qemu-lock.h
  151. qemu-log.h
  152. qemu-malloc.c
  153. qemu-monitor.hx
  154. qemu-nbd.c
  155. qemu-nbd.texi
  156. qemu-option.c
  157. qemu-option.h
  158. qemu-options.hx
  159. qemu-sockets.c
  160. qemu-tech.texi
  161. qemu-thread.c
  162. qemu-thread.h
  163. qemu-timer.h
  164. qemu-tool.c
  165. qemu.sasl
  166. qemu_socket.h
  167. readline.c
  168. readline.h
  169. README
  170. rules.mak
  171. s390-dis.c
  172. s390.ld
  173. savevm.c
  174. sdl.c
  175. sdl_keysym.h
  176. sdl_zoom.c
  177. sdl_zoom.h
  178. sdl_zoom_template.h
  179. sh4-dis.c
  180. softmmu-semi.h
  181. softmmu_defs.h
  182. softmmu_exec.h
  183. softmmu_header.h
  184. softmmu_template.h
  185. sparc-dis.c
  186. sparc.ld
  187. sparc64.ld
  188. sys-queue.h
  189. sysemu.h
  190. tap-win32.c
  191. targphys.h
  192. texi2pod.pl
  193. thunk.c
  194. thunk.h
  195. TODO
  196. tool-osdep.c
  197. translate-all.c
  198. uboot_image.h
  199. usb-bsd.c
  200. usb-linux.c
  201. usb-stub.c
  202. VERSION
  203. vgafont.h
  204. vl.c
  205. vnc-auth-sasl.c
  206. vnc-auth-sasl.h
  207. vnc-auth-vencrypt.c
  208. vnc-auth-vencrypt.h
  209. vnc-tls.c
  210. vnc-tls.h
  211. vnc.c
  212. vnc.h
  213. vnc_keysym.h
  214. vnchextile.h
  215. x86_64.ld
  216. x_keymap.c
  217. x_keymap.h