From d2a58f3aadf33e11bcbc4743cac65d4464447db8 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Sat, 29 Oct 2011 17:01:47 +0000 Subject: sbtools: move sb file production to its own file with a clean api, factor key reading even more git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30851 a1c6a512-1295-4272-9138-f99709370657 --- utils/sbtools/sbtoelf.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'utils/sbtools/sbtoelf.c') diff --git a/utils/sbtools/sbtoelf.c b/utils/sbtools/sbtoelf.c index 3c1c750582..3824ee094e 100644 --- a/utils/sbtools/sbtoelf.c +++ b/utils/sbtools/sbtoelf.c @@ -77,8 +77,6 @@ char *g_out_prefix; bool g_debug; bool g_raw_mode; -#define ROUND_UP(val, round) ((((val) + (round) - 1) / (round)) * (round)) - static uint8_t instruction_checksum(struct sb_instruction_header_t *hdr) { uint8_t sum = 90; @@ -495,7 +493,7 @@ static void extract(unsigned long filesize) print_hex(g_buf, 16, true); /* sections */ - if(strcasecmp(s_getenv("SB_RAW_CMD"), "YES") != 0) + if(!g_raw_mode) { color(BLUE); printf("Sections\n"); @@ -747,9 +745,7 @@ int main(int argc, char **argv) break; case 'k': { - int kac; - key_array_t ka = read_keys(optarg, &kac); - add_keys(ka, kac); + add_keys_from_file(optarg); break; } case 'z': -- cgit v1.2.3