summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2004-09-19 21:34:42 +0000
committermickey <mickey@openbsd.org>2004-09-19 21:34:42 +0000
commit65cd0f3c7ada6fb77dba2452acefe3c79434dcb9 (patch)
tree343aaa8244f71165534db53695e727ea5d4b06ee
parentnop missing in bd slot (diff)
downloadwireguard-openbsd-65cd0f3c7ada6fb77dba2452acefe3c79434dcb9.tar.xz
wireguard-openbsd-65cd0f3c7ada6fb77dba2452acefe3c79434dcb9.zip
constify speedtabs and make ttspeedtab() take a const struct speedtab *
-rw-r--r--sys/arch/alpha/tc/scc.c4
-rw-r--r--sys/arch/hp300/dev/apci.c4
-rw-r--r--sys/arch/hp300/dev/dca.c4
-rw-r--r--sys/arch/hp300/dev/dcm.c4
-rw-r--r--sys/arch/luna88k/dev/siotty.c4
-rw-r--r--sys/arch/vax/qbus/dhu.c4
-rw-r--r--sys/arch/vax/qbus/dz.c4
-rw-r--r--sys/arch/vax/vsa/dc.c4
-rw-r--r--sys/compat/common/tty_43.c6
-rw-r--r--sys/compat/ibcs2/ibcs2_ioctl.c6
-rw-r--r--sys/compat/sunos/sunos_ioctl.c6
-rw-r--r--sys/compat/ultrix/ultrix_ioctl.c6
-rw-r--r--sys/kern/tty.c4
-rw-r--r--sys/sys/tty.h4
14 files changed, 32 insertions, 32 deletions
diff --git a/sys/arch/alpha/tc/scc.c b/sys/arch/alpha/tc/scc.c
index 82fcc24a18e..00aa9a6b1e2 100644
--- a/sys/arch/alpha/tc/scc.c
+++ b/sys/arch/alpha/tc/scc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scc.c,v 1.19 2003/10/03 16:44:49 miod Exp $ */
+/* $OpenBSD: scc.c,v 1.20 2004/09/19 21:34:42 mickey Exp $ */
/* $NetBSD: scc.c,v 1.58 2002/03/17 19:40:27 atatat Exp $ */
/*
@@ -136,7 +136,7 @@ struct scc_softc {
*
* Speed selections with Pclk=7.3728MHz, clock x16
*/
-struct speedtab sccspeedtab[] = {
+const struct speedtab sccspeedtab[] = {
{ 0, 0, },
{ 50, 4606, },
{ 75, 3070, },
diff --git a/sys/arch/hp300/dev/apci.c b/sys/arch/hp300/dev/apci.c
index e73f11fd17f..6b2b911dd1e 100644
--- a/sys/arch/hp300/dev/apci.c
+++ b/sys/arch/hp300/dev/apci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apci.c,v 1.15 2003/10/03 16:44:49 miod Exp $ */
+/* $OpenBSD: apci.c,v 1.16 2004/09/19 21:34:42 mickey Exp $ */
/* $NetBSD: apci.c,v 1.9 2000/11/02 00:35:05 eeh Exp $ */
/*-
@@ -166,7 +166,7 @@ cdev_decl(apci);
int apcidefaultrate = TTYDEF_SPEED;
-struct speedtab apcispeedtab[] = {
+const struct speedtab apcispeedtab[] = {
{ 0, 0 },
{ 50, APCIBRD(50) },
{ 75, APCIBRD(75) },
diff --git a/sys/arch/hp300/dev/dca.c b/sys/arch/hp300/dev/dca.c
index 621c29d40b6..3b72eaa29ec 100644
--- a/sys/arch/hp300/dev/dca.c
+++ b/sys/arch/hp300/dev/dca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dca.c,v 1.18 2003/10/03 16:44:49 miod Exp $ */
+/* $OpenBSD: dca.c,v 1.19 2004/09/19 21:34:42 mickey Exp $ */
/* $NetBSD: dca.c,v 1.35 1997/05/05 20:58:18 thorpej Exp $ */
/*
@@ -128,7 +128,7 @@ void dcacnputc(dev_t, int);
static struct dcadevice *dca_cn = NULL; /* pointer to hardware */
static int dcaconsinit; /* has been initialized */
-struct speedtab dcaspeedtab[] = {
+const struct speedtab dcaspeedtab[] = {
{ 0, 0 },
{ 50, DCABRD(50) },
{ 75, DCABRD(75) },
diff --git a/sys/arch/hp300/dev/dcm.c b/sys/arch/hp300/dev/dcm.c
index cfee8db6ddf..038f321ba65 100644
--- a/sys/arch/hp300/dev/dcm.c
+++ b/sys/arch/hp300/dev/dcm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dcm.c,v 1.17 2003/12/22 20:38:07 jmc Exp $ */
+/* $OpenBSD: dcm.c,v 1.18 2004/09/19 21:34:42 mickey Exp $ */
/* $NetBSD: dcm.c,v 1.41 1997/05/05 20:59:16 thorpej Exp $ */
/*
@@ -77,7 +77,7 @@
#define DEFAULT_BAUD_RATE 9600
#endif
-struct speedtab dcmspeedtab[] = {
+const struct speedtab dcmspeedtab[] = {
{ 0, BR_0 },
{ 50, BR_50 },
{ 75, BR_75 },
diff --git a/sys/arch/luna88k/dev/siotty.c b/sys/arch/luna88k/dev/siotty.c
index 516790e5f7e..e4ebf35aeb6 100644
--- a/sys/arch/luna88k/dev/siotty.c
+++ b/sys/arch/luna88k/dev/siotty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siotty.c,v 1.1.1.1 2004/04/21 15:23:55 aoyama Exp $ */
+/* $OpenBSD: siotty.c,v 1.2 2004/09/19 21:34:42 mickey Exp $ */
/* $NetBSD: siotty.c,v 1.9 2002/03/17 19:40:43 atatat Exp $ */
/*-
@@ -65,7 +65,7 @@ static const u_int8_t ch0_regs[6] = {
WR5_TX8BIT | WR5_TXENBL | WR5_DTR | WR5_RTS, /* Tx */
};
-static struct speedtab siospeedtab[] = {
+static const struct speedtab siospeedtab[] = {
{ 2400, WR4_BAUD24, },
{ 4800, WR4_BAUD48, },
{ 9600, WR4_BAUD96, },
diff --git a/sys/arch/vax/qbus/dhu.c b/sys/arch/vax/qbus/dhu.c
index 87884c4712e..ebcfd18277b 100644
--- a/sys/arch/vax/qbus/dhu.c
+++ b/sys/arch/vax/qbus/dhu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhu.c,v 1.11 2004/07/07 23:10:45 deraadt Exp $ */
+/* $OpenBSD: dhu.c,v 1.12 2004/09/19 21:34:42 mickey Exp $ */
/* $NetBSD: dhu.c,v 1.19 2000/06/04 06:17:01 matt Exp $ */
/*
* Copyright (c) 2003, Hugh Graham.
@@ -109,7 +109,7 @@ struct dhu_softc {
/* a baud rate from the same group. So limiting to B is likely */
/* best, although clone boards like the ABLE QHV allow all settings. */
-static struct speedtab dhuspeedtab[] = {
+static const struct speedtab dhuspeedtab[] = {
{ 0, 0 }, /* Groups */
{ 50, DHU_LPR_B50 }, /* A */
{ 75, DHU_LPR_B75 }, /* B */
diff --git a/sys/arch/vax/qbus/dz.c b/sys/arch/vax/qbus/dz.c
index c80204fac20..0001eae092a 100644
--- a/sys/arch/vax/qbus/dz.c
+++ b/sys/arch/vax/qbus/dz.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dz.c,v 1.11 2004/07/07 23:10:46 deraadt Exp $ */
+/* $OpenBSD: dz.c,v 1.12 2004/09/19 21:34:42 mickey Exp $ */
/* $NetBSD: dz.c,v 1.23 2000/06/04 02:14:12 matt Exp $ */
/*
* Copyright (c) 1996 Ken C. Wellsch. All rights reserved.
@@ -83,7 +83,7 @@
#define DML_RI TIOCM_RI
#define DML_BRK 0100000 /* no equivalent, we will mask */
-static struct speedtab dzspeedtab[] =
+static const struct speedtab dzspeedtab[] =
{
{ 0, 0 },
{ 50, DZ_LPR_B50 },
diff --git a/sys/arch/vax/vsa/dc.c b/sys/arch/vax/vsa/dc.c
index 4d0d6b936c6..1e2e9e7ca19 100644
--- a/sys/arch/vax/vsa/dc.c
+++ b/sys/arch/vax/vsa/dc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dc.c,v 1.10 2004/01/29 21:34:17 deraadt Exp $ */
+/* $OpenBSD: dc.c,v 1.11 2004/09/19 21:34:42 mickey Exp $ */
/* $NetBSD: dc.c,v 1.4 1996/10/13 03:36:10 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -173,7 +173,7 @@ struct timeout dc_timeout;
*/
struct pdma dcpdma[NDCLINE];
-struct speedtab dcspeedtab[] = {
+const struct speedtab dcspeedtab[] = {
0, 0,
50, LPR_B50,
75, LPR_B75,
diff --git a/sys/compat/common/tty_43.c b/sys/compat/common/tty_43.c
index 5c7a322b148..8c7595b548e 100644
--- a/sys/compat/common/tty_43.c
+++ b/sys/compat/common/tty_43.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_43.c,v 1.8 2003/06/02 23:27:59 millert Exp $ */
+/* $OpenBSD: tty_43.c,v 1.9 2004/09/19 21:34:42 mickey Exp $ */
/* $NetBSD: tty_43.c,v 1.5 1996/05/20 14:29:17 mark Exp $ */
/*-
@@ -54,7 +54,7 @@
int ttydebug = 0;
-static struct speedtab compatspeeds[] = {
+static const struct speedtab compatspeeds[] = {
#define MAX_SPEED 17
{ 115200, 17 },
{ 57600, 16 },
@@ -76,7 +76,7 @@ static struct speedtab compatspeeds[] = {
{ 0, 0 },
{ -1, -1 },
};
-static int compatspcodes[] = {
+static const int compatspcodes[] = {
0, 50, 75, 110, 134, 150, 200, 300, 600, 1200,
1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200
};
diff --git a/sys/compat/ibcs2/ibcs2_ioctl.c b/sys/compat/ibcs2/ibcs2_ioctl.c
index b02eb51978e..90bac72aaeb 100644
--- a/sys/compat/ibcs2/ibcs2_ioctl.c
+++ b/sys/compat/ibcs2/ibcs2_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ibcs2_ioctl.c,v 1.11 2002/03/14 01:26:50 millert Exp $ */
+/* $OpenBSD: ibcs2_ioctl.c,v 1.12 2004/09/19 21:34:42 mickey Exp $ */
/* $NetBSD: ibcs2_ioctl.c,v 1.12 1996/08/10 09:08:26 mycroft Exp $ */
/*
@@ -72,7 +72,7 @@
* iBCS2 ioctl calls.
*/
-static struct speedtab sptab[] = {
+static const struct speedtab sptab[] = {
{ 0, 0 },
{ 50, 1 },
{ 75, 2 },
@@ -93,7 +93,7 @@ static struct speedtab sptab[] = {
{ -1, -1 }
};
-static u_long s2btab[] = {
+static const u_long s2btab[] = {
0,
50,
75,
diff --git a/sys/compat/sunos/sunos_ioctl.c b/sys/compat/sunos/sunos_ioctl.c
index 188f77c14d0..7595ef9ee00 100644
--- a/sys/compat/sunos/sunos_ioctl.c
+++ b/sys/compat/sunos/sunos_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sunos_ioctl.c,v 1.15 2004/02/01 15:39:38 miod Exp $ */
+/* $OpenBSD: sunos_ioctl.c,v 1.16 2004/09/19 21:34:43 mickey Exp $ */
/* $NetBSD: sunos_ioctl.c,v 1.23 1996/03/14 19:33:46 christos Exp $ */
/*
@@ -55,7 +55,7 @@
* Support gets added as things turn up....
*/
-static struct speedtab sptab[] = {
+static const struct speedtab sptab[] = {
{ 0, 0 },
{ 50, 1 },
{ 75, 2 },
@@ -76,7 +76,7 @@ static struct speedtab sptab[] = {
{ -1, -1 }
};
-static u_long s2btab[] = {
+static const u_long s2btab[] = {
0,
50,
75,
diff --git a/sys/compat/ultrix/ultrix_ioctl.c b/sys/compat/ultrix/ultrix_ioctl.c
index 9f96b4b5a28..cd719ea24e5 100644
--- a/sys/compat/ultrix/ultrix_ioctl.c
+++ b/sys/compat/ultrix/ultrix_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ultrix_ioctl.c,v 1.10 2003/08/06 21:08:06 millert Exp $ */
+/* $OpenBSD: ultrix_ioctl.c,v 1.11 2004/09/19 21:34:43 mickey Exp $ */
/* $NetBSD: ultrix_ioctl.c,v 1.3.4.1 1996/06/13 18:22:37 jonathan Exp $ */
/* from : NetBSD: sunos_ioctl.c,v 1.21 1995/10/07 06:27:31 mycroft Exp */
@@ -58,7 +58,7 @@
* Support gets added as things turn up....
*/
-static struct speedtab sptab[] = {
+static const struct speedtab sptab[] = {
{ 0, 0 },
{ 50, 1 },
{ 75, 2 },
@@ -79,7 +79,7 @@ static struct speedtab sptab[] = {
{ -1, -1 }
};
-static u_long s2btab[] = {
+static const u_long s2btab[] = {
0,
50,
75,
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 6dec67d20fe..20cd1c00897 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.65 2004/06/13 21:49:26 niklas Exp $ */
+/* $OpenBSD: tty.c,v 1.66 2004/09/19 21:34:43 mickey Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -2036,7 +2036,7 @@ ttwakeup(tp)
int
ttspeedtab(speed, table)
int speed;
- register struct speedtab *table;
+ const struct speedtab *table;
{
for ( ; table->sp_speed != -1; table++)
diff --git a/sys/sys/tty.h b/sys/sys/tty.h
index 0df3ba033cd..e34d3f18968 100644
--- a/sys/sys/tty.h
+++ b/sys/sys/tty.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.h,v 1.18 2004/02/10 01:31:21 millert Exp $ */
+/* $OpenBSD: tty.h,v 1.19 2004/09/19 21:34:43 mickey Exp $ */
/* $NetBSD: tty.h,v 1.30.4.1 1996/06/02 09:08:13 mrg Exp $ */
/*-
@@ -265,7 +265,7 @@ void ttrstrt(void *tp);
int ttpoll(dev_t device, int events, struct proc *p);
int ttkqfilter(dev_t dev, struct knote *kn);
void ttsetwater(struct tty *tp);
-int ttspeedtab(int speed, struct speedtab *table);
+int ttspeedtab(int speed, const struct speedtab *table);
int ttstart(struct tty *tp);
void ttwakeup(struct tty *tp);
int ttwrite(struct tty *tp, struct uio *uio, int flag);