summaryrefslogtreecommitdiff
path: root/utils/imxtools/sbtools/sbtoelf.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/imxtools/sbtools/sbtoelf.c')
-rw-r--r--utils/imxtools/sbtools/sbtoelf.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/utils/imxtools/sbtools/sbtoelf.c b/utils/imxtools/sbtools/sbtoelf.c
index c1d1e9aa34..0170ea1836 100644
--- a/utils/imxtools/sbtools/sbtoelf.c
+++ b/utils/imxtools/sbtools/sbtoelf.c
@@ -169,6 +169,7 @@ static void usage(void)
169 printf(" -a/--add-key <key>\tAdd single key (hex or usbotp)\n"); 169 printf(" -a/--add-key <key>\tAdd single key (hex or usbotp)\n");
170 printf(" -n/--no-color\tDisable output colors\n"); 170 printf(" -n/--no-color\tDisable output colors\n");
171 printf(" -l/--loopback <file>\tProduce sb file out of extracted description*\n"); 171 printf(" -l/--loopback <file>\tProduce sb file out of extracted description*\n");
172 printf(" -f/--force\tForce reading even without a key*\n");
172 printf("Options marked with a * are for debug purpose only\n"); 173 printf("Options marked with a * are for debug purpose only\n");
173 exit(1); 174 exit(1);
174} 175}
@@ -204,10 +205,11 @@ int main(int argc, char **argv)
204 {"add-key", required_argument, 0, 'a'}, 205 {"add-key", required_argument, 0, 'a'},
205 {"no-color", no_argument, 0, 'n'}, 206 {"no-color", no_argument, 0, 'n'},
206 {"loopback", required_argument, 0, 'l'}, 207 {"loopback", required_argument, 0, 'l'},
208 {"force", no_argument, 0, 'f' },
207 {0, 0, 0, 0} 209 {0, 0, 0, 0}
208 }; 210 };
209 211
210 int c = getopt_long(argc, argv, "?do:k:zra:nl:", long_options, NULL); 212 int c = getopt_long(argc, argv, "?do:k:zra:nl:f", long_options, NULL);
211 if(c == -1) 213 if(c == -1)
212 break; 214 break;
213 switch(c) 215 switch(c)
@@ -231,6 +233,9 @@ int main(int argc, char **argv)
231 case 'o': 233 case 'o':
232 g_out_prefix = optarg; 234 g_out_prefix = optarg;
233 break; 235 break;
236 case 'f':
237 g_force = true;
238 break;
234 case 'k': 239 case 'k':
235 { 240 {
236 if(!add_keys_from_file(optarg)) 241 if(!add_keys_from_file(optarg))
@@ -250,9 +255,9 @@ int main(int argc, char **argv)
250 struct crypto_key_t key; 255 struct crypto_key_t key;
251 char *s = optarg; 256 char *s = optarg;
252 if(!parse_key(&s, &key)) 257 if(!parse_key(&s, &key))
253 bug("Invalid key specified as argument"); 258 bug("Invalid key specified as argument\n");
254 if(*s != 0) 259 if(*s != 0)
255 bug("Trailing characters after key specified as argument"); 260 bug("Trailing characters after key specified as argument\n");
256 add_keys(&key, 1); 261 add_keys(&key, 1);
257 break; 262 break;
258 } 263 }