From 7b1e2e3b8814dc5ee4bc507f28d82852b42e99a6 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 22 Feb 2023 01:37:18 +0100 Subject: [PATCH] btrfs-progs: replace: convert help text to option formatter Signed-off-by: David Sterba --- cmds/replace.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/cmds/replace.c b/cmds/replace.c index bdb74dff..ad914306 100644 --- a/cmds/replace.c +++ b/cmds/replace.c @@ -105,18 +105,17 @@ static const char *const cmd_replace_start_usage[] = { "from the system, you have to use the parameter format.", "The needs to be same size or larger than the .", "", - "-r only read from if no other zero-defect mirror exists", - " (enable this if your drive has lots of read errors, the access", - " would be very slow)", - "-f force using and overwriting even if it looks like", - " containing a valid btrfs filesystem. A valid filesystem is", - " assumed if a btrfs superblock is found which contains a", - " correct checksum. Devices which are currently mounted are", - " never allowed to be used as the ", - "-B do not background", - "--enqueue wait if there's another exclusive operation running,", - " otherwise continue", - "-K|--nodiscard do not perform whole device TRIM", + OPTLINE("-r", "only read from if no other zero-defect mirror exists " + "(enable this if your drive has lots of read errors, the access " + "would be very slow)"), + OPTLINE("-f", "force using and overwriting even if it looks like " + "containing a valid btrfs filesystem. A valid filesystem is " + "assumed if a btrfs superblock is found which contains a " + "correct checksum. Devices which are currently mounted are " + "never allowed to be used as the "), + OPTLINE("-B", "do not background"), + OPTLINE("--enqueue", "wait if there's another exclusive operation running, otherwise continue"), + OPTLINE("-K|--nodiscard", "do not perform whole device TRIM"), NULL }; @@ -369,8 +368,7 @@ static const char *const cmd_replace_status_usage[] = { "btrfs replace status [-1] ", "Print status and progress information of a running device replace operation", "", - "-1 print once instead of print continuously until the replace", - " operation finishes (or is canceled)", + OPTLINE("-1", "print once instead of print continuously until the replace operation finishes (or is canceled)"), NULL };