aboutsummaryrefslogtreecommitdiff
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2018-01-29 11:47:06 +0100
committerLaurent Vivier <laurent@vivier.eu>2018-02-18 18:52:32 +0100
commit2b74f621f1c78023177eab59bce4357867d772f2 (patch)
treebc49a815eee372e55f095545fdcf4b171903a7ba /linux-user/syscall.c
parentf0fa81767555fe2c4b5f8c9e0725a80eac1d7f56 (diff)
linux-user: Implement ioctl cmd TIOCGPTPEER
With glibc 2.27 the openpty function prefers the TIOCGPTPEER ioctl. Signed-off-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <mvmbmhdosb9.fsf_-_@suse.de> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 82b35a6bdf..effc3a0881 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5636,6 +5636,15 @@ static abi_long do_ioctl_kdsigaccept(const IOCTLEntry *ie, uint8_t *buf_temp,
return get_errno(safe_ioctl(fd, ie->host_cmd, sig));
}
+#ifdef TIOCGPTPEER
+static abi_long do_ioctl_tiocgptpeer(const IOCTLEntry *ie, uint8_t *buf_temp,
+ int fd, int cmd, abi_long arg)
+{
+ int flags = target_to_host_bitmask(arg, fcntl_flags_tbl);
+ return get_errno(safe_ioctl(fd, ie->host_cmd, flags));
+}
+#endif
+
static IOCTLEntry ioctl_entries[] = {
#define IOCTL(cmd, access, ...) \
{ TARGET_ ## cmd, cmd, #cmd, access, 0, { __VA_ARGS__ } },