Skip to content

Commit

Permalink
utils/hwloc-gather-topology: add --version
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 e74c4c7 commit 0037a22
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions contrib/completion/bash/hwloc
Expand Up @@ -538,6 +538,7 @@ _hwloc_gather_topology(){
--dmi
--no-cpuid
--keep
--version
-h --help
)
local cur=${COMP_WORDS[COMP_CWORD]}
Expand Down
4 changes: 4 additions & 0 deletions utils/hwloc/hwloc-gather-topology.1in
Expand Up @@ -38,6 +38,10 @@ Do not gather x86 CPUID dump using \fIhwloc\-gather\-cpuid\fR.
Keep the temporary copy of dumped files instead of destroying it.
.
.TP
\fB\-\-version\fR
Report version and exit.
.
.TP
\fB\-h\fR \fB\-\-help\fR
Display help message and exit.
.
Expand Down
3 changes: 3 additions & 0 deletions utils/hwloc/hwloc-gather-topology.in
Expand Up @@ -9,6 +9,7 @@
# See COPYING in top-level directory.
#

HWLOC_VERSION="@HWLOC_VERSION@"
HWLOC_top_builddir="@HWLOC_top_builddir@"
prefix="@prefix@"
exec_prefix="@exec_prefix@"
Expand Down Expand Up @@ -53,6 +54,7 @@ usage()
echo " --dmi Gather SMBIOS files. Works only when run as root. Requires dmi-sysfs kernel module"
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 "Example:"
echo " $0 /tmp/\$(uname -n)"
}
Expand All @@ -63,6 +65,7 @@ while [ x`echo "$1" | cut -c1` = x- ] ; do
--dmi) gatherdmi=1;;
--no-cpuid) gathercpuid=0;;
--keep) keep=1;;
--version) echo `basename $0`" $HWLOC_VERSION"; exit 0;;
-h|--help) usage; exit 0;;
*) echo "Unrecognized option: $1"; usage; exit 1;;
esac
Expand Down

0 comments on commit 0037a22

Please sign in to comment.