summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/pnp.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1998-09-26 01:29:13 +0000
committermsmith <msmith@FreeBSD.org>1998-09-26 01:29:13 +0000
commit7e33170a26eb4e00de1118e6ad023f344f2eda57 (patch)
tree88e60ab6cafa9863d327fce7019ff2b61bd94edd /sys/boot/common/pnp.c
parent813a76e7c2c3faee577231049fa983dc48c7de53 (diff)
downloadFreeBSD-src-7e33170a26eb4e00de1118e6ad023f344f2eda57.zip
FreeBSD-src-7e33170a26eb4e00de1118e6ad023f344f2eda57.tar.gz
console.c
Allow the MI code to override the preferred console (eg. so that an RB_SERIAL flag from the i386 boot2 can override the default first active console) isapnp.c Use the standard format for ISA PnP IDs. pnp.c Allow trailing comments on lines, be less picky about line contents. ls.c Cosmetic error message fix. panic.c Print the right arguments.
Diffstat (limited to 'sys/boot/common/pnp.c')
-rw-r--r--sys/boot/common/pnp.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/boot/common/pnp.c b/sys/boot/common/pnp.c
index 84f3825..4a8ee48 100644
--- a/sys/boot/common/pnp.c
+++ b/sys/boot/common/pnp.c
@@ -129,6 +129,9 @@ pnp_discard(struct pnpinfo **list)
* and 'module' fields are required; the 'rev' field is currently
* ignored (but should be used), and the 'args' field must come
* last.
+ *
+ * Comments may be appended to lines; any character including or following
+ * '#' on a line is ignored.
*/
static int
pnp_readconf(char *path)
@@ -153,6 +156,10 @@ pnp_readconf(char *path)
/* keep/discard? */
if ((*cp == 0) || (*cp == '#'))
continue;
+
+ /* cut trailing comment? */
+ if ((ep = strchr(cp, '#')) != NULL)
+ *ep = 0;
/* bus declaration? */
if (*cp == '[') {
@@ -210,11 +217,9 @@ pnp_readconf(char *path)
cp = ep;
}
- /* we must have at least ident and module set */
- if ((ident == NULL) || (module == NULL)) {
- printf("%s line %d: bad mapping\n", path, line);
+ /* we must have at least ident and module set to be interesting */
+ if ((ident == NULL) || (module == NULL))
continue;
- }
/*
* Loop looking for module/bus that might match this, but aren't already
OpenPOWER on IntegriCloud