mirror of
https://github.com/ceph/ceph
synced 2024-12-27 22:13:28 +00:00
Allow float value by allowing . in input value
Dont bail out if the input value happens to be . Fixes: #11620 Signed-off-by: Rajesh Nambiar <rajesh.n@msystechnologies.com> Tested-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
055c0c480e
commit
4487d13cc6
@ -154,6 +154,7 @@ void vec_to_argv(const char *argv0, std::vector<const char*>& args,
|
||||
void ceph_arg_value_type(const char * nextargstr, bool *bool_option, bool *bool_numeric)
|
||||
{
|
||||
bool is_numeric = true;
|
||||
bool is_float = false;
|
||||
bool is_option;
|
||||
|
||||
if (nextargstr == NULL) {
|
||||
@ -173,6 +174,11 @@ void ceph_arg_value_type(const char * nextargstr, bool *bool_option, bool *bool_
|
||||
if (nextargstr[0] == '-')
|
||||
continue;
|
||||
}
|
||||
if ( (nextargstr[i] == '.') && (is_float == false) ) {
|
||||
is_float = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
is_numeric = false;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user