o Skip white space between variables better. This makes
'a="b" c="d" at loc=1 on busN' properly set 'c' and process the rest of the stirng. Before it would ignore everything after variable 'a'. o Parse nomatch and other events differently. They are more different than the code allowed for, so we weren't properly parsing nomatch events. It appears this fixes some of the demand loading issues that I was having with devd. Noticed by: Gary Palmer
This commit is contained in:
parent
6c2a22923c
commit
b1ee04b18e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113785
@ -1,5 +1,5 @@
|
|||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2002 M. Warner Losh.
|
* Copyright (c) 2002-2003 M. Warner Losh.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -572,6 +572,8 @@ config::chop_var(char *&buffer, char *&lhs, char *&rhs)
|
|||||||
*walker++ = '\0';
|
*walker++ = '\0';
|
||||||
rhs[-1] = '\0';
|
rhs[-1] = '\0';
|
||||||
}
|
}
|
||||||
|
while (isspace(*walker))
|
||||||
|
walker++;
|
||||||
buffer = walker;
|
buffer = walker;
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
@ -645,12 +647,21 @@ process_event(char *buffer)
|
|||||||
return; /* Can't happen? */
|
return; /* Can't happen? */
|
||||||
*sp++ = '\0';
|
*sp++ = '\0';
|
||||||
cfg.set_variable("device-name", buffer);
|
cfg.set_variable("device-name", buffer);
|
||||||
|
if (strncmp(sp, "at ", 3) == 0)
|
||||||
|
sp += 3;
|
||||||
|
sp = cfg.set_vars(sp);
|
||||||
|
if (strncmp(sp, "on ", 3) == 0)
|
||||||
|
cfg.set_variable("bus", sp + 3);
|
||||||
|
} else {
|
||||||
|
//?vars at location on bus
|
||||||
|
sp = cfg.set_vars(sp);
|
||||||
|
if (strncmp(sp, "at ", 3) == 0)
|
||||||
|
sp += 3;
|
||||||
|
sp = cfg.set_vars(sp);
|
||||||
|
if (strncmp(sp, "on ", 3) == 0)
|
||||||
|
cfg.set_variable("bus", sp + 3);
|
||||||
}
|
}
|
||||||
if (strncmp(sp, "at ", 3) == 0)
|
|
||||||
sp += 3;
|
|
||||||
sp = cfg.set_vars(sp);
|
|
||||||
if (strncmp(sp, "on ", 3) == 0)
|
|
||||||
cfg.set_variable("bus", sp + 3);
|
|
||||||
cfg.find_and_execute(type);
|
cfg.find_and_execute(type);
|
||||||
cfg.pop_var_table();
|
cfg.pop_var_table();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user