diff options
| author | Warner Losh <imp@FreeBSD.org> | 2018-09-22 15:32:53 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2018-09-22 15:32:53 +0000 |
| commit | 6577e8c44b5d5340bbf277265a18ac0a61cedfee (patch) | |
| tree | 028d2e2f8cb6e7cde36ba670b2ec850adc795acc /sbin/devd/devd.cc | |
| parent | b8fdf588079d7bb8f45e1b894801870db00e6887 (diff) | |
Notes
Diffstat (limited to 'sbin/devd/devd.cc')
| -rw-r--r-- | sbin/devd/devd.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index e81f718159b1..b2d08324511f 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -666,7 +666,7 @@ config::shell_quote(const string &s) } void -config::expand_one(const char *&src, string &dst) +config::expand_one(const char *&src, string &dst, bool is_shell) { int count; string buffer; @@ -705,7 +705,7 @@ config::expand_one(const char *&src, string &dst) do { buffer += *src++; } while (is_id_char(*src)); - dst.append(shell_quote(get_variable(buffer))); + dst.append(is_shell ? shell_quote(get_variable(buffer)) : get_variable(buffer)); } const string @@ -731,7 +731,7 @@ config::expand_string(const char *src, const char *prepend, const char *append) } dst.append(src, var_at - src); src = var_at; - expand_one(src, dst); + expand_one(src, dst, prepend == NULL); } if (append != NULL) |
