Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174484162
D28168.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28168.diff
View Options
diff --git a/sys/dev/uart/uart_subr.c b/sys/dev/uart/uart_subr.c
--- a/sys/dev/uart/uart_subr.c
+++ b/sys/dev/uart/uart_subr.c
@@ -172,7 +172,7 @@
out:
*p += 2;
- if ((*p)[0] != ':')
+ if ((*p)[0] != ':' && (*p)[0] != '=')
return (-1);
(*p)++;
return (tag);
@@ -283,25 +283,22 @@
di->bas.rclk = uart_parse_long(&spec);
break;
default:
- freeenv(cp);
- return (EINVAL);
+ goto inval;
}
if (*spec == '\0')
break;
- if (*spec != ',') {
- freeenv(cp);
- return (EINVAL);
- }
+ if (*spec != ',')
+ goto inval;
spec++;
}
- freeenv(cp);
/*
* If we still have an invalid address, the specification must be
* missing an I/O port or memory address. We don't like that.
*/
if (addr == ~0U)
- return (EINVAL);
+ goto inval;
+ freeenv(cp);
/*
* Accept only the well-known baudrates. Any invalid baudrate
@@ -327,4 +324,8 @@
error = bus_space_map(di->bas.bst, addr, uart_getrange(class), 0,
&di->bas.bsh);
return (error);
+inval:
+ printf("warning: bad uart specification: %s\n", cp);
+ freeenv(cp);
+ return (EINVAL);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 4, 2:45 PM (4 h, 10 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40194607
Default Alt Text
D28168.diff (1 KB)
Attached To
Mode
D28168: uart: Improve console specification parsing
Attached
Detach File
Event Timeline
Log In to Comment