summaryrefslogtreecommitdiff
path: root/src/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-07 20:58:41 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-07 20:58:41 +0200
commitf60f22dfbb8cfa0eb55d1896db0e4c3f7d3cfacb (patch)
tree281e6403566756a06a47599067b296446e9257d0 /src/load-fragment.c
parent6febfd0d4bdf7519e119149b8d8ec03c210aed1d (diff)
util: use quoted word parsing where applicable
Diffstat (limited to 'src/load-fragment.c')
-rw-r--r--src/load-fragment.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/load-fragment.c b/src/load-fragment.c
index 1cc7c5cc39..43b8093fa0 100644
--- a/src/load-fragment.c
+++ b/src/load-fragment.c
@@ -61,7 +61,7 @@ static int config_parse_deps(
assert(lvalue);
assert(rvalue);
- FOREACH_WORD(w, l, rvalue, state) {
+ FOREACH_WORD_QUOTED(w, l, rvalue, state) {
char *t, *k;
int r;
@@ -103,7 +103,7 @@ static int config_parse_names(
assert(rvalue);
assert(data);
- FOREACH_WORD(w, l, rvalue, state) {
+ FOREACH_WORD_QUOTED(w, l, rvalue, state) {
char *t, *k;
int r;
@@ -689,7 +689,7 @@ static int config_parse_cpu_affinity(
assert(rvalue);
assert(data);
- FOREACH_WORD(w, l, rvalue, state) {
+ FOREACH_WORD_QUOTED(w, l, rvalue, state) {
char *t;
int r;
unsigned cpu;
@@ -766,7 +766,7 @@ static int config_parse_secure_bits(
assert(rvalue);
assert(data);
- FOREACH_WORD(w, l, rvalue, state) {
+ FOREACH_WORD_QUOTED(w, l, rvalue, state) {
if (first_word(w, "keep-caps"))
c->secure_bits |= SECURE_KEEP_CAPS;
else if (first_word(w, "keep-caps-locked"))
@@ -807,7 +807,7 @@ static int config_parse_bounding_set(
assert(rvalue);
assert(data);
- FOREACH_WORD(w, l, rvalue, state) {
+ FOREACH_WORD_QUOTED(w, l, rvalue, state) {
char *t;
int r;
cap_value_t cap;
@@ -902,11 +902,11 @@ static int config_parse_cgroup(
size_t l;
char *state;
- FOREACH_WORD(w, l, rvalue, state) {
+ FOREACH_WORD_QUOTED(w, l, rvalue, state) {
char *t;
int r;
- if (!(t = strndup(w, l)))
+ if (!(t = cunescape_length(w, l)))
return -ENOMEM;
r = unit_add_cgroup_from_text(u, t);
@@ -967,7 +967,7 @@ static int config_parse_mount_flags(
assert(rvalue);
assert(data);
- FOREACH_WORD(w, l, rvalue, state) {
+ FOREACH_WORD_QUOTED(w, l, rvalue, state) {
if (strncmp(w, "shared", l) == 0)
flags |= MS_SHARED;
else if (strncmp(w, "slave", l) == 0)