diff options
author | Amaury Pouly <pamaury@rockbox.org> | 2011-04-17 01:43:48 +0000 |
---|---|---|
committer | Amaury Pouly <pamaury@rockbox.org> | 2011-04-17 01:43:48 +0000 |
commit | e2f8fbfb166720529dd8ccab82dd0eca21cc7f61 (patch) | |
tree | e43f8b4745e8b4efbd43d38a984bcb16de892700 /utils | |
parent | f6208bde4630571ae75a43ea39a25a746f08bcfb (diff) | |
download | rockbox-e2f8fbfb166720529dd8ccab82dd0eca21cc7f61.tar.gz rockbox-e2f8fbfb166720529dd8ccab82dd0eca21cc7f61.zip |
sbtools: update Makefile; fix whitespaces
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29734 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils')
-rw-r--r-- | utils/sbtools/Makefile | 11 | ||||
-rw-r--r-- | utils/sbtools/sb.h | 4 | ||||
-rw-r--r-- | utils/sbtools/sbtoelf.c | 10 |
3 files changed, 12 insertions, 13 deletions
diff --git a/utils/sbtools/Makefile b/utils/sbtools/Makefile index 9427eaf875..e8bb68aadd 100644 --- a/utils/sbtools/Makefile +++ b/utils/sbtools/Makefile | |||
@@ -1,9 +1,10 @@ | |||
1 | TGT = sbinfo | 1 | all: elftosb sbtoelf |
2 | 2 | ||
3 | all: $(TGT) | 3 | sbtoelf: sbtoelf.c crc.c crypto.h aes128.c sha1.c elf.c sb.h |
4 | gcc -g -std=c99 -o $@ -W -Wall $^ | ||
4 | 5 | ||
5 | $(TGT): sbinfo.c crc.c crypto.h aes128.c sha1.c elf.c | 6 | elftosb: elftosb.c crc.c crypto.h aes128.c sha1.c elf.c sb.h |
6 | $(CC) -g -std=c99 -o $(TGT) -W -Wall sbinfo.c aes128.c crc.c sha1.c elf.c | 7 | gcc -g -std=c99 -o $@ -W -Wall $^ |
7 | 8 | ||
8 | clean: | 9 | clean: |
9 | rm -fr $(TGT) | 10 | rm -fr elftosb sbtoelf |
diff --git a/utils/sbtools/sb.h b/utils/sbtools/sb.h index 29b7d7d894..be25b4bf88 100644 --- a/utils/sbtools/sb.h +++ b/utils/sbtools/sb.h | |||
@@ -19,9 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #define _ISOC99_SOURCE /* snprintf() */ | 22 | #include <stdint.h> |
23 | #include <sys/types.h> | ||
24 | #include <sys/stat.h> | ||
25 | 23 | ||
26 | #define BLOCK_SIZE 16 | 24 | #define BLOCK_SIZE 16 |
27 | 25 | ||
diff --git a/utils/sbtools/sbtoelf.c b/utils/sbtools/sbtoelf.c index 632c4b3eb9..3eb168ddd1 100644 --- a/utils/sbtools/sbtoelf.c +++ b/utils/sbtools/sbtoelf.c | |||
@@ -78,9 +78,9 @@ const char *key_file; | |||
78 | 78 | ||
79 | void *xmalloc(size_t s) /* malloc helper, used in elf.c */ | 79 | void *xmalloc(size_t s) /* malloc helper, used in elf.c */ |
80 | { | 80 | { |
81 | void * r = malloc(s); | 81 | void * r = malloc(s); |
82 | if(!r) bugp("malloc"); | 82 | if(!r) bugp("malloc"); |
83 | return r; | 83 | return r; |
84 | } | 84 | } |
85 | 85 | ||
86 | static void print_hex(byte *data, int len, bool newline) | 86 | static void print_hex(byte *data, int len, bool newline) |
@@ -91,7 +91,7 @@ static void print_hex(byte *data, int len, bool newline) | |||
91 | printf("\n"); | 91 | printf("\n"); |
92 | } | 92 | } |
93 | 93 | ||
94 | int convxdigit(char digit, byte *val) | 94 | static int convxdigit(char digit, byte *val) |
95 | { | 95 | { |
96 | if(digit >= '0' && digit <= '9') | 96 | if(digit >= '0' && digit <= '9') |
97 | { | 97 | { |
@@ -495,7 +495,7 @@ static void extract(unsigned long filesize) | |||
495 | int encrypted = !(sec_hdr->flags & SECTION_CLEARTEXT); | 495 | int encrypted = !(sec_hdr->flags & SECTION_CLEARTEXT); |
496 | 496 | ||
497 | color(GREEN); | 497 | color(GREEN); |
498 | printf(" Chunk "); | 498 | printf(" Section "); |
499 | color(YELLOW); | 499 | color(YELLOW); |
500 | printf("'%s'\n", name); | 500 | printf("'%s'\n", name); |
501 | color(GREEN); | 501 | color(GREEN); |