Why does qemu guest turn on the Host serial device post-processing options?

Solution Verified - Updated -

Issue

On the Host, even using -opost, which tells to your serial port to ignore any enabled specific post-processing option:

[root@host ~]# stty -F /dev/ttyS4 -opost

If a qemu Guest inside the Host tries to transmit data using a virtual serial port mapped to the physical serial ttyS4, the data transmitted will be affected by post-processing options.

For example, in a given qemu Guest with /dev/ttyS0 mapped to Host /dev/ttyS4, writing the following characters on guest serial device /dev/ttyS0:

 0x41
 0x0A
 0x42

The data captured from Host serial device /dev/ttyS4 will be:

 0x41
 0x0D
 0x0A
 0x42

In this case, the data is affected by onlcr post-processing option, translating newline (0x0A) to carriage return-newline (0x0D).

Environment

  • Red Hat Enterprise Linux 6
  • qemu-kvm-0.12

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content