Hello,

I have faced an issue in using serial ports when I need to skip a couple of ports in the CLI.

For example the ARM machine netduinoplus2 supports up to 7 UARTS. 
Following case works (the first UART is used to send data in the firmware):
qemu-system-arm -machine netduinoplus2 -nographic -serial mon:stdio -kernel path-to-fw/firmware.elf
But this one doesn't  (the third UART is used to send data in the firmware):
qemu-system-arm -machine netduinoplus2 -nographic -serial none -serial none -serial mon:stdio -kernel path-to-fw/firmware.elf

The patch fixes the issue.

Best regards,
Bohdan