diff options
| author | Warner Losh <imp@FreeBSD.org> | 2016-03-28 04:22:22 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2016-03-28 04:22:22 +0000 |
| commit | b3d322926d119280166c0d052e05b4015675b894 (patch) | |
| tree | 6344a8d644078301182946395897b026f4c94ebf /sbin/devd/devd.cc | |
| parent | 579a636f2ab0628d9dff1caac65649bdc6ee9f83 (diff) | |
Notes
Diffstat (limited to 'sbin/devd/devd.cc')
| -rw-r--r-- | sbin/devd/devd.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index 203d7507ced2..46fe3154cd92 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -648,8 +648,8 @@ config::expand_one(const char *&src, string &dst) return; } - // $[^A-Za-z] -> $\1 - if (!isalpha(*src)) { + // $[^-A-Za-z_*] -> $\1 + if (!isalpha(*src) && *src != '_' && *src != '-' && *src != '*') { dst += '$'; dst += *src++; return; @@ -793,10 +793,15 @@ process_event(char *buffer) devdlog(LOG_INFO, "Processing event '%s'\n", buffer); type = *buffer++; cfg.push_var_table(); + // $* is the entire line + cfg.set_variable("*", buffer - 1); + // $_ is the entire line without the initial character + cfg.set_variable("_", buffer - 1); // No match doesn't have a device, and the format is a little // different, so handle it separately. switch (type) { case notify: + //! (k=v)* sp = cfg.set_vars(sp); break; case nomatch: |
