From 528d3f795513567ee9eac9357d9ea533b28336ab Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 18 Apr 2005 02:54:07 +0000 Subject: [PATCH] Fix parsing of nomatch events. minor debug fix. --- sbin/devd/devd.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index aad0695eb0f6..9524ea996dd4 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);