]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDCap: tweak unquoted_word parsing in osd caps
authorSage Weil <sage@inktank.com>
Thu, 14 Feb 2013 23:39:43 +0000 (15:39 -0800)
committerSage Weil <sage@inktank.com>
Thu, 14 Feb 2013 23:39:43 +0000 (15:39 -0800)
Newer versions of spirit (1.49.0-3.1ubuntu1.1 in quantal, in particular)
dislike the construct with alnum and replace the - and _ with '\0' in the
resulting string.

Fixes: #4122
Backport: bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
src/osd/OSDCap.cc

index 065631154f8084e8fe06f733e75f32255afeb21d..2f0dffdbaa2813f49d530a2b5a33beb57ebce6fd 100644 (file)
@@ -150,7 +150,7 @@ struct OSDCapParser : qi::grammar<Iterator, OSDCap()>
     quoted_string %=
       lexeme['"' >> +(char_ - '"') >> '"'] | 
       lexeme['\'' >> +(char_ - '\'') >> '\''];
-    unquoted_word %= +(alnum | '_' | '-');
+    unquoted_word %= +char_("a-zA-Z0-9_-");
     str %= quoted_string | unquoted_word;
 
     spaces = +lit(' ');