From 6b4ead63fb64f05f1f18d161b0cbf2a1588d6ebb Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 29 Jun 2017 04:23:12 +0000 Subject: [PATCH] Switch TIOCSTAT to _IO(). Two decades ago it was mistakenly defined to take an argument. Discussed with millert and tedu. --- bin/csh/file.c | 6 ++---- sys/sys/ttycom.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/csh/file.c b/bin/csh/file.c index 60b84675b20..638c6deda3f 100644 --- a/bin/csh/file.c +++ b/bin/csh/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.29 2017/06/27 15:02:18 anton Exp $ */ +/* $OpenBSD: file.c,v 1.30 2017/06/29 04:23:12 deraadt Exp $ */ /* $NetBSD: file.c,v 1.11 1996/11/08 19:34:37 christos Exp $ */ /*- @@ -367,10 +367,8 @@ cl_reprint(struct cmdline *cl, int c) static int cl_status(struct cmdline *cl, int c) { - int nothing = 0; - cl->cursor = 0; - ioctl(cl->fdin, TIOCSTAT, ¬hing); + ioctl(cl->fdin, TIOCSTAT); return 0; } diff --git a/sys/sys/ttycom.h b/sys/sys/ttycom.h index b0afe438d50..cb4f9476bf1 100644 --- a/sys/sys/ttycom.h +++ b/sys/sys/ttycom.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ttycom.h,v 1.14 2016/09/02 18:11:28 tedu Exp $ */ +/* $OpenBSD: ttycom.h,v 1.15 2017/06/29 04:23:12 deraadt Exp $ */ /* $NetBSD: ttycom.h,v 1.4 1996/05/19 17:17:53 jonathan Exp $ */ /*- @@ -116,7 +116,7 @@ struct tstamps { #define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ #define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ #define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ -#define TIOCSTAT _IOW('t', 101, int) /* generate status message */ +#define TIOCSTAT _IO('t', 101) /* generate status message */ #define UIOCCMD(n) _IO('u', n) /* usr cntl op "n" */ #define TIOCGSID _IOR('t', 99, int) /* get sid of tty */ #define TIOCCONS _IOW('t', 98, int) /* become virtual console */ -- 2.20.1