Fix up option parsing to allow a colon in the config section.
Clean up some other unnecessary code. Submitted by: Dinakar Medavaram dinnu sun at gmail Reviewed by: neel
This commit is contained in:
parent
0022f867b4
commit
34d244edb2
@ -140,20 +140,15 @@ pci_parse_slot(char *opt, int legacy)
|
||||
error = -1;
|
||||
str = cpy = strdup(opt);
|
||||
|
||||
config = NULL;
|
||||
|
||||
if (strchr(str, ':') != NULL) {
|
||||
slot = strsep(&str, ":");
|
||||
func = strsep(&str, ",");
|
||||
} else {
|
||||
slot = strsep(&str, ",");
|
||||
func = NULL;
|
||||
}
|
||||
|
||||
slot = strsep(&str, ",");
|
||||
func = NULL;
|
||||
if (strchr(slot, ':') != NULL) {
|
||||
func = cpy;
|
||||
(void) strsep(&func, ":");
|
||||
}
|
||||
|
||||
emul = strsep(&str, ",");
|
||||
if (str != NULL) {
|
||||
config = strsep(&str, ",");
|
||||
}
|
||||
config = str;
|
||||
|
||||
if (emul == NULL) {
|
||||
pci_parse_slot_usage(opt);
|
||||
|
Loading…
Reference in New Issue
Block a user