aboutsummaryrefslogtreecommitdiffstats
path: root/scrub
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-04-12 10:34:11 -0500
committerEric Sandeen <sandeen@redhat.com>2018-04-12 10:34:11 -0500
commit3dd91472fd17dfbe7b431e9518f0659fb175602e (patch)
tree03ab78a7f8ab81ae1b50ac47221af732862ab061 /scrub
parent680eacaa3bcb6559d3381e6f1e6abf4603b55040 (diff)
downloadxfsprogs-dev-3dd91472fd17dfbe7b431e9518f0659fb175602e.tar.gz
xfs_scrub_all: report version
Make xfs_scrub_all -V report its version like the other xfs tools. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Diffstat (limited to 'scrub')
-rw-r--r--scrub/Makefile1
-rw-r--r--scrub/xfs_scrub_all.in11
2 files changed, 12 insertions, 0 deletions
diff --git a/scrub/Makefile b/scrub/Makefile
index bcc05a0ed9..482e8a7b85 100644
--- a/scrub/Makefile
+++ b/scrub/Makefile
@@ -102,6 +102,7 @@ default: depend $(LTCOMMAND) $(XFS_SCRUB_ALL_PROG) $(OPTIONAL_TARGETS)
xfs_scrub_all: xfs_scrub_all.in
@echo " [SED] $@"
$(Q)$(SED) -e "s|@sbindir@|$(PKG_ROOT_SBIN_DIR)|g" \
+ -e "s|@pkg_version@|$(PKG_VERSION)|g" \
-e "s|@scrub_args@|$(XFS_SCRUB_ARGS)|g" < $< > $@
$(Q)chmod a+x $@
diff --git a/scrub/xfs_scrub_all.in b/scrub/xfs_scrub_all.in
index 80f07d5c8b..aed66a1ac2 100644
--- a/scrub/xfs_scrub_all.in
+++ b/scrub/xfs_scrub_all.in
@@ -26,6 +26,7 @@ import threading
import time
import sys
import os
+import argparse
retcode = 0
terminate = False
@@ -139,6 +140,16 @@ def main():
thr.start()
global retcode, terminate
+ parser = argparse.ArgumentParser( \
+ description = "Scrub all mounted XFS filesystems.")
+ parser.add_argument("-V", help = "Report version and exit.", \
+ action = "store_true")
+ args = parser.parse_args()
+
+ if args.V:
+ print("xfs_scrub_all version @pkg_version@")
+ sys.exit(0)
+
fs = find_mounts()
# Tail the journal if we ourselves aren't a service...