diff options
author | Toomas Soome <tsoome@me.com> | 2022-03-23 13:00:46 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2022-04-04 18:25:20 +0300 |
commit | 2af7a84a44750559d578033163c65829ae91c171 (patch) | |
tree | 29772fbcf0a7c04bf2067832188a8c954277c4e0 /usr | |
parent | 07a53f3dc8bc5e4d64bde9b92063de65f06dcf19 (diff) | |
download | illumos-joyent-2af7a84a44750559d578033163c65829ae91c171.tar.gz |
14584 unix: console property should only have one value
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Reviewed by: C Fraire <cfraire@me.com>
Reviewed by: Michael van der Westhuizen <r1mikey@gmail.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/uts/i86pc/os/fakebop.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/usr/src/uts/i86pc/os/fakebop.c b/usr/src/uts/i86pc/os/fakebop.c index eb91d4a56a..07bc24971f 100644 --- a/usr/src/uts/i86pc/os/fakebop.c +++ b/usr/src/uts/i86pc/os/fakebop.c @@ -1448,6 +1448,30 @@ process_boot_environment(struct boot_modules *benv) continue; } + /* + * The loader allows multiple console devices to be specified + * as a comma-separated list, but the kernel does not yet + * support multiple console devices. If a list is provided, + * ignore all but the first entry: + */ + if (strcmp(name, "console") == 0) { + char propval[BP_MAX_STRLEN]; + + for (uint32_t i = 0; i < BP_MAX_STRLEN; i++) { + propval[i] = value[i]; + if (value[i] == ' ' || + value[i] == ',' || + value[i] == '\0') { + propval[i] = '\0'; + break; + } + + if (i + 1 == BP_MAX_STRLEN) + propval[i] = '\0'; + } + bsetprops(name, propval); + continue; + } if (name_is_blacklisted(name) == B_TRUE) continue; |