[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/10] Fix struct termios host - target translation
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PATCH 08/10] Fix struct termios host - target translation |
Date: |
Wed, 29 Apr 2009 21:03:21 +0300 |
From: Arnaud Patard <address@hidden>
When converting the termios structure between host and target in
target_to_host_termios and host_to_target_termios, the c_cc[] array is
never initialised.
Calling memset() before using it allows to run successfully "stty echo /
stty -echo" on arm-linux-user target (host being x86 and mips).
From: Arnaud Patard <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/syscall.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index b76d6aa..f99db77 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2977,6 +2977,7 @@ static void target_to_host_termios (void *dst, const void
*src)
target_to_host_bitmask(tswap32(target->c_lflag), lflag_tbl);
host->c_line = target->c_line;
+ memset(host->c_cc, 0, sizeof(host->c_cc));
host->c_cc[VINTR] = target->c_cc[TARGET_VINTR];
host->c_cc[VQUIT] = target->c_cc[TARGET_VQUIT];
host->c_cc[VERASE] = target->c_cc[TARGET_VERASE];
@@ -3011,6 +3012,7 @@ static void host_to_target_termios (void *dst, const void
*src)
tswap32(host_to_target_bitmask(host->c_lflag, lflag_tbl));
target->c_line = host->c_line;
+ memset(target->c_cc, 0, sizeof(target->c_cc));
target->c_cc[TARGET_VINTR] = host->c_cc[VINTR];
target->c_cc[TARGET_VQUIT] = host->c_cc[VQUIT];
target->c_cc[TARGET_VERASE] = host->c_cc[VERASE];
--
1.6.2.1
- [Qemu-devel] [PATCH 01/10] export mmap_find_vma for shmat, riku . voipio, 2009/04/29
- [Qemu-devel] [PATCH 02/10] Implement shm* syscalls and fix 64/32bit errors, riku . voipio, 2009/04/29
- [Qemu-devel] [PATCH 04/10] linux-user: added x86 and x86_64 support for ELF coredump, riku . voipio, 2009/04/29
- [Qemu-devel] [PATCH 06/10] Revived GUEST_BASE support for usermode emulation targets [v2], riku . voipio, 2009/04/29
- [Qemu-devel] [PATCH 05/10] linux-user: strace now handles guest strings correctly, riku . voipio, 2009/04/29
- [Qemu-devel] [PATCH 10/10] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls, riku . voipio, 2009/04/29
- [Qemu-devel] [PATCH 03/10] linux-user: implemented ELF coredump support for ARM target [v2], riku . voipio, 2009/04/29
- [Qemu-devel] [PATCH 08/10] Fix struct termios host - target translation,
riku . voipio <=
- [Qemu-devel] [PATCH 09/10] linux-user: fix utimensat with NULL timespec, riku . voipio, 2009/04/29
- [Qemu-devel] [PATCH 07/10] linux-user: fix utimensat when used as futimens, riku . voipio, 2009/04/29
- Re: [Qemu-devel] [PATCH 01/10] export mmap_find_vma for shmat, Martin Mohring, 2009/04/30