summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-04-18 02:54:07 +0000
committerimp <imp@FreeBSD.org>2005-04-18 02:54:07 +0000
commit6bc67c1366d316a97914f752fb0f2494d7d9f591 (patch)
tree80107b02eb4ec452ed7e8b9b57203d62bd0822bf
parente2da53b35ac4e9915f963a3b60c73d563e35cd37 (diff)
downloadFreeBSD-src-6bc67c1366d316a97914f752fb0f2494d7d9f591.zip
FreeBSD-src-6bc67c1366d316a97914f752fb0f2494d7d9f591.tar.gz
Fix parsing of nomatch events.
minor debug fix.
-rw-r--r--sbin/devd/devd.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc
index aad0695..9524ea9 100644
--- a/sbin/devd/devd.cc
+++ b/sbin/devd/devd.cc
@@ -213,7 +213,7 @@ void
var_list::set_variable(const string &var, const string &val)
{
if (Dflag)
- fprintf(stderr, "%s=%s\n", var.c_str(), val.c_str());
+ fprintf(stderr, "setting %s=%s\n", var.c_str(), val.c_str());
_vars[var] = val;
}
@@ -563,8 +563,11 @@ process_event(char *buffer)
sp = cfg.set_vars(sp);
break;
case nomatch:
- //?vars at location on bus
- sp = cfg.set_vars(sp);
+ //? at location pnp-info on bus
+ sp = strchr(sp, ' ');
+ if (sp == NULL)
+ return; /* Can't happen? */
+ *sp++ = '\0';
if (strncmp(sp, "at ", 3) == 0)
sp += 3;
sp = cfg.set_vars(sp);
OpenPOWER on IntegriCloud