From 902a76ae4b11bc0bcc24f519f09d58fec04e83fb Mon Sep 17 00:00:00 2001
From: Krzysztof Kajrewicz <krzysztof.kajrewicz@intel.com>
Date: Mon, 25 Mar 2019 14:09:40 +0100
Subject: [PATCH] pool: rename long option for clearing bad blocks with
 pmempool create

---
 doc/pmempool/pmempool-create.1.md | 4 ++--
 src/common/set.c                  | 2 +-
 src/tools/pmempool/create.c       | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/pmempool/pmempool-create.1.md b/doc/pmempool/pmempool-create.1.md
index 1a8f54bfa..f14c09051 100644
--- a/doc/pmempool/pmempool-create.1.md
+++ b/doc/pmempool/pmempool-create.1.md
@@ -7,7 +7,7 @@ header: PMDK
 date: pmem Tools version 1.4
 ...
 
-[comment]: <> (Copyright 2016-2018, Intel Corporation)
+[comment]: <> (Copyright 2016-2019, Intel Corporation)
 
 [comment]: <> (Redistribution and use in source and binary forms, with or without)
 [comment]: <> (modification, are permitted provided that the following conditions)
@@ -98,7 +98,7 @@ If the file already exist the permissions are not changed.
 
 Create a new pool of the same size and other properties as *\<file\>*.
 
-`-b, --clearbadblocks`
+`-b, --clear-bad-blocks`
 
 Clear bad blocks in existing files.
 
diff --git a/src/common/set.c b/src/common/set.c
index 5e90df53b..a1162c1e3 100644
--- a/src/common/set.c
+++ b/src/common/set.c
@@ -3191,7 +3191,7 @@ util_pool_create_uuids(struct pool_set **setp, const char *path,
 							util_print_bad_files_cb,
 							NULL);
 			ERR(
-				"pool set contains bad blocks and cannot be created, run 'pmempool create --clearbadblocks' utility to clear bad blocks and create a pool");
+				"pool set contains bad blocks and cannot be created, run 'pmempool create --clear-bad-blocks' utility to clear bad blocks and create a pool");
 			errno = EIO;
 			goto err_poolset_free;
 		}
diff --git a/src/tools/pmempool/create.c b/src/tools/pmempool/create.c
index 00683539d..3867c3f83 100644
--- a/src/tools/pmempool/create.c
+++ b/src/tools/pmempool/create.c
@@ -115,7 +115,7 @@ static const char * const help_str =
 "  -M, --max-size       use maximum available space on file system\n"
 "  -m, --mode <octal>   set permissions to <octal> (the default is 0664)\n"
 "  -i, --inherit <file> take required parameters from specified pool file\n"
-"  -b, --clearbadblocks clear bad blocks in existing files\n"
+"  -b, --clear-bad-blocks clear bad blocks in existing files\n"
 "  -f, --force          remove the pool first\n"
 "  -v, --verbose        increase verbosity level\n"
 "  -h, --help           display this help and exit\n"
@@ -142,7 +142,7 @@ static const struct option long_options[] = {
 	{"write-layout", no_argument,		NULL,	'w' | OPT_BLK},
 	{"layout",	required_argument,	NULL,	'l' | OPT_OBJ},
 	{"force",	no_argument,		NULL,	'f' | OPT_ALL},
-	{"clearbadblocks", no_argument,		NULL,	'b' | OPT_ALL},
+	{"clear-bad-blocks", no_argument,		NULL,	'b' | OPT_ALL},
 	{NULL,		0,			NULL,	 0 },
 };
 
-- 
GitLab