svn commit: r213646 - head/sbin/devd

Warner Losh imp at FreeBSD.org
Sat Oct 9 07:29:13 UTC 2010


Author: imp
Date: Sat Oct  9 07:29:13 2010
New Revision: 213646
URL: http://svn.freebsd.org/changeset/base/213646

Log:
  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

Modified:
  head/sbin/devd/devd.cc

Modified: head/sbin/devd/devd.cc
==============================================================================
--- head/sbin/devd/devd.cc	Sat Oct  9 05:57:23 2010	(r213645)
+++ head/sbin/devd/devd.cc	Sat Oct  9 07:29:13 2010	(r213646)
@@ -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;


More information about the svn-src-all mailing list