From 9b6cb52091ce9d94159864d00b2ac7ffea07d7ab Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 9 Oct 2010 07:29:13 +0000 Subject: [PATCH] Allow the kernel to generate more spacy things and still have devd cope. Skip multiple spaces in a few contexts. PR: 96854 Submitted by: Shin'ya Kumabuchi MFC after: 1 week --- sbin/devd/devd.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index 7af6f4e3053e..bce4a38820ca 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -749,9 +749,13 @@ process_event(char *buffer) if (sp == NULL) return; /* Can't happen? */ *sp++ = '\0'; + while (isspace(*sp)) + sp++; if (strncmp(sp, "at ", 3) == 0) sp += 3; sp = cfg.set_vars(sp); + while (isspace(*sp)) + sp++; if (strncmp(sp, "on ", 3) == 0) cfg.set_variable("bus", sp + 3); break; @@ -762,9 +766,13 @@ process_event(char *buffer) return; /* Can't happen? */ *sp++ = '\0'; cfg.set_variable("device-name", buffer); + while (isspace(*sp)) + sp++; if (strncmp(sp, "at ", 3) == 0) sp += 3; sp = cfg.set_vars(sp); + while (isspace(*sp)) + sp++; if (strncmp(sp, "on ", 3) == 0) cfg.set_variable("bus", sp + 3); break;