diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-11-11 22:53:05 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-11-11 22:53:05 +0100 |
commit | c89f52ac6938374972253d8752ed65f3af0b3ef4 (patch) | |
tree | c700addb5615fe76a52c6bf3a5d9a1ea256a6de4 /src/basic/extract-word.h | |
parent | c129bd5df3ca08eb352cf69d01d2f374552624ae (diff) | |
download | systemd-c89f52ac6938374972253d8752ed65f3af0b3ef4.tar.gz |
core: fix dependency parsing
3d793d29059a7ddf5282efa6b32b953c183d7a4d broke parsing of unit file
names that include backslashes, as extract_first_word() strips those.
Fix this, by introducing a new EXTRACT_RETAIN_ESCAPE flag which disables
looking at any flags, thus being compatible with the classic
FOREACH_WORD() behaviour.
Diffstat (limited to 'src/basic/extract-word.h')
-rw-r--r-- | src/basic/extract-word.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/basic/extract-word.h b/src/basic/extract-word.h index ddc1c4f463..9606ab64b3 100644 --- a/src/basic/extract-word.h +++ b/src/basic/extract-word.h @@ -24,11 +24,12 @@ #include "macro.h" typedef enum ExtractFlags { - EXTRACT_RELAX = 1, - EXTRACT_CUNESCAPE = 2, - EXTRACT_CUNESCAPE_RELAX = 4, - EXTRACT_QUOTES = 8, + EXTRACT_RELAX = 1, + EXTRACT_CUNESCAPE = 2, + EXTRACT_CUNESCAPE_RELAX = 4, + EXTRACT_QUOTES = 8, EXTRACT_DONT_COALESCE_SEPARATORS = 16, + EXTRACT_RETAIN_ESCAPE = 32, } ExtractFlags; int extract_first_word(const char **p, char **ret, const char *separators, ExtractFlags flags); |