From d99367e1e03cbeefd33d7dd9405245e089c2237c Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Mon, 27 Jan 2025 12:29:54 +0100 Subject: [PATCH] osd/OSDCap: fix misleading grammar comments The restrictions on pool name and namespace have been independent of each other for ages. Specifying namespace[=] doesn't require specifying pool[=] like is currently suggested -- neither for regular "allow" grants nor for "profile" grants. Signed-off-by: Ilya Dryomov --- src/osd/OSDCap.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/OSDCap.cc b/src/osd/OSDCap.cc index 6c30cd84938be..569ff2693083f 100644 --- a/src/osd/OSDCap.cc +++ b/src/osd/OSDCap.cc @@ -445,7 +445,7 @@ struct OSDCapParser : qi::grammar >> (lit('=') | spaces) >> estr >> -char_('*')); - // match := [pool[=] [namespace[=]]] [object_prefix ] + // match := [pool[=]] [namespace[=]] [object_prefix ] object_prefix %= -(spaces >> lit("object_prefix") >> spaces >> str); pooltag %= (spaces >> lit("tag") >> spaces >> str // application @@ -478,7 +478,7 @@ struct OSDCapParser : qi::grammar (rwxa) [_val = phoenix::construct(_1)] | (class_name >> method_name) [_val = phoenix::construct(_1, _2)]); - // profile := profile [pool[=] [namespace[=]]] + // profile := profile [pool[=]] [namespace[=]] profile_name %= (lit("profile") >> (lit('=') | spaces) >> str); profile = ( (profile_name >> pool_name >> nspace) [_val = phoenix::construct(_1, _2, _3)] | -- 2.39.5