Fix parsing of nomatch events.

minor debug fix.
This commit is contained in:
Warner Losh 2005-04-18 02:54:07 +00:00
parent 47b92dea0f
commit 528d3f7955
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145218

View File

@ -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);