Commit 15fdeaa65af2362d94e64ddd604b68f588495a05 ("Add
support to configurable rebuild rate in iprconfig.") added
support to specify the array rebuild rate on command-line
interface of iprconfig. For a matter of usability, users can
set any value in the range 0-100, though internally the only
allowed values are in the range 0-15 - a conversion is made.
This patch only improves aesthetically the error message in
the case of the adapter does not allow the change of the
rebuild rate value - the return message used to show the
values in the range 0-15, but now it shows the values in
the same range of input, i.e, 0-100.
Signed-off-by: Guilherme G. Piccoli <[email protected]>
---
iprconfig.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/iprconfig.c b/iprconfig.c
index 9fae41a..c92ee6e 100644
--- a/iprconfig.c
+++ b/iprconfig.c
@@ -17474,6 +17474,7 @@ static int query_array_rebuild_verify(char **args, int
num_args)
**/
static int set_array_rebuild_rate(char**args, int num_args)
{
+ int err_rebuild_rate = 0;
int rebuild_rate = 0;
int rc;
struct ipr_ioa_attr attr;
@@ -17505,6 +17506,7 @@ static int set_array_rebuild_rate(char**args, int
num_args)
"decrease the total rebuild time.\n", args[1]);
return -EINVAL;
}
+ err_rebuild_rate = rebuild_rate;
rebuild_rate = (rebuild_rate * 15) / 100;
}
@@ -17523,7 +17525,7 @@ static int set_array_rebuild_rate(char**args, int
num_args)
rc = ipr_set_ioa_attr(ioa, &attr, 1);
if (rc) {
scsi_err(ioa->dev, "Unable to set rebuild rate value %d",
- rebuild_rate);
+ err_rebuild_rate);
return rc;
}
return 0;
--
2.1.0
------------------------------------------------------------------------------
_______________________________________________
Iprdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iprdd-devel