OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. | 2 * Copyright (C) 2010 Google Inc. |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 const char *optstring = "hf:E:s:p:i:lO"; | 558 const char *optstring = "hf:E:s:p:i:lO"; |
559 static struct option long_options[] = { | 559 static struct option long_options[] = { |
560 {"help", 0, 0, 'h'}, | 560 {"help", 0, 0, 'h'}, |
561 {"file", 0, 0, 'f'}, | 561 {"file", 0, 0, 'f'}, |
562 {"epsbase", 0, 0, 'E'}, | 562 {"epsbase", 0, 0, 'E'}, |
563 {"string", 0, 0, 's'}, | 563 {"string", 0, 0, 's'}, |
564 {"pad", 0, 0, 'p'}, | 564 {"pad", 0, 0, 'p'}, |
565 {"partition", 0, 0, 'i'}, | 565 {"partition", 0, 0, 'i'}, |
566 {"list", 0, 0, 'l'}, | 566 {"list", 0, 0, 'l'}, |
567 {"overwrite", 0, 0, 'O'}, | 567 {"overwrite", 0, 0, 'O'}, |
| 568 {0, 0, 0, 0} |
568 }; | 569 }; |
569 char *filename = NULL; | 570 char *filename = NULL; |
570 int write_back_to_flash = 0; | 571 int write_back_to_flash = 0; |
571 int list_it = 0; | 572 int list_it = 0; |
572 int overwrite_it = 0; | 573 int overwrite_it = 0; |
573 int modified = 0; | 574 int modified = 0; |
574 int fd; | 575 int fd; |
575 | 576 |
576 initContainer(&file); | 577 initContainer(&file); |
577 initContainer(&argument); | 578 initContainer(&argument); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 } | 714 } |
714 | 715 |
715 teardown: | 716 teardown: |
716 if (spd_data) free(spd_data); | 717 if (spd_data) free(spd_data); |
717 if (filename) free(filename); | 718 if (filename) free(filename); |
718 destroyContainer(&file); | 719 destroyContainer(&file); |
719 destroyContainer(&argument); | 720 destroyContainer(&argument); |
720 | 721 |
721 return retval; | 722 return retval; |
722 } | 723 } |
OLD | NEW |