coreboot-kgpe-d16/util/mkelfImage/util/bin-to-hex.c
Stefan Reinauer b34eea348c Importing mkelfimage from
ftp://ftp.lnxi.com/pub/mkelfImage/mkelfImage-2.7.tar.gz

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3103 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2008-02-15 18:16:06 +00:00

20 lines
262 B
C

#include <stdio.h>
int main(int argc, char **argv)
{
int c;
int i;
i = 0;
while((c = getchar()) != EOF) {
if ((i % 16) != 0) {
putchar(' ');
}
printf("0x%02x,", c);
i++;
if ((i %16) == 0) {
putchar('\n');
}
}
putchar('\n');
return 0;
}