From: Sage Weil Date: Thu, 14 Feb 2013 23:39:43 +0000 (-0800) Subject: osd/OSDCap: tweak unquoted_word parsing in osd caps X-Git-Tag: v0.57~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6c504d96c1e4fbb67578fba0666ca453b939c218;p=ceph.git osd/OSDCap: tweak unquoted_word parsing in osd caps 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 Reviewed-by: Josh Durgin --- diff --git a/src/osd/OSDCap.cc b/src/osd/OSDCap.cc index 065631154f80..2f0dffdbaa28 100644 --- a/src/osd/OSDCap.cc +++ b/src/osd/OSDCap.cc @@ -150,7 +150,7 @@ struct OSDCapParser : qi::grammar quoted_string %= lexeme['"' >> +(char_ - '"') >> '"'] | lexeme['\'' >> +(char_ - '\'') >> '\'']; - unquoted_word %= +(alnum | '_' | '-'); + unquoted_word %= +char_("a-zA-Z0-9_-"); str %= quoted_string | unquoted_word; spaces = +lit(' ');