Skip to content

Commit

Permalink
hwloc-diff: fix usage of --refname
Browse files Browse the repository at this point in the history
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
(cherry picked from commit e23fff6)
  • Loading branch information
bgoglin committed Nov 23, 2018
1 parent b3786a5 commit d62b502
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions utils/hwloc/hwloc-diff.c
Expand Up @@ -13,9 +13,9 @@ void usage(const char *callname __hwloc_attribute_unused, FILE *where)
{
fprintf(where, "Usage: hwloc-diff [options] <old.xml> <new.xml> [<output.diff.xml>]\n");
fprintf(where, "Options:\n");
fprintf(where, " --refname Change the XML reference identifier in the output\n");
fprintf(where, " (default is the filename of the first topology\n");
fprintf(where, " --version Report version and exit\n");
fprintf(where, " --refname <name> Change the XML reference identifier to <name> in the output\n");
fprintf(where, " (default is the filename of the first topology\n");
fprintf(where, " --version Report version and exit\n");
}

int main(int argc, char *argv[])
Expand All @@ -37,6 +37,10 @@ int main(int argc, char *argv[])

while (argc && *argv[0] == '-') {
if (!strcmp (argv[0], "--refname")) {
if (argc < 2) {
usage(callname, stderr);
exit(EXIT_FAILURE);
}
refname = argv[1];
argc--;
argv++;
Expand Down

0 comments on commit d62b502

Please sign in to comment.