[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] xen/uart: report an error if the device type is not supported



commit 550ee7c198010c297d74b69e07d95a26358eadbd
Author:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Fri Mar 20 10:17:15 2026 +0100
Commit:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
CommitDate: Fri Mar 27 14:52:40 2026 +0100

    xen/uart: report an error if the device type is not supported
    
    When using key pairs for the uart configuration (com1 and com2 command line
    options), report an error if the passed device=<type> is not recognized
    instead of silently ignoring it.
    
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/drivers/char/ns16550.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index df7fff7f81..d384f1c69d 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -1674,6 +1674,8 @@ static bool __init parse_namevalue_pairs(char *str, 
struct ns16550 *uart)
                 pci_uart_config(uart, 0, uart - ns16550_com);
                 dev_set = true;
             }
+            else
+                PARSE_ERR_RET("Unknown device type %s\n", param_value);
             break;
 
         case port_bdf:
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.