Skip to content

Commit

Permalink
utils: show -h --help in usage
Browse files Browse the repository at this point in the history
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Apr 26, 2021
1 parent 181ae97 commit 1b8937c
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions utils/hwloc/hwloc-annotate.c
Expand Up @@ -35,6 +35,7 @@ void usage(const char *callname __hwloc_attribute_unused, FILE *where)
fprintf(where, " --cu\tClear existing userdata\n");
fprintf(where, " --cd\tClear existing distances\n");
fprintf(where, " --version\tReport version and exit\n");
fprintf(where, " -h --help\tShow this usage\n");
}

static char *infoname = NULL, *infovalue = NULL;
Expand Down
1 change: 1 addition & 0 deletions utils/hwloc/hwloc-bind.c
Expand Up @@ -64,6 +64,7 @@ void usage(const char *name, FILE *where)
fprintf(where, " -q --quiet Hide non-fatal error messages\n");
fprintf(where, " -v --verbose Show verbose messages\n");
fprintf(where, " --version Report version and exit\n");
fprintf(where, " -h --help Show this usage\n");
}

int main(int argc, char *argv[])
Expand Down
1 change: 1 addition & 0 deletions utils/hwloc/hwloc-calc.c
Expand Up @@ -61,6 +61,7 @@ void usage(const char *callname __hwloc_attribute_unused, FILE *where)
fprintf(where, " -q --quiet Hide non-fatal error messages\n");
fprintf(where, " -v --verbose Show verbose messages\n");
fprintf(where, " --version Report version and exit\n");
fprintf(where, " -h --help Show this usage\n");
}

static int verbose = 0;
Expand Down
1 change: 1 addition & 0 deletions utils/hwloc/hwloc-compress-dir.in
Expand Up @@ -31,6 +31,7 @@ usage()
echo " -R --reverse Uncompress instead of compressing"
echo " -v --verbose Display verbose messages"
echo " --version Report version and exit"
echo " -h --help Show this usage"
}

while test $# -gt 0 ; do
Expand Down
1 change: 1 addition & 0 deletions utils/hwloc/hwloc-diff.c
Expand Up @@ -15,6 +15,7 @@ void usage(const char *callname __hwloc_attribute_unused, FILE *where)
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");
fprintf(where, " -h --help Show this usage\n");
}

int main(int argc, char *argv[])
Expand Down
1 change: 1 addition & 0 deletions utils/hwloc/hwloc-distrib.c
Expand Up @@ -35,6 +35,7 @@ void usage(const char *callname __hwloc_attribute_unused, FILE *where)
fprintf(where, "Miscellaneous options:\n");
fprintf(where, " -v --verbose Show verbose messages\n");
fprintf(where, " --version Report version and exit\n");
fprintf(where, " -h --help Show this usage\n");
}

int main(int argc, char *argv[])
Expand Down
1 change: 1 addition & 0 deletions utils/hwloc/hwloc-dump-hwdata.c
Expand Up @@ -28,6 +28,7 @@ static void usage(const char *name, FILE *where)
fprintf (where, "Options:\n");
fprintf (where, " -o <dir> Output files to directory <dir> instead of " DEFAULT_DUMP_DIR "\n");
fprintf (where, " --version Report version and exit\n");
fprintf (where, " -h --help Show this usage\n");
}

int main(int argc, char *argv[])
Expand Down
1 change: 1 addition & 0 deletions utils/hwloc/hwloc-gather-topology.in
Expand Up @@ -55,6 +55,7 @@ usage()
echo " --no-cpuid Do not gather x86 CPUID using hwloc-gather-cpuid"
echo " --keep Keep the temporary copy of dumped files"
echo " --version Report version and exit"
echo " -h --help Show this usage"
echo "Example:"
echo " $0 /tmp/\$(uname -n)"
}
Expand Down
3 changes: 2 additions & 1 deletion utils/hwloc/hwloc-info.c
@@ -1,6 +1,6 @@
/*
* Copyright © 2009 CNRS
* Copyright © 2009-2020 Inria. All rights reserved.
* Copyright © 2009-2021 Inria. All rights reserved.
* Copyright © 2009-2012 Université Bordeaux
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
Expand Down Expand Up @@ -71,6 +71,7 @@ void usage(const char *name, FILE *where)
fprintf (where, " -p --physical Use physical object indexes for input\n");
fprintf (where, "Miscellaneous options:\n");
fprintf (where, " --version Report version and exit\n");
fprintf (where, " -h --help Show this usage\n");
}

static void
Expand Down
1 change: 1 addition & 0 deletions utils/hwloc/hwloc-patch.c
Expand Up @@ -14,6 +14,7 @@ void usage(const char *callname __hwloc_attribute_unused, FILE *where)
fprintf(where, "Options:\n");
fprintf(where, " -R --reverse Reverse the sense of the difference\n");
fprintf(where, " --version Report version and exit\n");
fprintf(where, " -h --help Show this usage\n");
}

static int hwloc_diff_read(const char *inputdiff,
Expand Down
1 change: 1 addition & 0 deletions utils/hwloc/hwloc-ps.c
Expand Up @@ -68,6 +68,7 @@ void usage(const char *name, FILE *where)
fprintf (where, " --json-port <n> Use port <n> for JSON server (default is %d)\n", JSON_PORT);
fprintf (where, " -v --verbose Increase verbosity\n");
fprintf (where, " --version Report version and exit\n");
fprintf (where, " -h --help Show this usage\n");
}

static void print_task(hwloc_topology_t topology,
Expand Down
1 change: 1 addition & 0 deletions utils/lstopo/lstopo.c
Expand Up @@ -479,6 +479,7 @@ void usage(const char *name, FILE *where)
/* --shmem-output-addr is undocumented on purpose */
fprintf (where, " --ps --top Display processes within the hierarchy\n");
fprintf (where, " --version Report version and exit\n");
fprintf (where, " -h --help Show this usage\n");
}

void lstopo_show_interactive_help(void)
Expand Down

0 comments on commit 1b8937c

Please sign in to comment.