util: change unquote_*_word to extract_*_word

It now takes a separators argument, which defaults to WHITESPACE if NULL
is passed.
This commit is contained in:
Richard Maw
2015-08-07 15:50:42 +00:00
parent 53f0db7177
commit 6868560773
11 changed files with 157 additions and 122 deletions
+3 -2
View File
@@ -662,7 +662,7 @@ static int parse_xattrs_from_arg(Item *i) {
for (;;) {
_cleanup_free_ char *name = NULL, *value = NULL, *xattr = NULL, *xattr_replaced = NULL;
r = unquote_first_word(&p, &xattr, UNQUOTE_CUNESCAPE);
r = extract_first_word(&p, &xattr, NULL, EXTRACT_CUNESCAPE);
if (r < 0)
log_warning_errno(r, "Failed to parse extended attribute '%s', ignoring: %m", p);
if (r <= 0)
@@ -1760,8 +1760,9 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
assert(line >= 1);
assert(buffer);
r = unquote_many_words(
r = extract_many_words(
&buffer,
NULL,
0,
&action,
&path,