diff options
author | whitequark <whitequark@whitequark.org> | 2020-06-24 19:57:22 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2020-06-24 19:57:22 +0000 |
commit | a4b1194b3a2cef4e94ce8e7ba011b8ef9a437a29 (patch) | |
tree | e0f93d2b9c57fb842803bcb2522970cedb91f442 | |
parent | cd2610e0fa1c6a90e8e4e4cfe06db1b474e752bb (diff) | |
download | icestorm-a4b1194b3a2cef4e94ce8e7ba011b8ef9a437a29.tar.gz icestorm-a4b1194b3a2cef4e94ce8e7ba011b8ef9a437a29.tar.bz2 icestorm-a4b1194b3a2cef4e94ce8e7ba011b8ef9a437a29.zip |
icepack: show program name in usage.
-rw-r--r-- | icepack/icepack.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/icepack/icepack.cc b/icepack/icepack.cc index 490bbbf..565d5f9 100644 --- a/icepack/icepack.cc +++ b/icepack/icepack.cc @@ -1331,10 +1331,10 @@ void BramIndexConverter::get_bram_index(int bit_x, int bit_y, int &bram_bank, in // ================================================================== // Main program -void usage() +void usage(const char *cmd) { log("\n"); - log("Usage: icepack [options] [input-file [output-file]]\n"); + log("Usage: %s [options] [input-file [output-file]]\n", cmd); log("\n"); log(" -u\n"); log(" unpack mode (implied when called as 'iceunpack')\n"); @@ -1426,7 +1426,7 @@ int main(int argc, char **argv) } else if (arg[i] == 'n') { skip_bram_initialization = true; } else - usage(); + usage(argv[0]); continue; } @@ -1458,7 +1458,7 @@ int main(int argc, char **argv) } if (parameters.size() > 2) - usage(); + usage(argv[0]); FpgaConfig fpga_config; |