summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-02-14 15:39:43 -0800
committerSage Weil <sage@inktank.com>2013-02-14 15:40:22 -0800
commitf47916353547c77a65c7b70e609a9096f09c6d28 (patch)
treeaf671fb3449a444cfb25098639993114e0375ffc
parent6eb7e15a4783b122e9b0c85ea9ba064145958aa5 (diff)
downloadceph-f47916353547c77a65c7b70e609a9096f09c6d28.tar.gz
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 <sage@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com> (cherry picked from commit 6c504d96c1e4fbb67578fba0666ca453b939c218)
-rw-r--r--src/osd/OSDCap.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/OSDCap.cc b/src/osd/OSDCap.cc
index 065631154f8..2f0dffdbaa2 100644
--- a/src/osd/OSDCap.cc
+++ b/src/osd/OSDCap.cc
@@ -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(' ');