lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Mar 2019 22:02:14 -0400
From:   "Theodore Ts'o" <>
To:     Ext4 Developers List <>
Cc:, "Theodore Ts'o" <>
Subject: [PATCH 5/9] e2fscrub: add the -n option which shows what commands e2scrub would execute

Signed-off-by: Theodore Ts'o <>
 scrub/ | 5 +++++
 scrub/   | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/scrub/ b/scrub/
index ff03523e3..7342876a3 100644
--- a/scrub/
+++ b/scrub/
@@ -38,6 +38,11 @@ If the filesystem is not repaired,
 will be run before the next mount.
+Print what commands
+.B e2scrub
+would execute (but don't actually execute them).
 Remove the e2scrub snapshot and exit without checking anything.
diff --git a/scrub/ b/scrub/
index 51a909373..301574968 100644
--- a/scrub/
+++ b/scrub/
@@ -37,6 +37,7 @@ print_help() {
 	echo "Usage: $0 [OPTIONS] mountpoint | device"
 	echo "mountpoint must be on a LVM-managed block device"
+	echo "-n: Show what commands e2scrub would execute."
 	echo "-r: Remove e2scrub snapshot and exit, do not check anything."
 	echo "-t: Run fstrim if successful."
 	echo "-V: Print version information and exit."
@@ -68,8 +69,9 @@ exitcode() {
 	exit "${ret}"
-while getopts "rtV" opt; do
-	case "${opt}" in
+while getopts "nrtV" opt; do
+    case "${opt}" in
+	"n") DBG="echo Would execute: " ;;
 	"r") reap=1;;
 	"t") fstrim=1;;
 	"V") print_version; exitcode 0;;

Powered by blists - more mailing lists