[libvirt] [PATCH] Do not enforce source type of console[0]

If console[0] is an alias for serial[0], do not enforce the former to have a PTY source type. This breaks serial consoles on stdio and makes no sense. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- src/qemu/qemu_process.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ef311d1..216b594 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1376,7 +1376,6 @@ qemuProcessFindCharDevicePTYs(virDomainObjPtr vm, if ((ret = virDomainChrSourceDefCopy(&chr->source, &((vm->def->serials[0])->source))) != 0) return ret; - chr->source.type = VIR_DOMAIN_CHR_TYPE_PTY; } else { if (chr->source.type == VIR_DOMAIN_CHR_TYPE_PTY && chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO) { -- 1.7.3.4

On 2012-03-13 16:48, Jan Kiszka wrote:
If console[0] is an alias for serial[0], do not enforce the former to have a PTY source type. This breaks serial consoles on stdio and makes no sense.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- src/qemu/qemu_process.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ef311d1..216b594 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1376,7 +1376,6 @@ qemuProcessFindCharDevicePTYs(virDomainObjPtr vm, if ((ret = virDomainChrSourceDefCopy(&chr->source, &((vm->def->serials[0])->source))) != 0) return ret; - chr->source.type = VIR_DOMAIN_CHR_TYPE_PTY; } else { if (chr->source.type == VIR_DOMAIN_CHR_TYPE_PTY && chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO) {
Ping. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux

On 04/16/2012 09:47 AM, Jan Kiszka wrote:
On 2012-03-13 16:48, Jan Kiszka wrote:
If console[0] is an alias for serial[0], do not enforce the former to have a PTY source type. This breaks serial consoles on stdio and makes no sense.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- src/qemu/qemu_process.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ef311d1..216b594 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1376,7 +1376,6 @@ qemuProcessFindCharDevicePTYs(virDomainObjPtr vm, if ((ret = virDomainChrSourceDefCopy(&chr->source, &((vm->def->serials[0])->source))) != 0) return ret; - chr->source.type = VIR_DOMAIN_CHR_TYPE_PTY; } else { if (chr->source.type == VIR_DOMAIN_CHR_TYPE_PTY && chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO) {
Michal originally made that change, I'm guessing it was an oversight though. ACK. - Cole

On 04/16/2012 10:05 AM, Cole Robinson wrote:
On 04/16/2012 09:47 AM, Jan Kiszka wrote:
On 2012-03-13 16:48, Jan Kiszka wrote:
If console[0] is an alias for serial[0], do not enforce the former to have a PTY source type. This breaks serial consoles on stdio and makes no sense.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- src/qemu/qemu_process.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ef311d1..216b594 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1376,7 +1376,6 @@ qemuProcessFindCharDevicePTYs(virDomainObjPtr vm, if ((ret = virDomainChrSourceDefCopy(&chr->source, &((vm->def->serials[0])->source))) != 0) return ret; - chr->source.type = VIR_DOMAIN_CHR_TYPE_PTY; } else { if (chr->source.type == VIR_DOMAIN_CHR_TYPE_PTY && chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO) {
Michal originally made that change, I'm guessing it was an oversight though.
ACK.
I added you to AUTHORS, and pushed. Let me know if you prefer an alternate spelling in that file. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Cole Robinson
-
Eric Blake
-
Jan Kiszka