On 08/31/2018, 10:34 AM, Jiri Slaby wrote:
On 08/31/2018, 09:45 AM, Michal Kubecek wrote:
Actually the best thing would probably be to enhance that driver to only create devices for ports, that are actually available. But then I think only very brave (and bored) people would really dare to touch this code ;-)
That's what some people suggested in those earlier discussions. But nobody took the challenge. Can't say I'm surprised, though... :-)
Heh :D. I wrote and rewrote a lot of pieces in there. And the reason why we create ports which are not "available" is quite simple. You can use setserial on those /dev nodes to actually configure the port and make it available immediately...
Example: qemu ... -serial stdio -chardev file,path=/tmp/ser,id=mychr -device isa-serial,iobase=0x1000,chardev=mychr factory:~ # setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 factory:~ # setserial /dev/ttyS1 /dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3 factory:~ # echo a > /dev/ttyS1 -bash: echo: write error: Input/output error factory:~ # setserial /dev/ttyS1 port 0x1000 autoconfig factory:~ # echo a > /dev/ttyS1 factory:~ # And "a" is suddenly in /tmp/ser on the host.
thanks, -- js suse labs -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org