mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
ceph_argparse_witharg: fix dashes in args
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
This commit is contained in:
parent
823a05c94f
commit
f1f75dffb9
@ -305,7 +305,9 @@ bool ceph_argparse_witharg(std::vector<const char*> &args,
|
||||
if (a == NULL)
|
||||
return false;
|
||||
strlen_a = strlen(a);
|
||||
if (strncmp(a, first, strlen(a)) == 0) {
|
||||
char a2[strlen_a+1];
|
||||
dashes_to_underscores(a, a2);
|
||||
if (strncmp(a2, first, strlen(a2)) == 0) {
|
||||
if (first[strlen_a] == '=') {
|
||||
*ret = first + strlen_a + 1;
|
||||
i = args.erase(i);
|
||||
|
Loading…
Reference in New Issue
Block a user