diff options
author | norly <ny-git@enpas.org> | 2013-02-22 16:51:58 +0000 |
---|---|---|
committer | norly <ny-git@enpas.org> | 2013-02-22 16:51:58 +0000 |
commit | 5019a1c2a261d5e55a42090612f9748f82404108 (patch) | |
tree | 8a19495a8c1b88674228c0f7b23207f330e05a81 /src | |
parent | 00109bea051ebb16f337c078c96e3492ea4a764b (diff) |
Remove --copy, do it whenever we have -o
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 26 | ||||
-rw-r--r-- | src/options.c | 5 |
2 files changed, 10 insertions, 21 deletions
@@ -59,26 +59,20 @@ int main(int argc, char **argv) } - /* Copy the input ELF to the output file */ - if (!opts.fnOutput) { - if (opts.copy) { - fprintf(stderr, "Error: Missing output file name for requested operation.\n"); - } - } else { - if (opts.copy) { - ElfuElf *me; + /* Copy the input ELF to the output file if the latter is specified */ + if (opts.fnOutput) { + ElfuElf *me; - me = elfu_modelFromElf(hIn.e); + me = elfu_modelFromElf(hIn.e); - if (me) { - printf("Model successfully loaded.\n"); + if (me) { + printf("Model successfully loaded.\n"); - elfu_modelToElf(me, hOut.e); + elfu_modelToElf(me, hOut.e); - printf("Model converted to ELF, ready to be written.\n"); - } else { - printf("Failed to load model.\n"); - } + printf("Model converted to ELF, ready to be written.\n"); + } else { + printf("Failed to load model.\n"); } } diff --git a/src/options.c b/src/options.c index 3975bad..1b258fe 100644 --- a/src/options.c +++ b/src/options.c @@ -18,7 +18,6 @@ static void printUsage(char *progname) " --print-segments Print program headers\n" " --print-sections Print sections\n" "\n" - " --copy Copy input to output\n" "\n"); } @@ -36,7 +35,6 @@ void parseOptions(CLIOpts *opts, int argc, char **argv) {"print-header", 0, 0, 10001}, {"print-segments", 0, 0, 10002}, {"print-sections", 0, 0, 10003}, - {"copy", 0, 0, 10004}, {NULL, 0, NULL, 0} }; @@ -58,9 +56,6 @@ void parseOptions(CLIOpts *opts, int argc, char **argv) case 10003: opts->printSections = 1; break; - case 10004: - opts->copy = 1; - break; case '?': default: goto USAGE; |