summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2017-06-29 04:23:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2017-06-29 04:23:13 +0000
commitc8c07c56afc1f99aad34d7061323f7f99ba7d449 (patch)
tree3850fc7526d5b464890c0c27dc249fd1ab4db726
parent32428752d331f4d574431cd34606ef1863bd5f3d (diff)
Switch TIOCSTAT to _IO(). Two decades ago it was mistakenly defined to
take an argument. Discussed with millert and tedu.
-rw-r--r--bin/csh/file.c6
-rw-r--r--sys/sys/ttycom.h4
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, &nothing);
+ 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 */