summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorjdolecek <jdolecek@NetBSD.org>2001-01-18 20:28:15 +0000
committerjdolecek <jdolecek@NetBSD.org>2001-01-18 20:28:15 +0000
commit34c8ae80dab7dff7ee69b219c6bf49ca6e84e73f (patch)
tree625354b477ae0db6bb663fa25ffc8be7214a49a0 /sys
parente912e655e179f7c8dd5317da1faff48b8b02cf8e (diff)
constify
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/freebsd/freebsd_file.c11
-rw-r--r--sys/compat/ibcs2/ibcs2_errno.c4
-rw-r--r--sys/compat/ibcs2/ibcs2_errno.h4
-rw-r--r--sys/compat/ibcs2/ibcs2_ioctl.c4
-rw-r--r--sys/compat/ibcs2/ibcs2_signal.c6
-rw-r--r--sys/compat/ibcs2/ibcs2_signal.h4
-rw-r--r--sys/compat/linux/arch/alpha/linux_sigarray.c4
-rw-r--r--sys/compat/linux/arch/i386/linux_machdep.c6
-rw-r--r--sys/compat/linux/arch/i386/linux_sigarray.c4
-rw-r--r--sys/compat/linux/arch/m68k/linux_sigarray.c4
-rw-r--r--sys/compat/linux/common/linux_errno.c4
-rw-r--r--sys/compat/linux/common/linux_errno.h4
-rw-r--r--sys/compat/linux/common/linux_signal.c4
-rw-r--r--sys/compat/linux/common/linux_signal.h6
-rw-r--r--sys/compat/ossaudio/ossaudio.c9
-rw-r--r--sys/dev/eisa/devlist2h.awk4
-rw-r--r--sys/dev/eisa/eisa.c4
-rw-r--r--sys/dev/eisa/eisadevs_data.h4
-rw-r--r--sys/dev/ic/ac97.c42
-rw-r--r--sys/dev/ic/ad1848.c10
-rw-r--r--sys/dev/ic/advmcode.c8
-rw-r--r--sys/dev/ic/advmcode.h8
-rw-r--r--sys/dev/ic/adwmcode.h4
-rw-r--r--sys/dev/ic/aic7xxx.c44
-rw-r--r--sys/dev/ic/aic7xxxvar.h4
-rw-r--r--sys/dev/ic/awi_wep.c8
-rw-r--r--sys/dev/ic/awivar.h4
-rw-r--r--sys/dev/ic/opl.c10
-rw-r--r--sys/dev/ic/oplinstrs.c6
-rw-r--r--sys/dev/ic/oplvar.h8
-rw-r--r--sys/dev/ic/pcdisplay_chars.c8
-rw-r--r--sys/dev/ic/vga.c20
-rw-r--r--sys/dev/isa/fd.c24
-rw-r--r--sys/dev/isa/gus.c14
-rw-r--r--sys/dev/microcode/aic7xxx/aic7xxx_seq.h2
-rw-r--r--sys/dev/microcode/aic7xxx/aicasm.c4
-rw-r--r--sys/dev/midisyn.c10
-rw-r--r--sys/dev/mulaw.c10
-rw-r--r--sys/dev/pci/ahc_pci.c16
-rw-r--r--sys/dev/pci/bktr/bktr_core.c32
-rw-r--r--sys/dev/pci/bktr/bktr_tuner.c26
-rw-r--r--sys/dev/pci/cmpci.c4
-rw-r--r--sys/dev/pci/cs4280.c6
-rw-r--r--sys/dev/pci/cs4280_image.h4
-rw-r--r--sys/dev/pci/if_ti.c15
-rw-r--r--sys/dev/pci/ti_fw.h34
-rw-r--r--sys/dev/pci/ti_fw2.h34
-rw-r--r--sys/dev/pcmcia/if_awi_pcmcia.c12
-rw-r--r--sys/dev/pcmcia/if_ne_pcmcia.c6
-rw-r--r--sys/dev/pcmcia/if_wi.c12
-rw-r--r--sys/dev/pcmcia/pcmcia_cis_quirks.c41
-rw-r--r--sys/dev/pcmcia/pcmciavar.h8
-rw-r--r--sys/dev/scsipi/atapiconf.c4
-rw-r--r--sys/dev/scsipi/scsiconf.c4
-rw-r--r--sys/dev/scsipi/st.c4
-rw-r--r--sys/dev/usb/devlist2h.awk4
-rw-r--r--sys/dev/usb/ezload.c8
-rw-r--r--sys/dev/usb/ezload.h6
-rw-r--r--sys/dev/usb/if_aue.c12
-rw-r--r--sys/dev/usb/if_kue.c14
-rw-r--r--sys/dev/usb/usb_quirks.c10
-rw-r--r--sys/dev/usb/usb_quirks.h6
-rw-r--r--sys/dev/usb/usb_subr.c6
-rw-r--r--sys/dev/usb/usbdevs_data.h4
-rw-r--r--sys/dev/usb/usbdi.h4
-rw-r--r--sys/dev/usb/usbdivar.h4
-rw-r--r--sys/dev/usb/uyap.c6
-rw-r--r--sys/dev/wscons/wsemul_vt100_chars.c10
-rw-r--r--sys/isofs/cd9660/cd9660_rrip.c18
-rw-r--r--sys/kern/kern_malloc.c6
-rw-r--r--sys/kern/tty_tb.c32
-rw-r--r--sys/kern/vnode_if.c206
-rw-r--r--sys/kern/vnode_if.sh16
-rw-r--r--sys/miscfs/procfs/procfs.h4
-rw-r--r--sys/miscfs/procfs/procfs_ctl.c8
-rw-r--r--sys/miscfs/procfs/procfs_subr.c8
-rw-r--r--sys/miscfs/umapfs/umap_vnops.c4
-rw-r--r--sys/msdosfs/msdosfs_conv.c16
-rw-r--r--sys/net/ppp_tty.c6
-rw-r--r--sys/net/zlib.c20
-rw-r--r--sys/netinet/fil.c12
-rw-r--r--sys/netinet/tcp_usrreq.c4
-rw-r--r--sys/netiso/tp_driver.c8
-rw-r--r--sys/nfs/nfs_subs.c70
-rw-r--r--sys/sys/vnode.h8
-rw-r--r--sys/sys/vnode_if.h204
-rw-r--r--sys/ufs/ffs/ffs_alloc.c6
-rw-r--r--sys/ufs/ffs/ffs_tables.c12
88 files changed, 684 insertions, 678 deletions
diff --git a/sys/compat/freebsd/freebsd_file.c b/sys/compat/freebsd/freebsd_file.c
index 32e66c3a7cd..46ccb145316 100644
--- a/sys/compat/freebsd/freebsd_file.c
+++ b/sys/compat/freebsd/freebsd_file.c
@@ -1,4 +1,4 @@
-/* $NetBSD: freebsd_file.c,v 1.11 2000/12/01 18:03:54 jdolecek Exp $ */
+/* $NetBSD: freebsd_file.c,v 1.12 2001/01/18 20:28:25 jdolecek Exp $ */
/*
* Copyright (c) 1995 Frank van der Linden
@@ -56,13 +56,13 @@
#define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0]))
-static char * convert_from_freebsd_mount_type __P((int));
+static const char * convert_from_freebsd_mount_type __P((int));
-static char *
+static const char *
convert_from_freebsd_mount_type(type)
int type;
{
- static char *netbsd_mount_type[] = {
+ static const char * const netbsd_mount_type[] = {
NULL, /* 0 = MOUNT_NONE */
"ffs", /* 1 = "Fast" Filesystem */
"nfs", /* 2 = Network Filesystem */
@@ -103,7 +103,8 @@ freebsd_sys_mount(p, v, retval)
syscallarg(caddr_t) data;
} */ *uap = v;
int error;
- char *type, *s;
+ const char *type;
+ char *s;
caddr_t sg = stackgap_init(p->p_emul);
struct sys_mount_args bma;
diff --git a/sys/compat/ibcs2/ibcs2_errno.c b/sys/compat/ibcs2/ibcs2_errno.c
index 982f2cf0ba0..aca2965b977 100644
--- a/sys/compat/ibcs2/ibcs2_errno.c
+++ b/sys/compat/ibcs2/ibcs2_errno.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ibcs2_errno.c,v 1.6 1998/10/23 03:22:59 erh Exp $ */
+/* $NetBSD: ibcs2_errno.c,v 1.7 2001/01/18 20:28:25 jdolecek Exp $ */
/*
* ibcs2_errno.c
@@ -33,7 +33,7 @@
#include <compat/ibcs2/ibcs2_errno.h>
-int native_to_ibcs2_errno[] = {
+int const native_to_ibcs2_errno[] = {
0, /* 0 */
IBCS2_EPERM, /* 1 */
IBCS2_ENOENT, /* 2 */
diff --git a/sys/compat/ibcs2/ibcs2_errno.h b/sys/compat/ibcs2/ibcs2_errno.h
index 61f83e9c0c9..03940ffc7f5 100644
--- a/sys/compat/ibcs2/ibcs2_errno.h
+++ b/sys/compat/ibcs2/ibcs2_errno.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ibcs2_errno.h,v 1.3 1998/10/23 03:22:59 erh Exp $ */
+/* $NetBSD: ibcs2_errno.h,v 1.4 2001/01/18 20:28:25 jdolecek Exp $ */
/*
* ibcs2_errno.h
@@ -150,6 +150,6 @@
#define IBCS2_ESTALE 151
#define IBCS2_EIORESID 500
-extern int native_to_ibcs2_errno[];
+extern const int native_to_ibcs2_errno[];
#endif /* _IBCS2_ERRNO_H */
diff --git a/sys/compat/ibcs2/ibcs2_ioctl.c b/sys/compat/ibcs2/ibcs2_ioctl.c
index 59c0ce424d6..cc7adac6561 100644
--- a/sys/compat/ibcs2/ibcs2_ioctl.c
+++ b/sys/compat/ibcs2/ibcs2_ioctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ibcs2_ioctl.c,v 1.20 2000/08/11 22:20:10 matt Exp $ */
+/* $NetBSD: ibcs2_ioctl.c,v 1.21 2001/01/18 20:28:25 jdolecek Exp $ */
/*
* Copyright (c) 1994, 1995 Scott Bartram
@@ -92,7 +92,7 @@ static struct speedtab sptab[] = {
{ -1, -1 }
};
-static u_long s2btab[] = {
+static const u_long s2btab[] = {
0,
50,
75,
diff --git a/sys/compat/ibcs2/ibcs2_signal.c b/sys/compat/ibcs2/ibcs2_signal.c
index 4624aa8b28e..f1990a4211f 100644
--- a/sys/compat/ibcs2/ibcs2_signal.c
+++ b/sys/compat/ibcs2/ibcs2_signal.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ibcs2_signal.c,v 1.12 2000/12/22 22:58:57 jdolecek Exp $ */
+/* $NetBSD: ibcs2_signal.c,v 1.13 2001/01/18 20:28:25 jdolecek Exp $ */
/*
* Copyright (c) 1995 Scott Bartram
@@ -51,7 +51,7 @@
#define ibcs2_sigismember(s, n) (*(s) & ibcs2_sigmask(n))
#define ibcs2_sigaddset(s, n) (*(s) |= ibcs2_sigmask(n))
-int native_to_ibcs2_sig[NSIG] = {
+int const native_to_ibcs2_sig[NSIG] = {
0, /* 0 */
IBCS2_SIGHUP, /* 1 */
IBCS2_SIGINT, /* 2 */
@@ -87,7 +87,7 @@ int native_to_ibcs2_sig[NSIG] = {
IBCS2_SIGPWR, /* 32 */
};
-int ibcs2_to_native_sig[IBCS2_NSIG] = {
+int const ibcs2_to_native_sig[IBCS2_NSIG] = {
0, /* 0 */
SIGHUP, /* 1 */
SIGINT, /* 2 */
diff --git a/sys/compat/ibcs2/ibcs2_signal.h b/sys/compat/ibcs2/ibcs2_signal.h
index 96e3fd473b9..7704c148f4a 100644
--- a/sys/compat/ibcs2/ibcs2_signal.h
+++ b/sys/compat/ibcs2/ibcs2_signal.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ibcs2_signal.h,v 1.9 1998/09/11 12:50:08 mycroft Exp $ */
+/* $NetBSD: ibcs2_signal.h,v 1.10 2001/01/18 20:28:25 jdolecek Exp $ */
/*
* Copyright (c) 1994, 1995 Scott Bartram
@@ -121,7 +121,7 @@ struct ibcs2_sigaltstack {
#define IBCS2_SS_DISABLE 0x00000002
#define IBCS2_SS_ALLBITS 0x00000003
-extern int native_to_ibcs2_sig[];
+extern const int native_to_ibcs2_sig[];
void ibcs2_to_native_sigset __P((const ibcs2_sigset_t *, sigset_t *));
void native_to_ibcs2_sigset __P((const sigset_t *, ibcs2_sigset_t *));
diff --git a/sys/compat/linux/arch/alpha/linux_sigarray.c b/sys/compat/linux/arch/alpha/linux_sigarray.c
index fc6574127bd..03cb99bbecb 100644
--- a/sys/compat/linux/arch/alpha/linux_sigarray.c
+++ b/sys/compat/linux/arch/alpha/linux_sigarray.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sigarray.c,v 1.4 1999/12/04 21:41:53 tron Exp $ */
+/* $NetBSD: linux_sigarray.c,v 1.5 2001/01/18 20:28:27 jdolecek Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
#include <compat/linux/common/linux_signal.h>
-int linux_to_native_sig[LINUX__NSIG] = {
+const int linux_to_native_sig[LINUX__NSIG] = {
0,
SIGHUP, /* 1 */
SIGINT,
diff --git a/sys/compat/linux/arch/i386/linux_machdep.c b/sys/compat/linux/arch/i386/linux_machdep.c
index 49dd36bd511..29fbc65b8c7 100644
--- a/sys/compat/linux/arch/i386/linux_machdep.c
+++ b/sys/compat/linux/arch/i386/linux_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_machdep.c,v 1.60 2001/01/18 13:56:32 fvdl Exp $ */
+/* $NetBSD: linux_machdep.c,v 1.61 2001/01/18 20:28:26 jdolecek Exp $ */
/*-
* Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
@@ -470,7 +470,7 @@ linux_fakedev(dev)
* That's not complete, but enough to get an X server running.
*/
#define NR_KEYS 128
-static u_short plain_map[NR_KEYS] = {
+static const u_short plain_map[NR_KEYS] = {
0x0200, 0x001b, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036,
0x0037, 0x0038, 0x0039, 0x0030, 0x002d, 0x003d, 0x007f, 0x0009,
0x0b71, 0x0b77, 0x0b65, 0x0b72, 0x0b74, 0x0b79, 0x0b75, 0x0b69,
@@ -540,7 +540,7 @@ static u_short plain_map[NR_KEYS] = {
0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200,
};
-u_short *linux_keytabs[] = {
+const u_short * const linux_keytabs[] = {
plain_map, shift_map, altgr_map, altgr_map, ctrl_map
};
#endif
diff --git a/sys/compat/linux/arch/i386/linux_sigarray.c b/sys/compat/linux/arch/i386/linux_sigarray.c
index b5fddde385d..e93e8d42019 100644
--- a/sys/compat/linux/arch/i386/linux_sigarray.c
+++ b/sys/compat/linux/arch/i386/linux_sigarray.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sigarray.c,v 1.17 1999/10/04 17:46:37 fvdl Exp $ */
+/* $NetBSD: linux_sigarray.c,v 1.18 2001/01/18 20:28:26 jdolecek Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
#include <compat/linux/common/linux_signal.h>
-int linux_to_native_sig[LINUX__NSIG] = {
+int const linux_to_native_sig[LINUX__NSIG] = {
0,
SIGHUP,
SIGINT,
diff --git a/sys/compat/linux/arch/m68k/linux_sigarray.c b/sys/compat/linux/arch/m68k/linux_sigarray.c
index 0905f72de89..48e6f1ab780 100644
--- a/sys/compat/linux/arch/m68k/linux_sigarray.c
+++ b/sys/compat/linux/arch/m68k/linux_sigarray.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_sigarray.c,v 1.2 1999/12/04 21:38:57 tron Exp $ */
+/* $NetBSD: linux_sigarray.c,v 1.3 2001/01/18 20:28:27 jdolecek Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
#include <compat/linux/common/linux_signal.h>
-int linux_to_native_sig[LINUX__NSIG] = {
+const int linux_to_native_sig[LINUX__NSIG] = {
0,
SIGHUP,
SIGINT,
diff --git a/sys/compat/linux/common/linux_errno.c b/sys/compat/linux/common/linux_errno.c
index 4452342cb3d..350fb72506f 100644
--- a/sys/compat/linux/common/linux_errno.c
+++ b/sys/compat/linux/common/linux_errno.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_errno.c,v 1.9 1998/10/23 03:53:18 erh Exp $ */
+/* $NetBSD: linux_errno.c,v 1.10 2001/01/18 20:28:27 jdolecek Exp $ */
/*-
* Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
* This list is used to translate NetBSD errnos to linux errnos
* when returning from a system call. (NetBSD system call->linux program)
*/
-int native_to_linux_errno[] = {
+const int native_to_linux_errno[] = {
0,
-LINUX_EPERM,
-LINUX_ENOENT,
diff --git a/sys/compat/linux/common/linux_errno.h b/sys/compat/linux/common/linux_errno.h
index 8ee9495c8b9..e7afaf1b309 100644
--- a/sys/compat/linux/common/linux_errno.h
+++ b/sys/compat/linux/common/linux_errno.h
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_errno.h,v 1.6 1998/10/24 19:03:53 christos Exp $ */
+/* $NetBSD: linux_errno.h,v 1.7 2001/01/18 20:28:27 jdolecek Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -86,6 +86,6 @@
#include <compat/linux/arch/i386/linux_errno.h> /* XXX:Allow kdump to compile */
#endif
-extern int native_to_linux_errno[];
+extern const int native_to_linux_errno[];
#endif /* !_LINUX_ERRNO_H */
diff --git a/sys/compat/linux/common/linux_signal.c b/sys/compat/linux/common/linux_signal.c
index 1758d695a09..95c7a71d1e4 100644
--- a/sys/compat/linux/common/linux_signal.c
+++ b/sys/compat/linux/common/linux_signal.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_signal.c,v 1.30 2000/08/23 17:02:18 christos Exp $ */
+/* $NetBSD: linux_signal.c,v 1.31 2001/01/18 20:28:27 jdolecek Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -84,7 +84,7 @@
|= (1 << ((n) - 1) % LINUX__NSIG_BPW))
/* Note: linux_to_native_sig[] is in <arch>/linux_sigarray.c */
-int native_to_linux_sig[NSIG] = {
+const int native_to_linux_sig[NSIG] = {
0,
LINUX_SIGHUP,
LINUX_SIGINT,
diff --git a/sys/compat/linux/common/linux_signal.h b/sys/compat/linux/common/linux_signal.h
index dfbe58032e1..229991eb05f 100644
--- a/sys/compat/linux/common/linux_signal.h
+++ b/sys/compat/linux/common/linux_signal.h
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_signal.h,v 1.11 1998/12/15 19:31:40 itohy Exp $ */
+/* $NetBSD: linux_signal.h,v 1.12 2001/01/18 20:28:26 jdolecek Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -50,8 +50,8 @@
#endif
#ifdef _KERNEL
-extern int native_to_linux_sig[];
-extern int linux_to_native_sig[];
+extern const int native_to_linux_sig[];
+extern const int linux_to_native_sig[];
__BEGIN_DECLS
int linux_sigprocmask1 __P((struct proc *, int, const linux_old_sigset_t *,
linux_old_sigset_t *));
diff --git a/sys/compat/ossaudio/ossaudio.c b/sys/compat/ossaudio/ossaudio.c
index f4baf166292..22089478446 100644
--- a/sys/compat/ossaudio/ossaudio.c
+++ b/sys/compat/ossaudio/ossaudio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ossaudio.c,v 1.32 2000/08/16 16:14:33 tron Exp $ */
+/* $NetBSD: ossaudio.c,v 1.33 2001/01/18 20:28:28 jdolecek Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -575,8 +575,8 @@ getdevinfo(fp, p)
{
mixer_devinfo_t mi;
int i, j, e;
- static struct {
- char *name;
+ static const struct {
+ const char *name;
int code;
} *dp, devs[] = {
{ AudioNmicrophone, OSS_SOUND_MIXER_MIC },
@@ -1112,7 +1112,8 @@ oss_ioctl_sequencer(p, uap, retval)
* Check that the blocksize is a power of 2 as OSS wants.
* If not, set it to be.
*/
-static void setblocksize(fp, info, p)
+static void
+setblocksize(fp, info, p)
struct file *fp;
struct audio_info *info;
struct proc *p;
diff --git a/sys/dev/eisa/devlist2h.awk b/sys/dev/eisa/devlist2h.awk
index 098e094b461..1ad3a089e44 100644
--- a/sys/dev/eisa/devlist2h.awk
+++ b/sys/dev/eisa/devlist2h.awk
@@ -1,5 +1,5 @@
#! /usr/bin/awk -f
-# $NetBSD: devlist2h.awk,v 1.5 1998/01/09 06:46:26 thorpej Exp $
+# $NetBSD: devlist2h.awk,v 1.6 2001/01/18 20:28:25 jdolecek Exp $
#
# Copyright (c) 1995, 1996 Christopher G. Demetriou
# All rights reserved.
@@ -155,7 +155,7 @@ END {
printf("\n") > dfile
- printf("struct eisa_knowndev eisa_knowndevs[] = {\n") > dfile
+ printf("const struct eisa_knowndev eisa_knowndevs[] = {\n") > dfile
for (i = 1; i <= nproducts; i++) {
printf("\t{\n") > dfile
printf("\t 0,\n") > dfile
diff --git a/sys/dev/eisa/eisa.c b/sys/dev/eisa/eisa.c
index ddeeb1cacaf..1dcbaa89713 100644
--- a/sys/dev/eisa/eisa.c
+++ b/sys/dev/eisa/eisa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: eisa.c,v 1.23 2000/09/01 17:18:20 ad Exp $ */
+/* $NetBSD: eisa.c,v 1.24 2001/01/18 20:28:25 jdolecek Exp $ */
/*
* Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -213,7 +213,7 @@ eisa_devinfo(const char *id, char *cp)
{
#ifdef EISAVERBOSE
const char *name;
- struct eisa_knowndev *edp;
+ const struct eisa_knowndev *edp;
int match, onlyvendor;
onlyvendor = 0;
diff --git a/sys/dev/eisa/eisadevs_data.h b/sys/dev/eisa/eisadevs_data.h
index 542f1816ee5..fc4d595db61 100644
--- a/sys/dev/eisa/eisadevs_data.h
+++ b/sys/dev/eisa/eisadevs_data.h
@@ -1,4 +1,4 @@
-/* $NetBSD: eisadevs_data.h,v 1.23 2000/10/19 15:29:14 ad Exp $ */
+/* $NetBSD: eisadevs_data.h,v 1.24 2001/01/18 20:28:25 jdolecek Exp $ */
/*
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
@@ -38,7 +38,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-struct eisa_knowndev eisa_knowndevs[] = {
+const struct eisa_knowndev eisa_knowndevs[] = {
{
0,
"ADP0000",
diff --git a/sys/dev/ic/ac97.c b/sys/dev/ic/ac97.c
index 4e5d1b0f8ce..38d636a5666 100644
--- a/sys/dev/ic/ac97.c
+++ b/sys/dev/ic/ac97.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ac97.c,v 1.17 2001/01/09 23:14:25 rh Exp $ */
+/* $NetBSD: ac97.c,v 1.18 2001/01/18 20:28:16 jdolecek Exp $ */
/* $OpenBSD: ac97.c,v 1.8 2000/07/19 09:01:35 csapuntz Exp $ */
/*
@@ -74,24 +74,24 @@
#include <dev/ic/ac97reg.h>
#include <dev/ic/ac97var.h>
-static struct audio_mixer_enum ac97_on_off = { 2,
+static const struct audio_mixer_enum ac97_on_off = { 2,
{ { { AudioNoff } , 0 },
{ { AudioNon } , 1 } }};
-static struct audio_mixer_enum ac97_mic_select = { 2,
+static const struct audio_mixer_enum ac97_mic_select = { 2,
{ { { AudioNmicrophone "0" },
0 },
{ { AudioNmicrophone "1" },
1 } }};
-static struct audio_mixer_enum ac97_mono_select = { 2,
+static const struct audio_mixer_enum ac97_mono_select = { 2,
{ { { AudioNmixerout },
0 },
{ { AudioNmicrophone },
1 } }};
-static struct audio_mixer_enum ac97_source = { 8,
+static const struct audio_mixer_enum ac97_source = { 8,
{ { { AudioNmicrophone } , 0 },
{ { AudioNcd }, 1 },
{ { "video" }, 2 },
@@ -101,22 +101,22 @@ static struct audio_mixer_enum ac97_source = { 8,
{ { AudioNmixerout AudioNmono }, 6 },
{ { "phone" }, 7 }}};
-static struct audio_mixer_value ac97_volume_stereo = { { AudioNvolume },
+static const struct audio_mixer_value ac97_volume_stereo = { { AudioNvolume },
2 };
-static struct audio_mixer_value ac97_volume_mono = { { AudioNvolume },
+static const struct audio_mixer_value ac97_volume_mono = { { AudioNvolume },
1 };
#define WRAP(a) &a, sizeof(a)
-struct ac97_source_info {
- char *class;
- char *device;
- char *qualifier;
+const struct ac97_source_info {
+ const char *class;
+ const char *device;
+ const char *qualifier;
int type;
- void *info;
+ const void *info;
int info_size;
u_int8_t reg;
@@ -314,7 +314,7 @@ static const struct ac97_codecid {
{ 0, NULL, }
};
-static const char *ac97enhancement[] = {
+static const char * const ac97enhancement[] = {
"no 3D stereo",
"Analog Devices Phat Stereo",
"Creative"
@@ -349,7 +349,7 @@ static const char *ac97enhancement[] = {
"Unknown 3D",
};
-static const char *ac97feature[] = {
+static const char * const ac97feature[] = {
"mic channel",
"reserved",
"tone",
@@ -363,7 +363,7 @@ static const char *ac97feature[] = {
};
-int ac97_str_equal __P((char *, char *));
+int ac97_str_equal __P((const char *, const char *));
void ac97_setup_source_info __P((struct ac97_softc *));
void ac97_read __P((struct ac97_softc *, u_int8_t, u_int16_t *));
void ac97_setup_defaults __P((struct ac97_softc *));
@@ -421,7 +421,7 @@ ac97_setup_defaults(as)
struct ac97_softc *as;
{
int idx;
- struct ac97_source_info *si;
+ const struct ac97_source_info *si;
memset(as->shadow_reg, 0, sizeof(as->shadow_reg));
@@ -437,7 +437,7 @@ ac97_restore_shadow(self)
{
struct ac97_softc *as = (struct ac97_softc *) self;
int idx;
- struct ac97_source_info *si;
+ const struct ac97_source_info *si;
for (idx = 0; idx < SOURCE_INFO_SIZE; idx++) {
si = &source_info[idx];
@@ -447,7 +447,7 @@ ac97_restore_shadow(self)
int
ac97_str_equal(a, b)
- char *a, *b;
+ const char *a, *b;
{
return ((a == b) || (a && b && (!strcmp(a, b))));
}
@@ -656,7 +656,7 @@ ac97_query_devinfo(codec_if, dip)
if (dip->index < as->num_source_info) {
struct ac97_source_info *si = &as->source_info[dip->index];
- char *name;
+ const char *name;
dip->type = si->type;
dip->mixer_class = si->mixer_class;
@@ -720,7 +720,7 @@ ac97_mixer_set_port(codec_if, cp)
break;
case AUDIO_MIXER_VALUE:
{
- struct audio_mixer_value *value = si->info;
+ const struct audio_mixer_value *value = si->info;
u_int16_t l, r;
if ((cp->un.value.num_channels <= 0) ||
@@ -816,7 +816,7 @@ ac97_mixer_get_port(codec_if, cp)
break;
case AUDIO_MIXER_VALUE:
{
- struct audio_mixer_value *value = si->info;
+ const struct audio_mixer_value *value = si->info;
u_int16_t l, r;
if ((cp->un.value.num_channels <= 0) ||
diff --git a/sys/dev/ic/ad1848.c b/sys/dev/ic/ad1848.c
index 9700a4f1ed3..e4601c41784 100644
--- a/sys/dev/ic/ad1848.c
+++ b/sys/dev/ic/ad1848.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ad1848.c,v 1.9 1999/11/01 18:12:19 augustss Exp $ */
+/* $NetBSD: ad1848.c,v 1.10 2001/01/18 20:28:17 jdolecek Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -136,7 +136,7 @@ int ad1848debug = 0;
/*
* Initial values for the indirect registers of CS4248/AD1848.
*/
-static int ad1848_init_values[] = {
+static const int ad1848_init_values[] = {
GAIN_12|INPUT_MIC_GAIN_ENABLE, /* Left Input Control */
GAIN_12|INPUT_MIC_GAIN_ENABLE, /* Right Input Control */
ATTEN_12, /* Left Aux #1 Input Control */
@@ -432,7 +432,7 @@ ad1848_attach(sc)
/*
* Various routines to interface to higher level audio driver
*/
-struct ad1848_mixerinfo {
+const struct ad1848_mixerinfo {
int left_reg;
int right_reg;
int atten_bits;
@@ -507,7 +507,7 @@ ad1848_set_channel_gain(sc, device, gp)
int device;
struct ad1848_volume *gp;
{
- struct ad1848_mixerinfo *info = &mixer_channel_info[device];
+ const struct ad1848_mixerinfo *info = &mixer_channel_info[device];
u_char reg;
u_int atten;
@@ -1207,7 +1207,7 @@ ad1848_set_speed(sc, argp)
} speed_struct;
u_long arg = *argp;
- static speed_struct speed_table[] = {
+ static const speed_struct speed_table[] = {
{5510, (0 << 1) | 1},
{5510, (0 << 1) | 1},
{6620, (7 << 1) | 1},
diff --git a/sys/dev/ic/advmcode.c b/sys/dev/ic/advmcode.c
index 35d6c4caf0a..7b2eb3bcecd 100644
--- a/sys/dev/ic/advmcode.c
+++ b/sys/dev/ic/advmcode.c
@@ -1,4 +1,4 @@
-/* $NetBSD: advmcode.c,v 1.3 1998/09/26 16:02:57 dante Exp $ */
+/* $NetBSD: advmcode.c,v 1.4 2001/01/18 20:28:17 jdolecek Exp $ */
/*
* Generic driver definitions and exported functions for the Advanced
@@ -62,7 +62,7 @@
* This code is loaded into Lram during initializzation procedure.
*/
-u_int8_t asc_mcode[] =
+const u_int8_t asc_mcode[] =
{
0x01, 0x03, 0x01, 0x19, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -210,11 +210,11 @@ u_int8_t asc_mcode[] =
0x41, 0x23, 0xF6, 0x88, 0x11, 0x23, 0xA1, 0x01, 0x04, 0x23, 0xA0, 0x01, 0xE6, 0x84,
};
-u_int16_t asc_mcode_size = sizeof(asc_mcode);
+const u_int16_t asc_mcode_size = sizeof(asc_mcode);
/*
* This checksum is used to compare with that one that will be calculated
* at run time.
* This is performed to ensure the uCode is correctly loaded into the Lram.
*/
-u_int32_t asc_mcode_chksum = 0x012B5442UL;
+const u_int32_t asc_mcode_chksum = 0x012B5442UL;
diff --git a/sys/dev/ic/advmcode.h b/sys/dev/ic/advmcode.h
index 1e213f6fbac..e58303969df 100644
--- a/sys/dev/ic/advmcode.h
+++ b/sys/dev/ic/advmcode.h
@@ -1,4 +1,4 @@
-/* $NetBSD: advmcode.h,v 1.3 1998/09/26 16:02:57 dante Exp $ */
+/* $NetBSD: advmcode.h,v 1.4 2001/01/18 20:28:17 jdolecek Exp $ */
/*
* Generic driver definitions and exported functions for the Advanced
@@ -41,8 +41,8 @@
#ifndef ADV_MCODE_H
#define ADV_MCODE_H
-extern u_int8_t asc_mcode[];
-extern u_int16_t asc_mcode_size;
-extern u_int32_t asc_mcode_chksum;
+extern const u_int8_t asc_mcode[];
+extern const u_int16_t asc_mcode_size;
+extern const u_int32_t asc_mcode_chksum;
#endif /* ADV_MCODE_H */
diff --git a/sys/dev/ic/adwmcode.h b/sys/dev/ic/adwmcode.h
index f6f3e8f54b8..e0a5cb59a41 100644
--- a/sys/dev/ic/adwmcode.h
+++ b/sys/dev/ic/adwmcode.h
@@ -1,4 +1,4 @@
-/* $NetBSD: adwmcode.h,v 1.5 2000/05/27 18:24:51 dante Exp $ */
+/* $NetBSD: adwmcode.h,v 1.6 2001/01/18 20:28:17 jdolecek Exp $ */
/*
* Generic driver definitions and exported functions for the Advanced
@@ -97,7 +97,7 @@ typedef struct adw_carrier ADW_CARRIER;
/******************************************************************************/
struct adw_mcode {
- const u_int8_t *mcode_data;
+ const u_int8_t * const mcode_data;
const u_int32_t mcode_chksum;
const u_int16_t mcode_size;
};
diff --git a/sys/dev/ic/aic7xxx.c b/sys/dev/ic/aic7xxx.c
index a9359927a3b..58b21540a27 100644
--- a/sys/dev/ic/aic7xxx.c
+++ b/sys/dev/ic/aic7xxx.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aic7xxx.c,v 1.62 2000/12/02 14:53:01 fvdl Exp $ */
+/* $NetBSD: aic7xxx.c,v 1.63 2001/01/18 20:28:16 jdolecek Exp $ */
/*
* Generic driver for the aic7xxx based adaptec SCSI controllers
@@ -150,7 +150,7 @@
| (SIM_IS_SCSIBUS_B((ahc), (xs)->sc_link) ? SELBUSB : 0) \
| ((xs)->sc_link->scsipi_scsi.lun & 0x07))
-char *ahc_chip_names[] =
+const char * const ahc_chip_names[] =
{
"NONE",
"aic7770",
@@ -268,20 +268,20 @@ static u_int ahc_rem_scb_from_disc_list(struct ahc_softc *, u_int, u_int);
static void ahc_add_curscb_to_free_list(struct ahc_softc *);
static void ahc_clear_intstat(struct ahc_softc *);
static void ahc_reset_current_bus(struct ahc_softc *);
-static struct ahc_syncrate *
+static const struct ahc_syncrate *
ahc_devlimited_syncrate(struct ahc_softc *, u_int *);
-static struct ahc_syncrate *
+static const struct ahc_syncrate *
ahc_find_syncrate(struct ahc_softc *, u_int *, u_int);
static u_int ahc_find_period(struct ahc_softc *, u_int, u_int);
-static void ahc_validate_offset(struct ahc_softc *, struct ahc_syncrate *,
- u_int *, int);
+static void ahc_validate_offset(struct ahc_softc *,
+ const struct ahc_syncrate *, u_int *, int);
static void ahc_update_target_msg_request(struct ahc_softc *,
struct ahc_devinfo *,
struct ahc_initiator_tinfo *,
int, int);
static void ahc_set_syncrate(struct ahc_softc *, struct ahc_devinfo *,
- struct ahc_syncrate *, u_int, u_int, u_int,
- int, int);
+ const struct ahc_syncrate *, u_int, u_int,
+ u_int, int, int);
static void ahc_set_width(struct ahc_softc *, struct ahc_devinfo *,
u_int, u_int, int, int);
static void ahc_set_tags(struct ahc_softc *, struct ahc_devinfo *,
@@ -777,9 +777,9 @@ ahc_print_scb(struct scb *scb)
}
#endif
-static struct {
+static const struct {
u_int8_t errno;
- char *errmesg;
+ const char *errmesg;
} hard_error[] = {
{ ILLHADDR, "Illegal Host Access" },
{ ILLSADDR, "Illegal Sequencer Address referrenced" },
@@ -792,10 +792,10 @@ static struct {
};
static const int num_errors = sizeof(hard_error)/sizeof(hard_error[0]);
-static struct {
+static const struct {
u_int8_t phase;
u_int8_t mesg_out; /* Message response to parity errors */
- char *phasemsg;
+ const char *phasemsg;
} phase_table[] = {
{ P_DATAOUT, MSG_NOOP, "in Data-out phase" },
{ P_DATAIN, MSG_INITIATOR_DET_ERR, "in Data-in phase" },
@@ -817,7 +817,7 @@ static const int num_phases = (sizeof(phase_table)/sizeof(phase_table[0])) - 1;
#define AHC_SYNCRATE_ULTRA2 1
#define AHC_SYNCRATE_ULTRA 3
#define AHC_SYNCRATE_FAST 6
-static struct ahc_syncrate ahc_syncrates[] = {
+static const struct ahc_syncrate ahc_syncrates[] = {
/* ultra2 fast/ultra period rate */
{ 0x42, 0x000, 9, "80.0" },
{ 0x03, 0x000, 10, "40.0" },
@@ -1081,7 +1081,7 @@ ahc_reset(struct ahc_softc *ahc)
* this function finds the nearest syncrate to the input period limited
* by the capabilities of the bus connectivity of the target.
*/
-static struct ahc_syncrate *
+static const struct ahc_syncrate *
ahc_devlimited_syncrate(struct ahc_softc *ahc, u_int *period) {
u_int maxsync;
@@ -1105,10 +1105,10 @@ ahc_devlimited_syncrate(struct ahc_softc *ahc, u_int *period) {
* Return the period and offset that should be sent to the target
* if this was the beginning of an SDTR.
*/
-static struct ahc_syncrate *
+static const struct ahc_syncrate *
ahc_find_syncrate(struct ahc_softc *ahc, u_int *period, u_int maxsync)
{
- struct ahc_syncrate *syncrate;
+ const struct ahc_syncrate *syncrate;
syncrate = &ahc_syncrates[maxsync];
while ((syncrate->rate != NULL)
@@ -1148,7 +1148,7 @@ ahc_find_syncrate(struct ahc_softc *ahc, u_int *period, u_int maxsync)
static u_int
ahc_find_period(struct ahc_softc *ahc, u_int scsirate, u_int maxsync)
{
- struct ahc_syncrate *syncrate;
+ const struct ahc_syncrate *syncrate;
if ((ahc->features & AHC_ULTRA2) != 0)
scsirate &= SXFR_ULTRA2;
@@ -1172,7 +1172,7 @@ ahc_find_period(struct ahc_softc *ahc, u_int scsirate, u_int maxsync)
}
static void
-ahc_validate_offset(struct ahc_softc *ahc, struct ahc_syncrate *syncrate,
+ahc_validate_offset(struct ahc_softc *ahc, const struct ahc_syncrate *syncrate,
u_int *offset, int wide)
{
u_int maxoffset;
@@ -1240,7 +1240,7 @@ ahc_update_target_msg_request(struct ahc_softc *ahc,
static void
ahc_set_syncrate(struct ahc_softc *ahc, struct ahc_devinfo *devinfo,
- struct ahc_syncrate *syncrate,
+ const struct ahc_syncrate *syncrate,
u_int period, u_int offset, u_int type, int paused, int done)
{
struct ahc_initiator_tinfo *tinfo;
@@ -2403,7 +2403,7 @@ ahc_build_transfer_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
if (dowide) {
ahc_construct_wdtr(ahc, tinfo->goal.width);
} else if (dosync) {
- struct ahc_syncrate *rate;
+ const struct ahc_syncrate *rate;
u_int period;
u_int offset;
@@ -2962,7 +2962,7 @@ ahc_parse_msg(struct ahc_softc *ahc, struct scsipi_link *sc_link,
switch (ahc->msgin_buf[2]) {
case MSG_EXT_SDTR:
{
- struct ahc_syncrate *syncrate;
+ const struct ahc_syncrate *syncrate;
u_int period;
u_int offset;
u_int saved_offset;
@@ -3098,7 +3098,7 @@ ahc_parse_msg(struct ahc_softc *ahc, struct scsipi_link *sc_link,
if (sending_reply == FALSE && reject == FALSE) {
if (tinfo->goal.period) {
- struct ahc_syncrate *rate;
+ const struct ahc_syncrate *rate;
u_int period;
u_int offset;
diff --git a/sys/dev/ic/aic7xxxvar.h b/sys/dev/ic/aic7xxxvar.h
index d04dc8e0147..cd20f9fdd92 100644
--- a/sys/dev/ic/aic7xxxvar.h
+++ b/sys/dev/ic/aic7xxxvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: aic7xxxvar.h,v 1.24 2000/05/27 21:58:15 fvdl Exp $ */
+/* $NetBSD: aic7xxxvar.h,v 1.25 2001/01/18 20:28:17 jdolecek Exp $ */
/*
* Interface to the generic driver for the aic7xxx based adaptec
@@ -116,7 +116,7 @@ typedef enum {
AHC_BUS_MASK = 0x0F00
} ahc_chip;
-extern char *ahc_chip_names[];
+extern const char * const ahc_chip_names[];
typedef enum {
AHC_FENONE = 0x0000,
diff --git a/sys/dev/ic/awi_wep.c b/sys/dev/ic/awi_wep.c
index 6e2148cfa7f..57da5f68dd7 100644
--- a/sys/dev/ic/awi_wep.c
+++ b/sys/dev/ic/awi_wep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: awi_wep.c,v 1.4 2000/08/14 11:28:03 onoe Exp $ */
+/* $NetBSD: awi_wep.c,v 1.5 2001/01/18 20:28:18 jdolecek Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@ static void awi_null_copy __P((void *ctx, u_int8_t *dst, u_int8_t *src, int len)
/* XXX: the order should be known to wiconfig/user */
-static struct awi_wep_algo awi_wep_algo[] = {
+static const struct awi_wep_algo awi_wep_algo[] = {
/* 0: no wep */
{ "no" }, /* dummy for no wep */
@@ -232,7 +232,7 @@ awi_wep_setalgo(sc, algo)
struct awi_softc *sc;
int algo;
{
- struct awi_wep_algo *awa;
+ const struct awi_wep_algo *awa;
int ctxlen;
awi_crc_init(); /* XXX: not belongs here */
@@ -303,7 +303,7 @@ awi_wep_encrypt(sc, m0, txflag)
{
struct mbuf *m, *n, *n0;
struct ieee80211_frame *wh;
- struct awi_wep_algo *awa;
+ const struct awi_wep_algo *awa;
int left, len, moff, noff, keylen, kid;
u_int32_t iv, crc;
u_int8_t *key, *ivp;
diff --git a/sys/dev/ic/awivar.h b/sys/dev/ic/awivar.h
index 517728a60b3..3e68e82fb74 100644
--- a/sys/dev/ic/awivar.h
+++ b/sys/dev/ic/awivar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: awivar.h,v 1.12 2000/07/21 04:48:56 onoe Exp $ */
+/* $NetBSD: awivar.h,v 1.13 2001/01/18 20:28:17 jdolecek Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -152,7 +152,7 @@ struct awi_softc
u_int8_t sc_wep_key[IEEE80211_WEP_NKID][AWI_MAX_KEYLEN];
int sc_wep_defkid;
void *sc_wep_ctx; /* work area */
- struct awi_wep_algo *sc_wep_algo;
+ const struct awi_wep_algo *sc_wep_algo;
u_char sc_banner[AWI_BANNER_LEN];
struct awi_mib_local sc_mib_local;
diff --git a/sys/dev/ic/opl.c b/sys/dev/ic/opl.c
index 458f862cc7f..c83f58a755b 100644
--- a/sys/dev/ic/opl.c
+++ b/sys/dev/ic/opl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: opl.c,v 1.11 2000/08/12 22:24:26 augustss Exp $ */
+/* $NetBSD: opl.c,v 1.12 2001/01/18 20:28:18 jdolecek Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@ struct real_voice {
u_int8_t op[4]; /* Operator offsets */
};
-struct opl_voice voicetab[] = {
+const struct opl_voice voicetab[] = {
/* No I/O offs OP1 OP2 OP3 OP4 */
/* --------------------------------------------- */
{ 0, OPL_L, {0x00, 0x03, 0x08, 0x0b}},
@@ -275,7 +275,7 @@ opl_load_patch(sc, v)
struct opl_softc *sc;
int v;
{
- struct opl_operators *p = sc->voices[v].patch;
+ const struct opl_operators *p = sc->voices[v].patch;
opl_set_op_reg(sc, OPL_AM_VIB, v, 0, p->ops[OO_CHARS+0]);
opl_set_op_reg(sc, OPL_AM_VIB, v, 1, p->ops[OO_CHARS+1]);
@@ -390,7 +390,7 @@ oplsyn_reset(addr)
opl_reset(sc);
}
-int8_t opl_volume_table[128] =
+const int8_t opl_volume_table[128] =
{-64, -48, -40, -35, -32, -29, -27, -26,
-24, -23, -21, -20, -19, -18, -18, -17,
-16, -15, -15, -14, -13, -13, -12, -12,
@@ -439,7 +439,7 @@ oplsyn_noteon(ms, voice, freq, vel)
{
struct opl_softc *sc = ms->data;
struct opl_voice *v;
- struct opl_operators *p;
+ const struct opl_operators *p;
u_int32_t block_fnum;
int mult;
int c_mult, m_mult;
diff --git a/sys/dev/ic/oplinstrs.c b/sys/dev/ic/oplinstrs.c
index 7e189393f01..0fc1107bcec 100644
--- a/sys/dev/ic/oplinstrs.c
+++ b/sys/dev/ic/oplinstrs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: oplinstrs.c,v 1.2 1999/02/15 04:54:35 hubertf Exp $ */
+/* $NetBSD: oplinstrs.c,v 1.3 2001/01/18 20:28:18 jdolecek Exp $ */
#include <sys/param.h>
#include <sys/systm.h>
@@ -20,7 +20,7 @@
* Operator settings for the OPL2 and OPL3 FM synths.
* These tables are indexed by the General MIDI instrument number.
*/
-struct opl_operators opl3_instrs[OPL_NINSTR] = {
+const struct opl_operators opl3_instrs[OPL_NINSTR] = {
{ 1, { 0x23, 0x01, 0x15, 0x00, 0xfd, 0x84, 0x7c, 0xf5, 0x03, 0x00, 0x10,
0x03, 0x01, 0x5d, 0x00, 0xf2, 0xf4, 0x35, 0xf5, 0x00, 0x04, 0x11, } },
{ 1, { 0x03, 0x01, 0x7d, 0x00, 0xf3, 0xf3, 0xf5, 0xf5, 0x00, 0x04, 0x10,
@@ -322,7 +322,7 @@ struct opl_operators opl3_instrs[OPL_NINSTR] = {
{ 0, { 0x3c, 0x31, 0x90, 0x00, 0x73, 0xc4, 0xb1, 0xf3, 0x00, 0x00, 0x2a, } },
};
-struct opl_operators opl2_instrs[OPL_NINSTR] = {
+const struct opl_operators opl2_instrs[OPL_NINSTR] = {
{ 0, { 0x01, 0x10, 0x1b, 0x00, 0xc3, 0x92, 0x23, 0x62, 0x02, 0x01, 0x1e, } },
{ 0, { 0x03, 0x01, 0x7d, 0x00, 0xf3, 0xf3, 0xf5, 0xf5, 0x00, 0x04, 0x30, } },
{ 0, { 0x03, 0x01, 0x61, 0x00, 0xfb, 0xf5, 0xf5, 0xf5, 0x04, 0x04, 0x30, } },
diff --git a/sys/dev/ic/oplvar.h b/sys/dev/ic/oplvar.h
index 75082cb21b6..e4dfec6be11 100644
--- a/sys/dev/ic/oplvar.h
+++ b/sys/dev/ic/oplvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: oplvar.h,v 1.4 1999/10/05 03:29:22 itohy Exp $ */
+/* $NetBSD: oplvar.h,v 1.5 2001/01/18 20:28:18 jdolecek Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@ struct opl_voice {
int voiceno;
int iooffs;
u_int8_t op[4];
- struct opl_operators *patch;
+ const struct opl_operators *patch;
u_int8_t rB0;
};
@@ -91,8 +91,8 @@ struct opl_operators {
#define OPL_NINSTR 256
#ifdef _KERNEL
-extern struct opl_operators opl2_instrs[];
-extern struct opl_operators opl3_instrs[];
+extern const struct opl_operators opl2_instrs[];
+extern const struct opl_operators opl3_instrs[];
int opl_find __P((struct opl_softc *));
void opl_attach __P((struct opl_softc *));
diff --git a/sys/dev/ic/pcdisplay_chars.c b/sys/dev/ic/pcdisplay_chars.c
index eda678b548f..407d0091b28 100644
--- a/sys/dev/ic/pcdisplay_chars.c
+++ b/sys/dev/ic/pcdisplay_chars.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcdisplay_chars.c,v 1.5 2000/06/08 07:01:19 cgd Exp $ */
+/* $NetBSD: pcdisplay_chars.c,v 1.6 2001/01/18 20:28:17 jdolecek Exp $ */
/*
* Copyright (c) 1998
@@ -45,7 +45,7 @@
#define CONTROL 1 /* XXX smiley */
#define NOTPRINTABLE 4 /* diamond XXX watch out - not in ISO part! */
-static u_char isomappings[128] = {
+static const u_char isomappings[128] = {
CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL,
CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL,
CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL, CONTROL,
@@ -148,7 +148,7 @@ static u_char isomappings[128] = {
0x98, /* 0x00ff LATIN SMALL LETTER Y WITH DIAERESIS */
};
-static struct {
+static const struct {
u_int16_t uni;
u_char ibm;
} unimappings[] = {
@@ -262,7 +262,7 @@ static struct {
{0x266b, 0x0e}, /* BEAMED EIGHTH NOTES */
};
-static struct {
+static const struct {
u_int16_t uni;
u_char ibm;
int quality;
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c
index c3a42807716..178026174fc 100644
--- a/sys/dev/ic/vga.c
+++ b/sys/dev/ic/vga.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vga.c,v 1.34 2000/09/15 14:13:01 drochner Exp $ */
+/* $NetBSD: vga.c,v 1.35 2001/01/18 20:28:17 jdolecek Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -49,7 +49,7 @@
#include "opt_wsdisplay_compat.h" /* for WSCONS_SUPPORT_PCVTFONTS */
-static struct vgafont {
+static const struct vgafont {
char name[16];
int height;
int encoding;
@@ -75,7 +75,7 @@ struct vgascreen {
struct vga_config *cfg;
/* videostate */
- struct vgafont *fontset1, *fontset2;
+ const struct vgafont *fontset1, *fontset2;
/* font data */
/* palette */
@@ -95,7 +95,7 @@ struct vga_config {
bus_space_tag_t vc_biostag;
bus_space_handle_t vc_bioshdl;
- struct vgafont *vc_fonts[8];
+ const struct vgafont *vc_fonts[8];
struct vgascreen *wantedscreen;
void (*switchcb) __P((void *, int, int));
@@ -137,7 +137,7 @@ const struct wsdisplay_emulops vga_emulops = {
/*
* translate WS(=ANSI) color codes to standard pc ones
*/
-static unsigned char fgansitopc[] = {
+static const unsigned char fgansitopc[] = {
#ifdef __alpha__
/*
* XXX DEC HAS SWITCHED THE CODES FOR BLUE AND RED!!!
@@ -358,13 +358,13 @@ vga_selectfont(vc, scr, name1, name2)
char *name1, *name2; /* NULL: take first found */
{
const struct wsscreen_descr *type = scr->pcs.type;
- struct vgafont *f1, *f2;
+ const struct vgafont *f1, *f2;
int i;
f1 = f2 = 0;
for (i = 0; i < 8; i++) {
- struct vgafont *f = vc->vc_fonts[i];
+ const struct vgafont *f = vc->vc_fonts[i];
if (!f || f->height != type->fontheight)
continue;
if (!f1 &&
@@ -994,7 +994,7 @@ vga_copyrows(id, srcrow, dstrow, nrows)
#ifdef WSCONS_SUPPORT_PCVTFONTS
#define NOTYET 0xffff
-static u_int16_t pcvt_unichars[0xa0] = {
+static const u_int16_t pcvt_unichars[0xa0] = {
/* 0 */ _e006U,
NOTYET, NOTYET, NOTYET, NOTYET, NOTYET, NOTYET, NOTYET,
NOTYET,
@@ -1153,12 +1153,12 @@ vga_iso7_mapchar(int uni, unsigned int *index)
#endif /* WSCONS_SUPPORT_ISO7FONTS */
-static int _vga_mapchar __P((void *, struct vgafont *, int, unsigned int *));
+static int _vga_mapchar __P((void *, const struct vgafont *, int, unsigned int *));
static int
_vga_mapchar(id, font, uni, index)
void *id;
- struct vgafont *font;
+ const struct vgafont *font;
int uni;
unsigned int *index;
{
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c
index 7e3ae058eb8..1fdeb13fc01 100644
--- a/sys/dev/isa/fd.c
+++ b/sys/dev/isa/fd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.12 2001/01/08 02:03:47 fvdl Exp $ */
+/* $NetBSD: fd.c,v 1.13 2001/01/18 20:28:19 jdolecek Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -178,19 +178,19 @@ struct fd_type {
int rate; /* transfer speed code */
u_char fillbyte; /* format fill byte */
u_char interleave; /* interleave factor (formatting) */
- char *name;
+ const char *name;
};
#if NMCA > 0
/* MCA - specific entries */
-struct fd_type mca_fd_types[] = {
+const struct fd_type mca_fd_types[] = {
{ 18,2,36,2,0xff,0x0f,0x1b,0x6c,80,2880,1,FDC_500KBPS,0xf6,1, "1.44MB" }, /* 1.44MB diskette - XXX try 16ms step rate */
{ 9,2,18,2,0xff,0x4f,0x2a,0x50,80,1440,1,FDC_250KBPS,0xf6,1, "720KB" }, /* 3.5 inch 720kB diskette - XXX try 24ms step rate */
};
#endif /* NMCA > 0 */
/* The order of entries in the following table is important -- BEWARE! */
-struct fd_type fd_types[] = {
+const struct fd_type fd_types[] = {
{ 18,2,36,2,0xff,0xcf,0x1b,0x6c,80,2880,1,FDC_500KBPS,0xf6,1, "1.44MB" }, /* 1.44MB diskette */
{ 15,2,30,2,0xff,0xdf,0x1b,0x54,80,2400,1,FDC_500KBPS,0xf6,1, "1.2MB" }, /* 1.2 MB AT-diskettes */
{ 9,2,18,2,0xff,0xdf,0x23,0x50,40, 720,2,FDC_300KBPS,0xf6,1, "360KB/AT" }, /* 360kB in 1.2MB drive */
@@ -205,7 +205,7 @@ struct fd_softc {
struct device sc_dev;
struct disk sc_dk;
- struct fd_type *sc_deftype; /* default type descriptor */
+ const struct fd_type *sc_deftype; /* default type descriptor */
struct fd_type *sc_type; /* current type descriptor */
struct fd_type sc_type_copy; /* copy for fiddling when formatting */
@@ -255,7 +255,7 @@ void fdstart __P((struct fd_softc *));
struct dkdriver fddkdriver = { fdstrategy };
#if defined(i386)
-struct fd_type *fd_nvtotype __P((char *, int, int));
+const struct fd_type *fd_nvtotype __P((char *, int, int));
#endif /* i386 */
void fd_set_motor __P((struct fdc_softc *fdc, int reset));
void fd_motor_off __P((void *arg));
@@ -267,7 +267,7 @@ void fdctimeout __P((void *arg));
void fdcpseudointr __P((void *arg));
void fdcretry __P((struct fdc_softc *fdc));
void fdfinish __P((struct fd_softc *fd, struct buf *bp));
-__inline struct fd_type *fd_dev_to_type __P((struct fd_softc *, dev_t));
+__inline const struct fd_type *fd_dev_to_type __P((struct fd_softc *, dev_t));
int fdformat __P((dev_t, struct ne7_fd_formb *, struct proc *));
void fd_mountroot_hook __P((struct device *));
@@ -277,7 +277,7 @@ void fd_mountroot_hook __P((struct device *));
*/
struct fdc_attach_args {
int fa_drive;
- struct fd_type *fa_deftype;
+ const struct fd_type *fa_deftype;
};
/*
@@ -446,7 +446,7 @@ fdattach(parent, self, aux)
struct fdc_softc *fdc = (void *)parent;
struct fd_softc *fd = (void *)self;
struct fdc_attach_args *fa = aux;
- struct fd_type *type = fa->fa_deftype;
+ const struct fd_type *type = fa->fa_deftype;
int drive = fa->fa_drive;
callout_init(&fd->sc_motoron_ch);
@@ -492,7 +492,7 @@ fdattach(parent, self, aux)
* Translate nvram type into internal data structure. Return NULL for
* none/unknown/unusable.
*/
-struct fd_type *
+const struct fd_type *
fd_nvtotype(fdc, nvraminfo, drive)
char *fdc;
int nvraminfo, drive;
@@ -532,7 +532,7 @@ fd_nvtotype(fdc, nvraminfo, drive)
}
#endif /* i386 */
-__inline struct fd_type *
+__inline const struct fd_type *
fd_dev_to_type(fd, dev)
struct fd_softc *fd;
dev_t dev;
@@ -790,7 +790,7 @@ fdopen(dev, flags, mode, p)
struct proc *p;
{
struct fd_softc *fd;
- struct fd_type *type;
+ const struct fd_type *type;
fd = device_lookup(&fd_cd, FDUNIT(dev));
if (fd == NULL)
diff --git a/sys/dev/isa/gus.c b/sys/dev/isa/gus.c
index 6a1484560e7..e0f76b6caa7 100644
--- a/sys/dev/isa/gus.c
+++ b/sys/dev/isa/gus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gus.c,v 1.69 2000/03/23 07:01:34 thorpej Exp $ */
+/* $NetBSD: gus.c,v 1.70 2001/01/18 20:28:19 jdolecek Exp $ */
/*-
* Copyright (c) 1996, 1999 The NetBSD Foundation, Inc.
@@ -449,11 +449,11 @@ struct cfattach gus_ca = {
* registers. A zero means that the referenced IRQ/DRQ is invalid
*/
-static int gus_irq_map[] = {
+static const int gus_irq_map[] = {
IRQUNK, IRQUNK, 1, 3, IRQUNK, 2, IRQUNK, 4, IRQUNK, 1, IRQUNK, 5, 6,
IRQUNK, IRQUNK, 7
};
-static int gus_drq_map[] = {
+static const int gus_drq_map[] = {
DRQUNK, 1, DRQUNK, 2, DRQUNK, 3, 4, 5
};
@@ -461,10 +461,10 @@ static int gus_drq_map[] = {
* A list of valid base addresses for the GUS
*/
-static int gus_base_addrs[] = {
+static const int gus_base_addrs[] = {
0x210, 0x220, 0x230, 0x240, 0x250, 0x260
};
-static int gus_addrs = sizeof(gus_base_addrs) / sizeof(gus_base_addrs[0]);
+static const int gus_addrs = sizeof(gus_base_addrs) / sizeof(gus_base_addrs[0]);
/*
* Maximum frequency values of the GUS based on the number of currently active
@@ -472,7 +472,7 @@ static int gus_addrs = sizeof(gus_base_addrs) / sizeof(gus_base_addrs[0]);
* is dependent on the number of active voices. Yes, it is pretty weird.
*/
-static int gus_max_frequency[] = {
+static const int gus_max_frequency[] = {
44100, /* 14 voices */
41160, /* 15 voices */
38587, /* 16 voices */
@@ -498,7 +498,7 @@ static int gus_max_frequency[] = {
* by the GF1 chip on the GUS. From GUS SDK vol1.c.
*/
-static unsigned short gus_log_volumes[512] = {
+static const unsigned short gus_log_volumes[512] = {
0x0000,
0x0700, 0x07ff, 0x0880, 0x08ff, 0x0940, 0x0980, 0x09c0, 0x09ff, 0x0a20,
0x0a40, 0x0a60, 0x0a80, 0x0aa0, 0x0ac0, 0x0ae0, 0x0aff, 0x0b10, 0x0b20,
diff --git a/sys/dev/microcode/aic7xxx/aic7xxx_seq.h b/sys/dev/microcode/aic7xxx/aic7xxx_seq.h
index 63dcd3e7edb..96d86d03ccc 100644
--- a/sys/dev/microcode/aic7xxx/aic7xxx_seq.h
+++ b/sys/dev/microcode/aic7xxx/aic7xxx_seq.h
@@ -1,7 +1,7 @@
/*
* DO NOT EDIT - This file is automatically generated.
*/
-static u_int8_t seqprog[] = {
+static const u_int8_t seqprog[] = {
0xff, 0x6a, 0x06, 0x08,
0x08, 0x6a, 0x68, 0x00,
0x7f, 0x02, 0x04, 0x08,
diff --git a/sys/dev/microcode/aic7xxx/aicasm.c b/sys/dev/microcode/aic7xxx/aicasm.c
index 1e1b352872d..c1ef4a3d7a0 100644
--- a/sys/dev/microcode/aic7xxx/aicasm.c
+++ b/sys/dev/microcode/aic7xxx/aicasm.c
@@ -1,4 +1,4 @@
-/* $NetBSD: aicasm.c,v 1.1 2000/03/15 02:09:13 fvdl Exp $ */
+/* $NetBSD: aicasm.c,v 1.2 2001/01/18 20:28:18 jdolecek Exp $ */
/*
* Aic7xxx SCSI host adapter firmware asssembler
@@ -310,7 +310,7 @@ output_code(ofile)
* DO NOT EDIT - This file is automatically generated.
*/\n");
- fprintf(ofile, "static u_int8_t seqprog[] = {\n");
+ fprintf(ofile, "static const u_int8_t seqprog[] = {\n");
for(cur_instr = STAILQ_FIRST(&seq_program);
cur_instr != NULL;
cur_instr = STAILQ_NEXT(cur_instr, links)) {
diff --git a/sys/dev/midisyn.c b/sys/dev/midisyn.c
index ca28953cf63..1ca0917cbf5 100644
--- a/sys/dev/midisyn.c
+++ b/sys/dev/midisyn.c
@@ -1,4 +1,4 @@
-/* $NetBSD: midisyn.c,v 1.6 2000/03/29 03:43:31 simonb Exp $ */
+/* $NetBSD: midisyn.c,v 1.7 2001/01/18 20:28:20 jdolecek Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -86,7 +86,7 @@ struct midi_hw_if midisyn_hw_if = {
midisyn_ioctl,
};
-static int midi_lengths[] = { 3,3,3,3,2,2,3,1 };
+static const int midi_lengths[] = { 3,3,3,3,2,2,3,1 };
/* Number of bytes in a MIDI command, including status */
#define MIDI_LENGTH(d) (midi_lengths[((d) >> 4) & 7])
@@ -330,7 +330,7 @@ midisyn_note_to_freq(note)
{
int o, n, f;
#define BASE_OCTAVE 5
- static u_int32_t notes[] = {
+ static const u_int32_t notes[] = {
17145893, 18165441, 19245614, 20390018, 21602472, 22887021,
24247954, 25689813, 27217409, 28835840, 30550508, 32367136
};
@@ -355,13 +355,13 @@ midisyn_finetune(base_freq, bend, range, vibrato_cents)
int range;
int vibrato_cents;
{
- static u_int16_t semitone_tuning[24] =
+ static const u_int16_t semitone_tuning[24] =
{
/* 0 */ 10000, 10595, 11225, 11892, 12599, 13348, 14142, 14983,
/* 8 */ 15874, 16818, 17818, 18877, 20000, 21189, 22449, 23784,
/* 16 */ 25198, 26697, 28284, 29966, 31748, 33636, 35636, 37755
};
- static u_int16_t cent_tuning[100] =
+ static const u_int16_t cent_tuning[100] =
{
/* 0 */ 10000, 10006, 10012, 10017, 10023, 10029, 10035, 10041,
/* 8 */ 10046, 10052, 10058, 10064, 10070, 10075, 10081, 10087,
diff --git a/sys/dev/mulaw.c b/sys/dev/mulaw.c
index 34888d0fdf4..22087cfb164 100644
--- a/sys/dev/mulaw.c
+++ b/sys/dev/mulaw.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mulaw.c,v 1.14 2000/08/18 05:55:31 wiz Exp $ */
+/* $NetBSD: mulaw.c,v 1.15 2001/01/18 20:28:20 jdolecek Exp $ */
/*
* Copyright (c) 1991-1993 Regents of the University of California.
@@ -43,7 +43,7 @@
* The 16 bits are represented as an array of two bytes for easier access
* to the individual bytes.
*/
-static u_char mulawtolin16[256][2] = {
+static const u_char mulawtolin16[256][2] = {
{0x02,0x84}, {0x06,0x84}, {0x0a,0x84}, {0x0e,0x84},
{0x12,0x84}, {0x16,0x84}, {0x1a,0x84}, {0x1e,0x84},
{0x22,0x84}, {0x26,0x84}, {0x2a,0x84}, {0x2e,0x84},
@@ -110,7 +110,7 @@ static u_char mulawtolin16[256][2] = {
{0x80,0x18}, {0x80,0x10}, {0x80,0x08}, {0x80,0x00},
};
-static u_char lintomulaw[256] = {
+static const u_char lintomulaw[256] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
0x01, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03,
0x03, 0x04, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05,
@@ -145,7 +145,7 @@ static u_char lintomulaw[256] = {
0x81, 0x81, 0x81, 0x81, 0x80, 0x80, 0x80, 0x80,
};
-static u_char alawtolin16[256][2] = {
+static const u_char alawtolin16[256][2] = {
{0x6a,0x80}, {0x6b,0x80}, {0x68,0x80}, {0x69,0x80},
{0x6e,0x80}, {0x6f,0x80}, {0x6c,0x80}, {0x6d,0x80},
{0x62,0x80}, {0x63,0x80}, {0x60,0x80}, {0x61,0x80},
@@ -212,7 +212,7 @@ static u_char alawtolin16[256][2] = {
{0x83,0x30}, {0x83,0x10}, {0x83,0x70}, {0x83,0x50},
};
-static u_char lintoalaw[256] = {
+static const u_char lintoalaw[256] = {
0x2a, 0x2a, 0x2a, 0x2a, 0x2b, 0x2b, 0x2b, 0x2b,
0x28, 0x28, 0x28, 0x28, 0x29, 0x29, 0x29, 0x29,
0x2e, 0x2e, 0x2e, 0x2e, 0x2f, 0x2f, 0x2f, 0x2f,
diff --git a/sys/dev/pci/ahc_pci.c b/sys/dev/pci/ahc_pci.c
index b325625fe32..0e3bb16b595 100644
--- a/sys/dev/pci/ahc_pci.c
+++ b/sys/dev/pci/ahc_pci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ahc_pci.c,v 1.28 2000/12/28 22:59:11 sommerfeld Exp $ */
+/* $NetBSD: ahc_pci.c,v 1.29 2001/01/18 20:28:15 jdolecek Exp $ */
/*
* Product specific probe and attach routines for:
@@ -180,11 +180,11 @@ static ahc_device_setup_t ahc_aha398XX_setup;
struct ahc_pci_identity {
u_int64_t full_id;
u_int64_t id_mask;
- char *name;
+ const char *name;
ahc_device_setup_t *setup;
};
-struct ahc_pci_identity ahc_pci_ident_table [] =
+const struct ahc_pci_identity ahc_pci_ident_table [] =
{
/* aic7850 based controllers */
{
@@ -549,7 +549,7 @@ static const int ahc_num_pci_devs =
#define CACHESIZE 0x0000003f /* only 5 bits */
#define LATTIME 0x0000ff00
-static struct ahc_pci_identity *ahc_find_pci_device(pcireg_t, pcireg_t);
+static const struct ahc_pci_identity *ahc_find_pci_device(pcireg_t, pcireg_t);
static int ahc_ext_scbram_present(struct ahc_softc *ahc);
static void ahc_ext_scbram_config(struct ahc_softc *ahc, int enable,
int pcheck, int fast);
@@ -565,12 +565,12 @@ struct cfattach ahc_pci_ca = {
sizeof(struct ahc_softc), ahc_pci_probe, ahc_pci_attach
};
-static struct ahc_pci_identity *
+static const struct ahc_pci_identity *
ahc_find_pci_device(id, subid)
pcireg_t id, subid;
{
u_int64_t full_id;
- struct ahc_pci_identity *entry;
+ const struct ahc_pci_identity *entry;
u_int i;
full_id = ahc_compose_id(PCI_PRODUCT(id), PCI_VENDOR(id),
@@ -591,7 +591,7 @@ ahc_pci_probe(parent, match, aux)
void *aux;
{
struct pci_attach_args *pa = aux;
- struct ahc_pci_identity *entry;
+ const struct ahc_pci_identity *entry;
pcireg_t subid;
subid = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG);
@@ -605,7 +605,7 @@ ahc_pci_attach(parent, self, aux)
void *aux;
{
struct pci_attach_args *pa = aux;
- struct ahc_pci_identity *entry;
+ const struct ahc_pci_identity *entry;
struct ahc_softc *ahc = (void *)self;
pcireg_t command;
ahc_chip ahc_t = AHC_NONE;
diff --git a/sys/dev/pci/bktr/bktr_core.c b/sys/dev/pci/bktr/bktr_core.c
index 2dc9c2c2c27..14f3e42718f 100644
--- a/sys/dev/pci/bktr/bktr_core.c
+++ b/sys/dev/pci/bktr/bktr_core.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bktr_core.c,v 1.14 2000/12/30 16:52:36 wiz Exp $ */
+/* $NetBSD: bktr_core.c,v 1.15 2001/01/18 20:28:24 jdolecek Exp $ */
/* FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp */
@@ -279,7 +279,7 @@ typedef u_char bool_t;
* Parameters describing size of transmitted image.
*/
-static struct format_params format_params[] = {
+static const struct format_params format_params[] = {
/* # define BT848_IFORM_F_AUTO (0x0) - don't matter. */
{ 525, 26, 480, 910, 135, 754, 640, 780, 30, 0x68, 0x5d, BT848_IFORM_X_AUTO,
12, 1600 },
@@ -310,7 +310,7 @@ static struct format_params format_params[] = {
* Table of supported Pixel Formats
*/
-static struct meteor_pixfmt_internal {
+static const struct meteor_pixfmt_internal {
struct meteor_pixfmt public;
u_int color_fmt;
} pixfmt_table[] = {
@@ -339,7 +339,7 @@ static struct meteor_pixfmt_internal {
*/
/* FIXME: Also add YUV_422 and YUV_PACKED as well */
-static struct {
+static const struct {
u_long meteor_format;
struct meteor_pixfmt public;
} meteor_pixfmt_table[] = {
@@ -2627,7 +2627,7 @@ static bool_t split(bktr_reg_t * bktr, volatile u_long **dma_prog, int width ,
volatile u_char ** target_buffer, int cols ) {
u_long flag, flag2;
- struct meteor_pixfmt *pf = &pixfmt_table[ bktr->pixfmt ].public;
+ const struct meteor_pixfmt *pf = &pixfmt_table[ bktr->pixfmt ].public;
u_int skip, start_skip;
/* For RGB24, we need to align the component in FIFO Byte Lane 0 */
@@ -2717,7 +2717,7 @@ rgb_vbi_prog( bktr_ptr_t bktr, char i_flag, int cols, int rows, int interlace )
volatile u_long *dma_prog; /* DMA prog is an array of
32 bit RISC instructions */
volatile u_long *loop_point;
- struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
+ const struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
u_int Bpp = pf_int->public.Bpp;
unsigned int vbisamples; /* VBI samples per line */
unsigned int vbilines; /* VBI lines per field */
@@ -2897,7 +2897,7 @@ rgb_prog( bktr_ptr_t bktr, char i_flag, int cols, int rows, int interlace )
volatile u_long target_buffer, buffer, target,width;
volatile u_long pitch;
volatile u_long *dma_prog;
- struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
+ const struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
u_int Bpp = pf_int->public.Bpp;
OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt);
@@ -3061,7 +3061,7 @@ yuvpack_prog( bktr_ptr_t bktr, char i_flag,
volatile unsigned int inst3;
volatile u_long target_buffer, buffer;
volatile u_long *dma_prog;
- struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
+ const struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
int b;
OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt);
@@ -3175,7 +3175,7 @@ yuv422_prog( bktr_ptr_t bktr, char i_flag,
volatile unsigned int inst;
volatile u_long target_buffer, t1, buffer;
volatile u_long *dma_prog;
- struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
+ const struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt);
@@ -3289,7 +3289,7 @@ yuv12_prog( bktr_ptr_t bktr, char i_flag,
volatile unsigned int inst1;
volatile u_long target_buffer, t1, buffer;
volatile u_long *dma_prog;
- struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
+ const struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
OUTB(bktr, BKTR_COLOR_FMT, pf_int->color_fmt);
@@ -3397,8 +3397,8 @@ build_dma_prog( bktr_ptr_t bktr, char i_flag )
int rows, cols, interlace;
int tmp_int;
unsigned int temp;
- struct format_params *fp;
- struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
+ const struct format_params *fp;
+ const struct meteor_pixfmt_internal *pf_int = &pixfmt_table[ bktr->pixfmt ];
fp = &format_params[bktr->format_params];
@@ -3604,7 +3604,7 @@ static void
start_capture( bktr_ptr_t bktr, unsigned type )
{
u_char i_flag;
- struct format_params *fp;
+ const struct format_params *fp;
fp = &format_params[bktr->format_params];
@@ -3662,7 +3662,7 @@ start_capture( bktr_ptr_t bktr, unsigned type )
static void
set_fps( bktr_ptr_t bktr, u_short fps )
{
- struct format_params *fp;
+ const struct format_params *fp;
int i_flag;
fp = &format_params[bktr->format_params];
@@ -3714,7 +3714,7 @@ set_fps( bktr_ptr_t bktr, u_short fps )
static u_int pixfmt_swap_flags( int pixfmt )
{
- struct meteor_pixfmt *pf = &pixfmt_table[ pixfmt ].public;
+ const struct meteor_pixfmt *pf = &pixfmt_table[ pixfmt ].public;
u_int swapf = 0;
switch ( pf->Bpp ) {
@@ -3743,7 +3743,7 @@ static u_int pixfmt_swap_flags( int pixfmt )
static int oformat_meteor_to_bt( u_long format )
{
int i;
- struct meteor_pixfmt *pf1, *pf2;
+ const struct meteor_pixfmt *pf1, *pf2;
/* Find format in compatibility table */
for ( i = 0; i < METEOR_PIXFMT_TABLE_SIZE; i++ )
diff --git a/sys/dev/pci/bktr/bktr_tuner.c b/sys/dev/pci/bktr/bktr_tuner.c
index 31fa67e6ced..20d455847b1 100644
--- a/sys/dev/pci/bktr/bktr_tuner.c
+++ b/sys/dev/pci/bktr/bktr_tuner.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bktr_tuner.c,v 1.7 2000/12/30 16:52:37 wiz Exp $ */
+/* $NetBSD: bktr_tuner.c,v 1.8 2001/01/18 20:28:24 jdolecek Exp $ */
/* FreeBSD: src/sys/dev/bktr/bktr_tuner.c,v 1.9 2000/10/19 07:33:28 roger Exp */
@@ -316,7 +316,7 @@ static const struct TUNER tuners[] = {
* IF freq: 45.75 mHz
*/
#define OFFSET 6.00
-static int nabcst[] = {
+static const int nabcst[] = {
83, (int)( 45.75 * FREQFACTOR), 0,
14, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
7, (int)(175.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -339,7 +339,7 @@ static int nabcst[] = {
* IF freq: 45.75 mHz
*/
#define OFFSET 6.00
-static int irccable[] = {
+static const int irccable[] = {
116, (int)( 45.75 * FREQFACTOR), 0,
100, (int)(649.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
95, (int)( 91.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -365,7 +365,7 @@ static int irccable[] = {
* IF freq: 45.75 mHz
*/
#define OFFSET 6.00
-static int hrccable[] = {
+static const int hrccable[] = {
116, (int)( 45.75 * FREQFACTOR), 0,
100, (int)(648.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
95, (int)( 90.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -521,7 +521,7 @@ static int hrccable[] = {
* 121 3890 000 IFFREQ
*
*/
-static int weurope[] = {
+static const int weurope[] = {
121, (int)( 38.90 * FREQFACTOR), 0,
100, (int)(303.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR),
90, (int)(231.25 * FREQFACTOR), (int)(7.00 * FREQFACTOR),
@@ -551,7 +551,7 @@ static int weurope[] = {
*/
#define OFFSET 6.00
#define IF_FREQ 45.75
-static int jpnbcst[] = {
+static const int jpnbcst[] = {
62, (int)(IF_FREQ * FREQFACTOR), 0,
13, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
8, (int)(193.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -576,7 +576,7 @@ static int jpnbcst[] = {
*/
#define OFFSET 6.00
#define IF_FREQ 45.75
-static int jpncable[] = {
+static const int jpncable[] = {
63, (int)(IF_FREQ * FREQFACTOR), 0,
23, (int)(223.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
22, (int)(165.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -607,7 +607,7 @@ static int jpncable[] = {
* IF freq: 38.90 MHz
*/
#define IF_FREQ 38.90
-static int xussr[] = {
+static const int xussr[] = {
107, (int)(IF_FREQ * FREQFACTOR), 0,
78, (int)(231.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR),
70, (int)(111.25 * FREQFACTOR), (int)(8.00 * FREQFACTOR),
@@ -625,7 +625,7 @@ static int xussr[] = {
*/
#define OFFSET 7.00
#define IF_FREQ 38.90
-static int australia[] = {
+static const int australia[] = {
83, (int)(IF_FREQ * FREQFACTOR), 0,
28, (int)(527.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
10, (int)(209.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR),
@@ -643,7 +643,7 @@ static int australia[] = {
*/
#define OFFSET 8.00
#define IF_FREQ 38.90
-static int france[] = {
+static const int france[] = {
69, (int)(IF_FREQ * FREQFACTOR), 0,
21, (int)(471.25 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 21 -> 69 */
5, (int)(176.00 * FREQFACTOR), (int)(OFFSET * FREQFACTOR), /* 5 -> 10 */
@@ -655,9 +655,9 @@ static int france[] = {
#undef OFFSET
#undef IF_FREQ
-static struct {
- int *ptr;
- char name[BT848_MAX_CHNLSET_NAME_LEN];
+static const struct {
+ const int *ptr;
+ const char name[BT848_MAX_CHNLSET_NAME_LEN];
} freqTable[] = {
{NULL, ""},
{nabcst, "nabcst"},
diff --git a/sys/dev/pci/cmpci.c b/sys/dev/pci/cmpci.c
index 54501753adc..dc2030f1a0c 100644
--- a/sys/dev/pci/cmpci.c
+++ b/sys/dev/pci/cmpci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cmpci.c,v 1.5 2000/12/28 22:59:11 sommerfeld Exp $ */
+/* $NetBSD: cmpci.c,v 1.6 2001/01/18 20:28:15 jdolecek Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -247,7 +247,7 @@ cmpci_reg_clear_4(sc, no, mask)
/* rate */
-static struct {
+static const struct {
int rate;
int divider;
} cmpci_rate_table[CMPCI_REG_NUMRATE] = {
diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c
index 895816c6c53..29df14d308c 100644
--- a/sys/dev/pci/cs4280.c
+++ b/sys/dev/pci/cs4280.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cs4280.c,v 1.11 2001/01/15 23:25:39 perry Exp $ */
+/* $NetBSD: cs4280.c,v 1.12 2001/01/18 20:28:15 jdolecek Exp $ */
/*
* Copyright (c) 1999, 2000 Tatoku Ogaito. All rights reserved.
@@ -171,7 +171,7 @@ int cs4280_intr __P((void *));
void cs4280_reset __P((void *));
int cs4280_download_image __P((struct cs4280_softc *));
-int cs4280_download(struct cs4280_softc *, u_int32_t *, u_int32_t, u_int32_t);
+int cs4280_download(struct cs4280_softc *, const u_int32_t *, u_int32_t, u_int32_t);
int cs4280_allocmem __P((struct cs4280_softc *, size_t, size_t,
struct cs4280_dma *));
int cs4280_freemem __P((struct cs4280_softc *, struct cs4280_dma *));
@@ -821,7 +821,7 @@ cs4280_intr(p)
int
cs4280_download(sc, src, offset, len)
struct cs4280_softc *sc;
- u_int32_t *src;
+ const u_int32_t *src;
u_int32_t offset, len;
{
u_int32_t ctr;
diff --git a/sys/dev/pci/cs4280_image.h b/sys/dev/pci/cs4280_image.h
index 517587808dc..fcfdf87f3f6 100644
--- a/sys/dev/pci/cs4280_image.h
+++ b/sys/dev/pci/cs4280_image.h
@@ -1,4 +1,4 @@
-/* $NetBSD: cs4280_image.h,v 1.1 1999/12/13 20:19:24 augustss Exp $ */
+/* $NetBSD: cs4280_image.h,v 1.2 2001/01/18 20:28:15 jdolecek Exp $ */
/* This source is based on cwcimage.h in cwcealdr1.zip, the
* sample source by Crystal Semiconductor.
@@ -11,7 +11,7 @@
#ifndef _CLCS_IMAGE_H
#define _CLCS_IMAGE_H
-struct BA1struct BA1Struct = {
+const struct BA1struct BA1Struct = {
{{ 0x00000000, 0x00003000 },{ 0x00010000, 0x00003800 },{ 0x00020000, 0x00007000 }},
{0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c
index 3197dc77674..a8533a71f34 100644
--- a/sys/dev/pci/if_ti.c
+++ b/sys/dev/pci/if_ti.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.18 2001/01/14 17:41:17 thorpej Exp $ */
+/* $NetBSD: if_ti.c,v 1.19 2001/01/18 20:28:15 jdolecek Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -135,7 +135,7 @@
* Various supported device vendors/types and their names.
*/
-static struct ti_type ti_devs[] = {
+static const struct ti_type ti_devs[] = {
{ PCI_VENDOR_ALTEON, PCI_PRODUCT_ALTEON_ACENIC,
"Alteon AceNIC 1000baseSX Gigabit Ethernet" },
{ PCI_VENDOR_ALTEON, PCI_PRODUCT_ALTEON_ACENIC_COPPER,
@@ -151,7 +151,7 @@ static struct ti_type ti_devs[] = {
{ 0, 0, NULL }
};
-static struct ti_type *ti_type_match __P((struct pci_attach_args *));
+static const struct ti_type *ti_type_match __P((struct pci_attach_args *));
static int ti_probe __P((struct device *, struct cfdata *, void *));
static void ti_attach __P((struct device *, struct device *, void *));
static void ti_shutdown __P((void *));
@@ -1570,10 +1570,11 @@ static int ti_gibinit(sc)
/*
* look for id in the device list, returning the first match
*/
-static struct ti_type * ti_type_match(pa)
+static const struct ti_type *
+ti_type_match(pa)
struct pci_attach_args *pa;
{
- struct ti_type *t;
+ const struct ti_type *t;
t = ti_devs;
while(t->ti_name != NULL) {
@@ -1597,7 +1598,7 @@ static int ti_probe(parent, match, aux)
void *aux;
{
struct pci_attach_args *pa = aux;
- struct ti_type *t;
+ const struct ti_type *t;
t = ti_type_match(pa);
@@ -1618,7 +1619,7 @@ static void ti_attach(parent, self, aux)
const char *intrstr = NULL;
bus_dma_segment_t dmaseg;
int error, dmanseg, nolinear;
- struct ti_type *t;
+ const struct ti_type *t;
t = ti_type_match(pa);
if (t == NULL) {
diff --git a/sys/dev/pci/ti_fw.h b/sys/dev/pci/ti_fw.h
index e2014f7ebf7..c9c63dc32d4 100644
--- a/sys/dev/pci/ti_fw.h
+++ b/sys/dev/pci/ti_fw.h
@@ -4,21 +4,21 @@
*
* $FreeBSD: /c/ncvs/src/sys/pci/ti_fw.h,v 1.9 2000/07/20 22:24:42 wpaul Exp $
*/
-static int tigonFwReleaseMajor = 0xc;
-static int tigonFwReleaseMinor = 0x4;
-static int tigonFwReleaseFix = 0xd;
-static u_int32_t tigonFwStartAddr = 0x00004000;
-static u_int32_t tigonFwTextAddr = 0x00004000;
-static int tigonFwTextLen = 0x11160;
-static u_int32_t tigonFwRodataAddr = 0x00015160;
-static int tigonFwRodataLen = 0xae0;
-static u_int32_t tigonFwDataAddr = 0x00015c60;
-static int tigonFwDataLen = 0x180;
-static u_int32_t tigonFwSbssAddr = 0x00015de0;
-static int tigonFwSbssLen = 0x38;
-static u_int32_t tigonFwBssAddr = 0x00015e20;
-static int tigonFwBssLen = 0x2080;
-static u_int32_t tigonFwText[] = {
+static const int tigonFwReleaseMajor = 0xc;
+static const int tigonFwReleaseMinor = 0x4;
+static const int tigonFwReleaseFix = 0xd;
+static const u_int32_t tigonFwStartAddr = 0x00004000;
+static const u_int32_t tigonFwTextAddr = 0x00004000;
+static const int tigonFwTextLen = 0x11160;
+static const u_int32_t tigonFwRodataAddr = 0x00015160;
+static const int tigonFwRodataLen = 0xae0;
+static const u_int32_t tigonFwDataAddr = 0x00015c60;
+static const int tigonFwDataLen = 0x180;
+static const u_int32_t tigonFwSbssAddr = 0x00015de0;
+static const int tigonFwSbssLen = 0x38;
+static const u_int32_t tigonFwBssAddr = 0x00015e20;
+static const int tigonFwBssLen = 0x2080;
+static const u_int32_t tigonFwText[] = {
0x10000003,
0x0, 0xd, 0xd, 0x3c1d0001,
0x8fbd5c94, 0x3a0f021, 0x3c100000, 0x26104000,
@@ -4394,7 +4394,7 @@ static u_int32_t tigonFwText[] = {
0x8fbf0024, 0x8fb40020, 0x8fb3001c, 0x8fb20018,
0x8fb10014, 0x8fb00010, 0x3e00008, 0x27bd0028,
0x0, 0x0, 0x0, 0x0 };
-static u_int32_t tigonFwRodata[] = {
+static const u_int32_t tigonFwRodata[] = {
0x24486561, 0x6465723a, 0x202f7072,
0x6f6a6563, 0x74732f72, 0x63732f73, 0x772f6765,
0x2f2e2f6e, 0x69632f66, 0x772f636f, 0x6d6d6f6e,
@@ -4570,7 +4570,7 @@ static u_int32_t tigonFwRodata[] = {
0x0, 0x14c4c, 0x14c4c, 0x14b94,
0x14bd8, 0x14c4c, 0x14c4c, 0x14b94,
0x0, 0x0 };
-static u_int32_t tigonFwData[] = {
+static const u_int32_t tigonFwData[] = {
0x416c7465,
0x6f6e2041, 0x63654e49, 0x43205600, 0x416c7465,
0x6f6e2041, 0x63654e49, 0x43205600, 0x42424242,
diff --git a/sys/dev/pci/ti_fw2.h b/sys/dev/pci/ti_fw2.h
index a7cda25dc80..e966930ab44 100644
--- a/sys/dev/pci/ti_fw2.h
+++ b/sys/dev/pci/ti_fw2.h
@@ -9,21 +9,21 @@
*
* $FreeBSD: /c/ncvs/src/sys/pci/ti_fw2.h,v 1.10 2000/07/26 23:55:34 wpaul Exp $
*/
-static int tigon2FwReleaseMajor = 0xc;
-static int tigon2FwReleaseMinor = 0x4;
-static int tigon2FwReleaseFix = 0xd;
-static u_int32_t tigon2FwStartAddr = 0x00004000;
-static u_int32_t tigon2FwTextAddr = 0x00004000;
-static int tigon2FwTextLen = 0x11c80;
-static u_int32_t tigon2FwRodataAddr = 0x00015c80;
-static int tigon2FwRodataLen = 0x10d0;
-static u_int32_t tigon2FwDataAddr = 0x00016d80;
-static int tigon2FwDataLen = 0x1c0;
-static u_int32_t tigon2FwSbssAddr = 0x00016f40;
-static int tigon2FwSbssLen = 0xcc;
-static u_int32_t tigon2FwBssAddr = 0x00017010;
-static int tigon2FwBssLen = 0x20c0;
-static u_int32_t tigon2FwText[] = {
+static const int tigon2FwReleaseMajor = 0xc;
+static const int tigon2FwReleaseMinor = 0x4;
+static const int tigon2FwReleaseFix = 0xd;
+static const u_int32_t tigon2FwStartAddr = 0x00004000;
+static const u_int32_t tigon2FwTextAddr = 0x00004000;
+static const int tigon2FwTextLen = 0x11c80;
+static const u_int32_t tigon2FwRodataAddr = 0x00015c80;
+static const int tigon2FwRodataLen = 0x10d0;
+static const u_int32_t tigon2FwDataAddr = 0x00016d80;
+static const int tigon2FwDataLen = 0x1c0;
+static const u_int32_t tigon2FwSbssAddr = 0x00016f40;
+static const int tigon2FwSbssLen = 0xcc;
+static const u_int32_t tigon2FwBssAddr = 0x00017010;
+static const int tigon2FwBssLen = 0x20c0;
+static const u_int32_t tigon2FwText[] = {
0x0,
0x10000003, 0x0, 0xd, 0xd,
0x3c1d0001, 0x8fbd6de0, 0x3a0f021, 0x3c100000,
@@ -4577,7 +4577,7 @@ static u_int32_t tigon2FwText[] = {
0x24020001, 0x8f430328, 0x1021, 0x24630001,
0x3e00008, 0xaf430328, 0x3e00008, 0x0,
0x0, 0x0, 0x0, 0x0 };
-static u_int32_t tigon2FwRodata[] = {
+static const u_int32_t tigon2FwRodata[] = {
0x24486561,
0x6465723a, 0x202f7072, 0x6f6a6563, 0x74732f72,
0x63732f73, 0x772f6765, 0x2f2e2f6e, 0x69632f66,
@@ -4848,7 +4848,7 @@ static u_int32_t tigon2FwRodata[] = {
0x0, 0x14f98, 0x14f98, 0x14c4c,
0x14c98, 0x14ce4, 0x14f98, 0x7365746d,
0x61636163, 0x74000000, 0x0, 0x0 };
-static u_int32_t tigon2FwData[] = {
+static const u_int32_t tigon2FwData[] = {
0x1,
0x1, 0x1, 0xc001fc, 0x3ffc,
0xc00000, 0x46726565, 0x42534420, 0x5469676f,
diff --git a/sys/dev/pcmcia/if_awi_pcmcia.c b/sys/dev/pcmcia/if_awi_pcmcia.c
index 2bbdf6b4224..c28633d758d 100644
--- a/sys/dev/pcmcia/if_awi_pcmcia.c
+++ b/sys/dev/pcmcia/if_awi_pcmcia.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_awi_pcmcia.c,v 1.17 2000/07/05 02:27:25 onoe Exp $ */
+/* $NetBSD: if_awi_pcmcia.c,v 1.18 2001/01/18 20:28:25 jdolecek Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -122,7 +122,7 @@ struct cfattach awi_pcmcia_ca = {
awi_pcmcia_detach, awi_activate
};
-static struct awi_pcmcia_product {
+static const struct awi_pcmcia_product {
u_int32_t app_vendor; /* vendor ID */
u_int32_t app_product; /* product ID */
const char *app_cisinfo[4]; /* CIS information */
@@ -153,14 +153,14 @@ static struct awi_pcmcia_product {
{ NULL, NULL, NULL, NULL }, NULL },
};
-static struct awi_pcmcia_product *
+static const struct awi_pcmcia_product *
awi_pcmcia_lookup __P((struct pcmcia_attach_args *));
-static struct awi_pcmcia_product *
+static const struct awi_pcmcia_product *
awi_pcmcia_lookup(pa)
struct pcmcia_attach_args *pa;
{
- struct awi_pcmcia_product *app;
+ const struct awi_pcmcia_product *app;
for (app = awi_pcmcia_products; app->app_name != NULL; app++) {
/* match by vendor/product id */
@@ -295,7 +295,7 @@ awi_pcmcia_attach(parent, self, aux)
{
struct awi_pcmcia_softc *psc = (void *)self;
struct awi_softc *sc = &psc->sc_awi;
- struct awi_pcmcia_product *app;
+ const struct awi_pcmcia_product *app;
struct pcmcia_attach_args *pa = aux;
struct pcmcia_config_entry *cfe;
bus_addr_t memoff;
diff --git a/sys/dev/pcmcia/if_ne_pcmcia.c b/sys/dev/pcmcia/if_ne_pcmcia.c
index cb632225db5..f4fd03a25a8 100644
--- a/sys/dev/pcmcia/if_ne_pcmcia.c
+++ b/sys/dev/pcmcia/if_ne_pcmcia.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ne_pcmcia.c,v 1.66 2000/11/03 09:07:24 toddpw Exp $ */
+/* $NetBSD: if_ne_pcmcia.c,v 1.67 2001/01/18 20:28:26 jdolecek Exp $ */
/*
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
@@ -87,7 +87,7 @@ struct cfattach ne_pcmcia_ca = {
ne_pcmcia_detach, dp8390_activate
};
-struct ne2000dev {
+static const struct ne2000dev {
char *name;
int32_t manufacturer;
int32_t product;
@@ -492,7 +492,7 @@ ne_pcmcia_attach(parent, self, aux)
struct dp8390_softc *dsc = &nsc->sc_dp8390;
struct pcmcia_attach_args *pa = aux;
struct pcmcia_config_entry *cfe;
- struct ne2000dev *ne_dev;
+ const struct ne2000dev *ne_dev;
int i;
u_int8_t myea[6], *enaddr;
void (*npp_init_media) __P((struct dp8390_softc *, int **,
diff --git a/sys/dev/pcmcia/if_wi.c b/sys/dev/pcmcia/if_wi.c
index 475744226a9..571da96efcd 100644
--- a/sys/dev/pcmcia/if_wi.c
+++ b/sys/dev/pcmcia/if_wi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wi.c,v 1.51 2001/01/14 06:54:01 ichiro Exp $ */
+/* $NetBSD: if_wi.c,v 1.52 2001/01/18 20:28:26 jdolecek Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -130,7 +130,7 @@ struct wi_pcmcia_product {
int pp_prism2; /* prism2 chipset */
};
-static struct wi_pcmcia_product *wi_lookup __P((struct pcmcia_attach_args *pa));
+static const struct wi_pcmcia_product *wi_lookup __P((struct pcmcia_attach_args *pa));
static int wi_match __P((struct device *, struct cfdata *, void *));
static void wi_attach __P((struct device *, struct device *, void *));
static int wi_detach __P((struct device *, int));
@@ -184,7 +184,7 @@ struct cfattach wi_ca = {
sizeof(struct wi_softc), wi_match, wi_attach, wi_detach, wi_activate
};
-static struct wi_pcmcia_product wi_pcmcia_products[] = {
+static const struct wi_pcmcia_product wi_pcmcia_products[] = {
{ PCMCIA_VENDOR_LUCENT,
PCMCIA_PRODUCT_LUCENT_WAVELAN_IEEE,
PCMCIA_CIS_LUCENT_WAVELAN_IEEE,
@@ -240,11 +240,11 @@ static struct wi_pcmcia_product wi_pcmcia_products[] = {
0 }
};
-static struct wi_pcmcia_product *
+static const struct wi_pcmcia_product *
wi_lookup(pa)
struct pcmcia_attach_args *pa;
{
- struct wi_pcmcia_product *pp;
+ const struct wi_pcmcia_product *pp;
/*
* match by CIS information first
@@ -334,7 +334,7 @@ wi_attach(parent, self, aux)
struct wi_softc *sc = (void *) self;
struct pcmcia_attach_args *pa = aux;
struct ifnet *ifp = &sc->sc_ethercom.ec_if;
- struct wi_pcmcia_product *pp;
+ const struct wi_pcmcia_product *pp;
struct wi_ltv_macaddr mac;
struct wi_ltv_gen gen;
char devinfo[256];
diff --git a/sys/dev/pcmcia/pcmcia_cis_quirks.c b/sys/dev/pcmcia/pcmcia_cis_quirks.c
index 8a7fb41dbbc..16cf908984a 100644
--- a/sys/dev/pcmcia/pcmcia_cis_quirks.c
+++ b/sys/dev/pcmcia/pcmcia_cis_quirks.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcmcia_cis_quirks.c,v 1.7 2001/01/10 17:37:27 aymeric Exp $ */
+/* $NetBSD: pcmcia_cis_quirks.c,v 1.8 2001/01/18 20:28:26 jdolecek Exp $ */
#define PCMCIADEBUG
@@ -48,7 +48,7 @@
/* these structures are just static templates which are then copied
into "live" allocated structures */
-static struct pcmcia_function pcmcia_dlink_de650_func0 = {
+static const struct pcmcia_function pcmcia_dlink_de650_func0 = {
0,
PCMCIA_FUNCTION_NETWORK,
0x23,
@@ -56,7 +56,7 @@ static struct pcmcia_function pcmcia_dlink_de650_func0 = {
0x0b,
};
-static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe0 = {
0x20,
PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -69,7 +69,7 @@ static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe0 = {
0,
};
-static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe1 = {
+static const struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe1 = {
0x21,
PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -82,7 +82,7 @@ static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe1 = {
0,
};
-static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe2 = {
+static const struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe2 = {
0x22,
PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -95,7 +95,7 @@ static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe2 = {
0,
};
-static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe3 = {
+static const struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe3 = {
0x23,
PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -108,7 +108,7 @@ static struct pcmcia_config_entry pcmcia_dlink_de650_func0_cfe3 = {
0,
};
-static struct pcmcia_function pcmcia_3cxem556_func0 = {
+static const struct pcmcia_function pcmcia_3cxem556_func0 = {
0, /* function number */
PCMCIA_FUNCTION_NETWORK,
0x07, /* last cfe number */
@@ -116,7 +116,7 @@ static struct pcmcia_function pcmcia_3cxem556_func0 = {
0x63, /* ccr_mask */
};
-static struct pcmcia_config_entry pcmcia_3cxem556_func0_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_3cxem556_func0_cfe0 = {
0x07, /* cfe number */
PCMCIA_CFE_IO8 | PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -129,7 +129,7 @@ static struct pcmcia_config_entry pcmcia_3cxem556_func0_cfe0 = {
0, /* maxtwins */
};
-static struct pcmcia_function pcmcia_3cxem556_func1 = {
+static const struct pcmcia_function pcmcia_3cxem556_func1 = {
1, /* function number */
PCMCIA_FUNCTION_SERIAL,
0x27, /* last cfe number */
@@ -137,7 +137,7 @@ static struct pcmcia_function pcmcia_3cxem556_func1 = {
0x63, /* ccr_mask */
};
-static struct pcmcia_config_entry pcmcia_3cxem556_func1_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_3cxem556_func1_cfe0 = {
0x27, /* cfe number */
PCMCIA_CFE_IO8 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -150,7 +150,7 @@ static struct pcmcia_config_entry pcmcia_3cxem556_func1_cfe0 = {
0, /* maxtwins */
};
-static struct pcmcia_function pcmcia_3ccfem556bi_func0 = {
+static const struct pcmcia_function pcmcia_3ccfem556bi_func0 = {
0, /* function number */
PCMCIA_FUNCTION_NETWORK,
0x07, /* last cfe number */
@@ -158,7 +158,7 @@ static struct pcmcia_function pcmcia_3ccfem556bi_func0 = {
0x267, /* ccr_mask */
};
-static struct pcmcia_config_entry pcmcia_3ccfem556bi_func0_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_3ccfem556bi_func0_cfe0 = {
0x07, /* cfe number */
PCMCIA_CFE_IO8 | PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -171,7 +171,7 @@ static struct pcmcia_config_entry pcmcia_3ccfem556bi_func0_cfe0 = {
0, /* maxtwins */
};
-static struct pcmcia_function pcmcia_3ccfem556bi_func1 = {
+static const struct pcmcia_function pcmcia_3ccfem556bi_func1 = {
1, /* function number */
PCMCIA_FUNCTION_SERIAL,
0x27, /* last cfe number */
@@ -179,7 +179,7 @@ static struct pcmcia_function pcmcia_3ccfem556bi_func1 = {
0x277, /* ccr_mask */
};
-static struct pcmcia_config_entry pcmcia_3ccfem556bi_func1_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_3ccfem556bi_func1_cfe0 = {
0x27, /* cfe number */
PCMCIA_CFE_IO8 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -192,7 +192,7 @@ static struct pcmcia_config_entry pcmcia_3ccfem556bi_func1_cfe0 = {
0, /* maxtwins */
};
-static struct pcmcia_function pcmcia_sveclancard_func0 = {
+static const struct pcmcia_function pcmcia_sveclancard_func0 = {
0, /* function number */
PCMCIA_FUNCTION_NETWORK,
0x1, /* last cfe number */
@@ -200,7 +200,7 @@ static struct pcmcia_function pcmcia_sveclancard_func0 = {
0x1, /* ccr_mask */
};
-static struct pcmcia_config_entry pcmcia_sveclancard_func0_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_sveclancard_func0_cfe0 = {
0x1, /* cfe number */
PCMCIA_CFE_MWAIT_REQUIRED | PCMCIA_CFE_RDYBSY_ACTIVE |
PCMCIA_CFE_WP_ACTIVE | PCMCIA_CFE_BVD_ACTIVE | PCMCIA_CFE_IO16,
@@ -214,7 +214,7 @@ static struct pcmcia_config_entry pcmcia_sveclancard_func0_cfe0 = {
0, /* maxtwins */
};
-static struct pcmcia_function pcmcia_ndc_nd5100_func0 = {
+static const struct pcmcia_function pcmcia_ndc_nd5100_func0 = {
0, /* function number */
PCMCIA_FUNCTION_NETWORK,
0x23, /* last cfe number */
@@ -222,7 +222,7 @@ static struct pcmcia_function pcmcia_ndc_nd5100_func0 = {
0x3, /* ccr_mask */
};
-static struct pcmcia_config_entry pcmcia_ndc_nd5100_func0_cfe0 = {
+static const struct pcmcia_config_entry pcmcia_ndc_nd5100_func0_cfe0 = {
0x20, /* cfe number */
PCMCIA_CFE_MWAIT_REQUIRED | PCMCIA_CFE_IO16 | PCMCIA_CFE_IRQLEVEL,
PCMCIA_IFTYPE_IO,
@@ -235,7 +235,7 @@ static struct pcmcia_config_entry pcmcia_ndc_nd5100_func0_cfe0 = {
0, /* maxtwins */
};
-static struct pcmcia_cis_quirk pcmcia_cis_quirks[] = {
+static const struct pcmcia_cis_quirk pcmcia_cis_quirks[] = {
{ PCMCIA_VENDOR_LINKSYS, PCMCIA_PRODUCT_LINKSYS_ECARD_1,
PCMCIA_CIS_INVALID,
&pcmcia_dlink_de650_func0, &pcmcia_dlink_de650_func0_cfe0 },
@@ -276,7 +276,8 @@ void pcmcia_check_cis_quirks(sc)
{
int wiped = 0;
int i, j;
- struct pcmcia_function *pf, *pf_next, *pf_last;
+ struct pcmcia_function *pf, *pf_next;
+ const struct pcmcia_function *pf_last;
struct pcmcia_config_entry *cfe, *cfe_next;
pf = NULL;
diff --git a/sys/dev/pcmcia/pcmciavar.h b/sys/dev/pcmcia/pcmciavar.h
index a0ed624ca04..6ee0300577e 100644
--- a/sys/dev/pcmcia/pcmciavar.h
+++ b/sys/dev/pcmcia/pcmciavar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pcmciavar.h,v 1.13 2000/10/17 10:13:47 haya Exp $ */
+/* $NetBSD: pcmciavar.h,v 1.14 2001/01/18 20:28:26 jdolecek Exp $ */
/*
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
@@ -202,9 +202,9 @@ struct pcmcia_softc {
struct pcmcia_cis_quirk {
int32_t manufacturer;
int32_t product;
- char *cis1_info[4];
- struct pcmcia_function *pf;
- struct pcmcia_config_entry *cfe;
+ const char *cis1_info[4];
+ const struct pcmcia_function *pf;
+ const struct pcmcia_config_entry *cfe;
};
struct pcmcia_attach_args {
diff --git a/sys/dev/scsipi/atapiconf.c b/sys/dev/scsipi/atapiconf.c
index f1b568549e4..be0f3fc6113 100644
--- a/sys/dev/scsipi/atapiconf.c
+++ b/sys/dev/scsipi/atapiconf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: atapiconf.c,v 1.35 2000/04/02 23:38:19 augustss Exp $ */
+/* $NetBSD: atapiconf.c,v 1.36 2001/01/18 20:28:21 jdolecek Exp $ */
/*
* Copyright (c) 1996 Manuel Bouyer. All rights reserved.
@@ -65,7 +65,7 @@ extern struct cfdriver atapibus_cd;
int atapibusprint __P((void *, const char *));
-struct scsi_quirk_inquiry_pattern atapi_quirk_patterns[] = {
+const struct scsi_quirk_inquiry_pattern atapi_quirk_patterns[] = {
{{T_CDROM, T_REMOV,
"ALPS ELECTRIC CO.,LTD. DC544C", "", "SW03D"}, ADEV_NOTUR},
{{T_CDROM, T_REMOV,
diff --git a/sys/dev/scsipi/scsiconf.c b/sys/dev/scsipi/scsiconf.c
index a9682c810af..b98f6b7cacb 100644
--- a/sys/dev/scsipi/scsiconf.c
+++ b/sys/dev/scsipi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: scsiconf.c,v 1.153 2000/12/03 13:30:36 ad Exp $ */
+/* $NetBSD: scsiconf.c,v 1.154 2001/01/18 20:28:21 jdolecek Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -450,7 +450,7 @@ scsibusprint(aux, pnp)
return (UNCONF);
}
-struct scsi_quirk_inquiry_pattern scsi_quirk_patterns[] = {
+const struct scsi_quirk_inquiry_pattern scsi_quirk_patterns[] = {
{{T_CDROM, T_REMOV,
"CHINON ", "CD-ROM CDS-431 ", ""}, SDEV_NOLUNS},
{{T_CDROM, T_REMOV,
diff --git a/sys/dev/scsipi/st.c b/sys/dev/scsipi/st.c
index 43c106cdbde..1e4970694da 100644
--- a/sys/dev/scsipi/st.c
+++ b/sys/dev/scsipi/st.c
@@ -1,4 +1,4 @@
-/* $NetBSD: st.c,v 1.133 2000/11/22 00:32:24 soren Exp $ */
+/* $NetBSD: st.c,v 1.134 2001/01/18 20:28:21 jdolecek Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -135,7 +135,7 @@ struct st_quirk_inquiry_pattern {
struct quirkdata quirkdata;
};
-struct st_quirk_inquiry_pattern st_quirk_patterns[] = {
+const struct st_quirk_inquiry_pattern st_quirk_patterns[] = {
{{T_SEQUENTIAL, T_REMOV,
" ", " ", " "}, {0, 0, {
{ST_Q_FORCE_BLKSIZE, 512, 0}, /* minor 0-3 */
diff --git a/sys/dev/usb/devlist2h.awk b/sys/dev/usb/devlist2h.awk
index 49ef274e983..d2613f294a6 100644
--- a/sys/dev/usb/devlist2h.awk
+++ b/sys/dev/usb/devlist2h.awk
@@ -1,5 +1,5 @@
#! /usr/bin/awk -f
-# $NetBSD: devlist2h.awk,v 1.8 1999/11/18 23:32:25 augustss Exp $
+# $NetBSD: devlist2h.awk,v 1.9 2001/01/18 20:28:22 jdolecek Exp $
#
# Copyright (c) 1995, 1996 Christopher G. Demetriou
# All rights reserved.
@@ -174,7 +174,7 @@ END {
printf("\n") > dfile
- printf("struct usb_knowndev usb_knowndevs[] = {\n") > dfile
+ printf("const struct usb_knowndev usb_knowndevs[] = {\n") > dfile
for (i = 1; i <= nproducts; i++) {
printf("\t{\n") > dfile
printf("\t USB_VENDOR_%s, USB_PRODUCT_%s_%s,\n",
diff --git a/sys/dev/usb/ezload.c b/sys/dev/usb/ezload.c
index fa321adcd56..cd528276dea 100644
--- a/sys/dev/usb/ezload.c
+++ b/sys/dev/usb/ezload.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ezload.c,v 1.1 2001/01/02 18:49:56 augustss Exp $ */
+/* $NetBSD: ezload.c,v 1.2 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -106,10 +106,10 @@ ezload_reset(usbd_device_handle dev, int reset)
}
usbd_status
-ezload_download(usbd_device_handle dev, struct ezdata *rec)
+ezload_download(usbd_device_handle dev, const struct ezdata *rec)
{
usb_device_request_t req;
- struct ezdata *ptr;
+ const struct ezdata *ptr;
usbd_status err;
u_int len, offs;
@@ -145,7 +145,7 @@ ezload_download(usbd_device_handle dev, struct ezdata *rec)
}
usbd_status
-ezload_downloads_and_reset(usbd_device_handle dev, struct ezdata **recs)
+ezload_downloads_and_reset(usbd_device_handle dev, const struct ezdata **recs)
{
usbd_status err;
diff --git a/sys/dev/usb/ezload.h b/sys/dev/usb/ezload.h
index 48e772cbe29..ccd17e20873 100644
--- a/sys/dev/usb/ezload.h
+++ b/sys/dev/usb/ezload.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ezload.h,v 1.1 2001/01/02 22:24:00 augustss Exp $ */
+/* $NetBSD: ezload.h,v 1.2 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -43,5 +43,5 @@ struct ezdata {
};
usbd_status ezload_reset(usbd_device_handle, int);
-usbd_status ezload_download(usbd_device_handle, struct ezdata *);
-usbd_status ezload_downloads_and_reset(usbd_device_handle, struct ezdata **);
+usbd_status ezload_download(usbd_device_handle, const struct ezdata *);
+usbd_status ezload_downloads_and_reset(usbd_device_handle, const struct ezdata **);
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index bc9ceeeda78..e4e4ce4971a 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_aue.c,v 1.50 2000/12/14 07:51:36 thorpej Exp $ */
+/* $NetBSD: if_aue.c,v 1.51 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@@ -184,7 +184,7 @@ struct aue_type {
char aue_linksys;
};
-Static struct aue_type aue_devs[] = {
+Static const struct aue_type aue_devs[] = {
{ USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USB100, 0 },
{ USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX1, 0 },
{ USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX5, 0 },
@@ -204,7 +204,7 @@ Static struct aue_type aue_devs[] = {
USB_DECLARE_DRIVER(aue);
-Static struct aue_type *aue_lookup(u_int16_t vendor, u_int16_t product);
+Static const struct aue_type *aue_lookup(u_int16_t vendor, u_int16_t product);
Static int aue_tx_list_init(struct aue_softc *);
Static int aue_rx_list_init(struct aue_softc *);
Static int aue_newbuf(struct aue_softc *, struct aue_chain *, struct mbuf *);
@@ -254,7 +254,7 @@ Static void aue_rxstart(struct ifnet *);
Static struct usb_qdat aue_qdat;
-Static device_method_t aue_methods[] = {
+Static const device_method_t aue_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, aue_match),
DEVMETHOD(device_attach, aue_attach),
@@ -701,10 +701,10 @@ aue_reset(struct aue_softc *sc)
delay(10000); /* XXX */
}
-Static struct aue_type *
+Static const struct aue_type *
aue_lookup(u_int16_t vendor, u_int16_t product)
{
- struct aue_type *t;
+ const struct aue_type *t;
for (t = aue_devs; t->aue_vid != 0; t++)
if (vendor == t->aue_vid && product == t->aue_did)
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 5185c4bd144..e4f9606cd8d 100644
--- a/sys/dev/usb/if_kue.c
+++ b/sys/dev/usb/if_kue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_kue.c,v 1.34 2000/12/14 07:51:36 thorpej Exp $ */
+/* $NetBSD: if_kue.c,v 1.35 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@@ -172,7 +172,7 @@ int kuedebug = 0;
/*
* Various supported device vendors/products.
*/
-Static struct kue_type kue_devs[] = {
+Static const struct kue_type kue_devs[] = {
{ USB_VENDOR_AOX, USB_PRODUCT_AOX_USB101 },
{ USB_VENDOR_ADS, USB_PRODUCT_ADS_UBS10BT },
{ USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC10T },
@@ -210,7 +210,7 @@ Static void kue_setmulti(struct kue_softc *);
Static void kue_reset(struct kue_softc *);
Static usbd_status kue_ctl(struct kue_softc *, int, u_int8_t,
- u_int16_t, void *, u_int32_t);
+ u_int16_t, const void *, u_int32_t);
Static usbd_status kue_setword(struct kue_softc *, u_int8_t, u_int16_t);
Static int kue_is_warm(struct kue_softc *);
Static int kue_load_fw(struct kue_softc *);
@@ -226,7 +226,7 @@ Static void kue_shutdown(device_t);
Static struct usb_qdat kue_qdat;
-Static device_method_t kue_methods[] = {
+Static const device_method_t kue_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, kue_match),
DEVMETHOD(device_attach, kue_attach),
@@ -275,7 +275,7 @@ kue_setword(struct kue_softc *sc, u_int8_t breq, u_int16_t word)
Static usbd_status
kue_ctl(struct kue_softc *sc, int rw, u_int8_t breq, u_int16_t val,
- void *data, u_int32_t len)
+ const void *data, u_int32_t len)
{
usb_device_request_t req;
usbd_status err;
@@ -295,7 +295,7 @@ kue_ctl(struct kue_softc *sc, int rw, u_int8_t breq, u_int16_t val,
USETW(req.wLength, len);
s = splusb();
- err = KUE_DO_REQUEST(sc->kue_udev, &req, data);
+ err = KUE_DO_REQUEST(sc->kue_udev, &req, (void *)data);
splx(s);
return (err);
@@ -499,7 +499,7 @@ kue_reset(struct kue_softc *sc)
USB_MATCH(kue)
{
USB_MATCH_START(kue, uaa);
- struct kue_type *t;
+ const struct kue_type *t;
DPRINTFN(25,("kue_match: enter\n"));
diff --git a/sys/dev/usb/usb_quirks.c b/sys/dev/usb/usb_quirks.c
index a0e5ccf158c..c6054f2666e 100644
--- a/sys/dev/usb/usb_quirks.c
+++ b/sys/dev/usb/usb_quirks.c
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_quirks.c,v 1.35 2001/01/11 20:35:02 explorer Exp $ */
+/* $NetBSD: usb_quirks.c,v 1.36 2001/01/18 20:28:23 jdolecek Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.13 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@@ -50,7 +50,7 @@
extern int usbdebug;
#endif
-Static struct usbd_quirk_entry {
+Static const struct usbd_quirk_entry {
u_int16_t idVendor;
u_int16_t idProduct;
u_int16_t bcdDevice;
@@ -82,12 +82,12 @@ Static struct usbd_quirk_entry {
{ 0, 0, 0, { 0 } }
};
-struct usbd_quirks usbd_no_quirk = { 0 };
+const struct usbd_quirks usbd_no_quirk = { 0 };
-struct usbd_quirks *
+const struct usbd_quirks *
usbd_find_quirk(usb_device_descriptor_t *d)
{
- struct usbd_quirk_entry *t;
+ const struct usbd_quirk_entry *t;
for (t = usb_quirks; t->idVendor != 0; t++) {
if (t->idVendor == UGETW(d->idVendor) &&
diff --git a/sys/dev/usb/usb_quirks.h b/sys/dev/usb/usb_quirks.h
index 6d16561a7cc..5ddcfc51024 100644
--- a/sys/dev/usb/usb_quirks.h
+++ b/sys/dev/usb/usb_quirks.h
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_quirks.h,v 1.18 2001/01/11 20:35:02 explorer Exp $ */
+/* $NetBSD: usb_quirks.h,v 1.19 2001/01/18 20:28:23 jdolecek Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_quirks.h,v 1.9 1999/11/12 23:31:03 n_hibma Exp $ */
/*
@@ -55,6 +55,6 @@ struct usbd_quirks {
#define UQ_ASSUME_CM_OVER_DATA 0x1000 /* modem device breaks on cm over data */
};
-extern struct usbd_quirks usbd_no_quirk;
+extern const struct usbd_quirks usbd_no_quirk;
-struct usbd_quirks *usbd_find_quirk(usb_device_descriptor_t *);
+const struct usbd_quirks *usbd_find_quirk(usb_device_descriptor_t *);
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index bdaaa6f2911..db063f0c3c4 100644
--- a/sys/dev/usb/usb_subr.c
+++ b/sys/dev/usb/usb_subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_subr.c,v 1.83 2001/01/08 20:21:16 augustss Exp $ */
+/* $NetBSD: usb_subr.c,v 1.84 2001/01/18 20:28:22 jdolecek Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@@ -111,7 +111,7 @@ struct usb_knowndev {
#include <dev/usb/usbdevs_data.h>
#endif /* USBVERBOSE */
-Static const char *usbd_error_strs[] = {
+Static const char * const usbd_error_strs[] = {
"NORMAL_COMPLETION",
"IN_PROGRESS",
"PENDING_REQUESTS",
@@ -227,7 +227,7 @@ usbd_devinfo_vp(usbd_device_handle dev, char *v, char *p, int usedev)
usb_device_descriptor_t *udd = &dev->ddesc;
char *vendor = 0, *product = 0;
#ifdef USBVERBOSE
- struct usb_knowndev *kdp;
+ const struct usb_knowndev *kdp;
#endif
if (dev == NULL) {
diff --git a/sys/dev/usb/usbdevs_data.h b/sys/dev/usb/usbdevs_data.h
index 0c6f1247460..83143fcf236 100644
--- a/sys/dev/usb/usbdevs_data.h
+++ b/sys/dev/usb/usbdevs_data.h
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdevs_data.h,v 1.141 2001/01/15 20:26:46 tshiozak Exp $ */
+/* $NetBSD: usbdevs_data.h,v 1.142 2001/01/18 20:28:22 jdolecek Exp $ */
/*
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
@@ -44,7 +44,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-struct usb_knowndev usb_knowndevs[] = {
+const struct usb_knowndev usb_knowndevs[] = {
{
USB_VENDOR_3COM, USB_PRODUCT_3COM_HOMECONN,
0,
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index 542faa06b39..e4884dc2d8a 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.h,v 1.45 2000/12/13 04:05:15 augustss Exp $ */
+/* $NetBSD: usbdi.h,v 1.46 2001/01/18 20:28:23 jdolecek Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */
/*
@@ -170,7 +170,7 @@ void usbd_add_dev_event(int, usbd_device_handle);
void usbd_add_drv_event(int, usbd_device_handle, device_ptr_t);
void usbd_devinfo(usbd_device_handle, int, char *);
-struct usbd_quirks *usbd_get_quirks(usbd_device_handle);
+const struct usbd_quirks *usbd_get_quirks(usbd_device_handle);
usb_endpoint_descriptor_t *usbd_get_endpoint_descriptor
(usbd_interface_handle iface, u_int8_t address);
diff --git a/sys/dev/usb/usbdivar.h b/sys/dev/usb/usbdivar.h
index b6ee5f360af..bcb7898944c 100644
--- a/sys/dev/usb/usbdivar.h
+++ b/sys/dev/usb/usbdivar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdivar.h,v 1.60 2000/12/28 10:40:36 augustss Exp $ */
+/* $NetBSD: usbdivar.h,v 1.61 2001/01/18 20:28:23 jdolecek Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdivar.h,v 1.11 1999/11/17 22:33:51 n_hibma Exp $ */
/*
@@ -139,7 +139,7 @@ struct usbd_device {
struct usbd_interface *ifaces; /* array of all interfaces */
usb_device_descriptor_t ddesc; /* device descriptor */
usb_config_descriptor_t *cdesc; /* full config descr */
- struct usbd_quirks *quirks; /* device quirks, always set */
+ const struct usbd_quirks *quirks; /* device quirks, always set */
struct usbd_hub *hub; /* only if this is a hub */
device_ptr_t *subdevs; /* sub-devices, 0 terminated */
};
diff --git a/sys/dev/usb/uyap.c b/sys/dev/usb/uyap.c
index cec612d1c9a..205192524b0 100644
--- a/sys/dev/usb/uyap.c
+++ b/sys/dev/usb/uyap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uyap.c,v 1.2 2001/01/02 23:08:54 augustss Exp $ */
+/* $NetBSD: uyap.c,v 1.3 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -49,10 +49,10 @@
#include <dev/usb/ezload.h>
-struct ezdata uyap_firmware[] = {
+const struct ezdata uyap_firmware[] = {
#include "dev/usb/uyap_firmware.h"
};
-struct ezdata *uyap_firmwares[] = { uyap_firmware, NULL };
+const struct ezdata *uyap_firmwares[] = { uyap_firmware, NULL };
struct uyap_softc {
USBBASEDEVICE sc_dev; /* base device */
diff --git a/sys/dev/wscons/wsemul_vt100_chars.c b/sys/dev/wscons/wsemul_vt100_chars.c
index edf0644d279..cb9df5223fa 100644
--- a/sys/dev/wscons/wsemul_vt100_chars.c
+++ b/sys/dev/wscons/wsemul_vt100_chars.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100_chars.c,v 1.4 1999/02/20 18:20:02 drochner Exp $ */
+/* $NetBSD: wsemul_vt100_chars.c,v 1.5 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 1998
@@ -40,7 +40,7 @@
#include <dev/wscons/wsemul_vt100var.h>
#include <dev/wscons/unicode.h>
-static u_int16_t decspcgr2uni[128] = {
+static const u_int16_t decspcgr2uni[128] = {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
@@ -59,7 +59,7 @@ static u_int16_t decspcgr2uni[128] = {
0x2502, 0x2264, 0x2265, 0x03c0, 0x2260, 0x00a3, 0x00b7, 0x007f,
};
-static u_int16_t dectech2uni[128] = {
+static const u_int16_t dectech2uni[128] = {
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
@@ -96,11 +96,11 @@ vt100_initchartables(edp)
vt100_setnrc(edp, 0);
}
-static int nrcovlpos[12] = {
+static const int nrcovlpos[12] = {
0x23, 0x40, 0x5b, 0x5c, 0x5d, 0x5e, /* #@[\]^ */
0x5f, 0x60, 0x7b, 0x7c, 0x7d, 0x7e /* _`{|}~ */
};
-static struct {
+static const struct {
u_int16_t c[12];
} nrctable[] = {
/* british */
diff --git a/sys/isofs/cd9660/cd9660_rrip.c b/sys/isofs/cd9660/cd9660_rrip.c
index 7f06dbff586..88e1d424dbd 100644
--- a/sys/isofs/cd9660/cd9660_rrip.c
+++ b/sys/isofs/cd9660/cd9660_rrip.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_rrip.c,v 1.21 2000/05/27 16:03:56 jdolecek Exp $ */
+/* $NetBSD: cd9660_rrip.c,v 1.22 2001/01/18 20:28:24 jdolecek Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -81,7 +81,7 @@ static int cd9660_rrip_cont __P((void *, ISO_RRIP_ANALYZE *));
static int cd9660_rrip_stop __P((void *, ISO_RRIP_ANALYZE *));
static int cd9660_rrip_extref __P((void *, ISO_RRIP_ANALYZE *));
static int cd9660_rrip_loop __P((struct iso_directory_record *,
- ISO_RRIP_ANALYZE *, RRIP_TABLE *));
+ ISO_RRIP_ANALYZE *, const RRIP_TABLE *));
/*
* POSIX file attribute
*/
@@ -513,9 +513,9 @@ static int
cd9660_rrip_loop(isodir, ana, table)
struct iso_directory_record *isodir;
ISO_RRIP_ANALYZE *ana;
- RRIP_TABLE *table;
+ const RRIP_TABLE *table;
{
- RRIP_TABLE *ptable;
+ const RRIP_TABLE *ptable;
ISO_SUSP_HEADER *phead;
ISO_SUSP_HEADER *pend;
struct buf *bp = NULL;
@@ -602,7 +602,7 @@ cd9660_rrip_loop(isodir, ana, table)
/*
* Get Attributes.
*/
-static RRIP_TABLE rrip_table_analyze[] = {
+static const RRIP_TABLE rrip_table_analyze[] = {
{ "PX", cd9660_rrip_attr, cd9660_rrip_defattr, ISO_SUSP_ATTR },
{ "TF", cd9660_rrip_tstamp, cd9660_rrip_deftstamp, ISO_SUSP_TSTAMP },
{ "PN", cd9660_rrip_device, 0, ISO_SUSP_DEVICE },
@@ -630,7 +630,7 @@ cd9660_rrip_analyze(isodir, inop, imp)
/*
* Get Alternate Name.
*/
-static RRIP_TABLE rrip_table_getname[] = {
+static const RRIP_TABLE rrip_table_getname[] = {
{ "NM", cd9660_rrip_altname, cd9660_rrip_defname, ISO_SUSP_ALTNAME },
{ "CL", cd9660_rrip_pclink, 0, ISO_SUSP_CLINK|ISO_SUSP_PLINK },
{ "PL", cd9660_rrip_pclink, 0, ISO_SUSP_CLINK|ISO_SUSP_PLINK },
@@ -650,7 +650,7 @@ cd9660_rrip_getname(isodir, outbuf, outlen, inump, imp)
struct iso_mnt *imp;
{
ISO_RRIP_ANALYZE analyze;
- RRIP_TABLE *tab;
+ const RRIP_TABLE *tab;
u_char c;
analyze.outbuf = outbuf;
@@ -677,7 +677,7 @@ cd9660_rrip_getname(isodir, outbuf, outlen, inump, imp)
/*
* Get Symbolic Link.
*/
-static RRIP_TABLE rrip_table_getsymname[] = {
+static const RRIP_TABLE rrip_table_getsymname[] = {
{ "SL", cd9660_rrip_slink, 0, ISO_SUSP_SLINK },
{ "RR", cd9660_rrip_idflag, 0, ISO_SUSP_IDFLAG },
{ "CE", cd9660_rrip_cont, 0, ISO_SUSP_CONT },
@@ -705,7 +705,7 @@ cd9660_rrip_getsymname(isodir, outbuf, outlen, imp)
return cd9660_rrip_loop(isodir, &analyze, rrip_table_getsymname) & ISO_SUSP_SLINK;
}
-static RRIP_TABLE rrip_table_extref[] = {
+static const RRIP_TABLE rrip_table_extref[] = {
{ "ER", cd9660_rrip_extref, 0, ISO_SUSP_EXTREF },
{ "CE", cd9660_rrip_cont, 0, ISO_SUSP_CONT },
{ "ST", cd9660_rrip_stop, 0, ISO_SUSP_STOP },
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 4893696946b..d05c3213b84 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_malloc.c,v 1.56 2001/01/14 02:08:35 thorpej Exp $ */
+/* $NetBSD: kern_malloc.c,v 1.57 2001/01/18 20:28:18 jdolecek Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@@ -85,7 +85,7 @@ struct kmembuckets bucket[MINBUCKET + 16];
struct kmemstats kmemstats[M_LAST];
struct kmemusage *kmemusage;
char *kmembase, *kmemlimit;
-const char *memname[] = INITKMEMNAMES;
+const char * const memname[] = INITKMEMNAMES;
#ifdef MALLOCLOG
#ifndef MALLOCLOGSIZE
@@ -159,7 +159,7 @@ hitmlog(a)
/*
* This structure provides a set of masks to catch unaligned frees.
*/
-long addrmask[] = { 0,
+const long addrmask[] = { 0,
0x00000001, 0x00000003, 0x00000007, 0x0000000f,
0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff,
0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff,
diff --git a/sys/kern/tty_tb.c b/sys/kern/tty_tb.c
index 0887c4919a3..6767cb0d0fd 100644
--- a/sys/kern/tty_tb.c
+++ b/sys/kern/tty_tb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tty_tb.c,v 1.24 2000/11/02 06:57:01 enami Exp $ */
+/* $NetBSD: tty_tb.c,v 1.25 2001/01/18 20:28:18 jdolecek Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@@ -64,7 +64,7 @@ struct tbconf {
short tbc_uiosize; /* size of data record returned user */
int tbc_sync; /* mask for finding sync byte/bit */
/* decoding routine */
- void (*tbc_decode) __P((struct tbconf *, char *, union tbpos *));
+ void (*tbc_decode) __P((const struct tbconf *, char *, union tbpos *));
u_char *tbc_run; /* enter run mode sequence */
u_char *tbc_point; /* enter point mode sequence */
u_char *tbc_stop; /* stop sequence */
@@ -74,14 +74,14 @@ struct tbconf {
#define TBF_INPROX 0x2 /* tablet has proximity info */
};
-static void gtcodecode __P((struct tbconf *, char *, union tbpos *));
-static void tbolddecode __P((struct tbconf *, char *, union tbpos *));
-static void tblresdecode __P((struct tbconf *, char *, union tbpos *));
-static void tbhresdecode __P((struct tbconf *, char *, union tbpos *));
-static void poldecode __P((struct tbconf *, char *, union tbpos *));
+static void gtcodecode __P((const struct tbconf *, char *, union tbpos *));
+static void tbolddecode __P((const struct tbconf *, char *, union tbpos *));
+static void tblresdecode __P((const struct tbconf *, char *, union tbpos *));
+static void tbhresdecode __P((const struct tbconf *, char *, union tbpos *));
+static void poldecode __P((const struct tbconf *, char *, union tbpos *));
-struct tbconf tbconf[TBTYPE] = {
+static const struct tbconf tbconf[TBTYPE] = {
{ 0 },
{ 5, sizeof(struct hitpos), 0200, tbolddecode, "6", "4" },
{ 5, sizeof(struct hitpos), 0200, tbolddecode, "\1CN", "\1RT", "\2", "\4" },
@@ -166,7 +166,7 @@ tbread(tp, uio)
struct uio *uio;
{
struct tb *tbp = (struct tb *)tp->t_sc;
- struct tbconf *tc = &tbconf[tbp->tbflags & TBTYPE];
+ const struct tbconf *tc = &tbconf[tbp->tbflags & TBTYPE];
int ret;
if ((tp->t_state&TS_CARR_ON) == 0)
@@ -191,7 +191,7 @@ tbinput(c, tp)
struct tty *tp;
{
struct tb *tbp = (struct tb *)tp->t_sc;
- struct tbconf *tc = &tbconf[tbp->tbflags & TBTYPE];
+ const struct tbconf *tc = &tbconf[tbp->tbflags & TBTYPE];
if (tc->tbc_recsize == 0 || tc->tbc_decode == 0) /* paranoid? */
return;
@@ -215,7 +215,7 @@ tbinput(c, tp)
*/
static void
gtcodecode(tc, cp, u)
- struct tbconf *tc;
+ const struct tbconf *tc;
char *cp;
union tbpos *u;
{
@@ -238,7 +238,7 @@ gtcodecode(tc, cp, u)
*/
static void
tbolddecode(tc, cp, u)
- struct tbconf *tc;
+ const struct tbconf *tc;
char *cp;
union tbpos *u;
{
@@ -264,7 +264,7 @@ tbolddecode(tc, cp, u)
*/
static void
tblresdecode(tc, cp, u)
- struct tbconf *tc;
+ const struct tbconf *tc;
char *cp;
union tbpos *u;
{
@@ -286,7 +286,7 @@ tblresdecode(tc, cp, u)
*/
static void
tbhresdecode(tc, cp, u)
- struct tbconf *tc;
+ const struct tbconf *tc;
char *cp;
union tbpos *u;
{
@@ -311,7 +311,7 @@ tbhresdecode(tc, cp, u)
*/
static void
poldecode(tc, cp, u)
- struct tbconf *tc;
+ const struct tbconf *tc;
char *cp;
union tbpos *u;
{
@@ -354,7 +354,7 @@ tbtioctl(tp, cmd, data, flag, p)
/* fall thru... to set mode bits */
case BIOSMODE: {
- struct tbconf *tc;
+ const struct tbconf *tc;
u_char *c;
tbp->tbflags &= ~TBMODE;
diff --git a/sys/kern/vnode_if.c b/sys/kern/vnode_if.c
index 1908775a54e..61e45c0d2e3 100644
--- a/sys/kern/vnode_if.c
+++ b/sys/kern/vnode_if.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vnode_if.c,v 1.30 2000/12/22 20:07:09 fvdl Exp $ */
+/* $NetBSD: vnode_if.c,v 1.31 2001/01/18 20:28:19 jdolecek Exp $ */
/*
* Warning: This file is generated automatically.
@@ -58,7 +58,7 @@
#include <sys/buf.h>
#include <sys/vnode.h>
-struct vnodeop_desc vop_default_desc = {
+const struct vnodeop_desc vop_default_desc = {
0,
"default",
0,
@@ -71,11 +71,11 @@ struct vnodeop_desc vop_default_desc = {
};
-int vop_lookup_vp_offsets[] = {
+const int vop_lookup_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_lookup_args,a_dvp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_lookup_desc = {
+const struct vnodeop_desc vop_lookup_desc = {
0,
"vop_lookup",
0,
@@ -102,11 +102,11 @@ VOP_LOOKUP(dvp, vpp, cnp)
}
#endif
-int vop_create_vp_offsets[] = {
+const int vop_create_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_create_args,a_dvp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_create_desc = {
+const struct vnodeop_desc vop_create_desc = {
0,
"vop_create",
0 | VDESC_VP0_WILLPUT,
@@ -135,11 +135,11 @@ VOP_CREATE(dvp, vpp, cnp, vap)
}
#endif
-int vop_mknod_vp_offsets[] = {
+const int vop_mknod_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_mknod_args,a_dvp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_mknod_desc = {
+const struct vnodeop_desc vop_mknod_desc = {
0,
"vop_mknod",
0 | VDESC_VP0_WILLPUT | VDESC_VPP_WILLRELE,
@@ -168,11 +168,11 @@ VOP_MKNOD(dvp, vpp, cnp, vap)
}
#endif
-int vop_open_vp_offsets[] = {
+const int vop_open_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_open_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_open_desc = {
+const struct vnodeop_desc vop_open_desc = {
0,
"vop_open",
0,
@@ -201,11 +201,11 @@ VOP_OPEN(vp, mode, cred, p)
}
#endif
-int vop_close_vp_offsets[] = {
+const int vop_close_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_close_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_close_desc = {
+const struct vnodeop_desc vop_close_desc = {
0,
"vop_close",
0,
@@ -234,11 +234,11 @@ VOP_CLOSE(vp, fflag, cred, p)
}
#endif
-int vop_access_vp_offsets[] = {
+const int vop_access_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_access_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_access_desc = {
+const struct vnodeop_desc vop_access_desc = {
0,
"vop_access",
0,
@@ -267,11 +267,11 @@ VOP_ACCESS(vp, mode, cred, p)
}
#endif
-int vop_getattr_vp_offsets[] = {
+const int vop_getattr_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_getattr_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_getattr_desc = {
+const struct vnodeop_desc vop_getattr_desc = {
0,
"vop_getattr",
0,
@@ -300,11 +300,11 @@ VOP_GETATTR(vp, vap, cred, p)
}
#endif
-int vop_setattr_vp_offsets[] = {
+const int vop_setattr_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_setattr_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_setattr_desc = {
+const struct vnodeop_desc vop_setattr_desc = {
0,
"vop_setattr",
0,
@@ -333,11 +333,11 @@ VOP_SETATTR(vp, vap, cred, p)
}
#endif
-int vop_read_vp_offsets[] = {
+const int vop_read_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_read_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_read_desc = {
+const struct vnodeop_desc vop_read_desc = {
0,
"vop_read",
0,
@@ -366,11 +366,11 @@ VOP_READ(vp, uio, ioflag, cred)
}
#endif
-int vop_write_vp_offsets[] = {
+const int vop_write_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_write_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_write_desc = {
+const struct vnodeop_desc vop_write_desc = {
0,
"vop_write",
0,
@@ -399,11 +399,11 @@ VOP_WRITE(vp, uio, ioflag, cred)
}
#endif
-int vop_ioctl_vp_offsets[] = {
+const int vop_ioctl_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_ioctl_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_ioctl_desc = {
+const struct vnodeop_desc vop_ioctl_desc = {
0,
"vop_ioctl",
0,
@@ -436,11 +436,11 @@ VOP_IOCTL(vp, command, data, fflag, cred, p)
}
#endif
-int vop_fcntl_vp_offsets[] = {
+const int vop_fcntl_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_fcntl_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_fcntl_desc = {
+const struct vnodeop_desc vop_fcntl_desc = {
0,
"vop_fcntl",
0,
@@ -473,11 +473,11 @@ VOP_FCNTL(vp, command, data, fflag, cred, p)
}
#endif
-int vop_poll_vp_offsets[] = {
+const int vop_poll_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_poll_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_poll_desc = {
+const struct vnodeop_desc vop_poll_desc = {
0,
"vop_poll",
0,
@@ -504,11 +504,11 @@ VOP_POLL(vp, events, p)
}
#endif
-int vop_revoke_vp_offsets[] = {
+const int vop_revoke_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_revoke_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_revoke_desc = {
+const struct vnodeop_desc vop_revoke_desc = {
0,
"vop_revoke",
0,
@@ -533,11 +533,11 @@ VOP_REVOKE(vp, flags)
}
#endif
-int vop_mmap_vp_offsets[] = {
+const int vop_mmap_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_mmap_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_mmap_desc = {
+const struct vnodeop_desc vop_mmap_desc = {
0,
"vop_mmap",
0,
@@ -566,11 +566,11 @@ VOP_MMAP(vp, fflags, cred, p)
}
#endif
-int vop_fsync_vp_offsets[] = {
+const int vop_fsync_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_fsync_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_fsync_desc = {
+const struct vnodeop_desc vop_fsync_desc = {
0,
"vop_fsync",
0,
@@ -603,11 +603,11 @@ VOP_FSYNC(vp, cred, flags, offlo, offhi, p)
}
#endif
-int vop_seek_vp_offsets[] = {
+const int vop_seek_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_seek_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_seek_desc = {
+const struct vnodeop_desc vop_seek_desc = {
0,
"vop_seek",
0,
@@ -636,12 +636,12 @@ VOP_SEEK(vp, oldoff, newoff, cred)
}
#endif
-int vop_remove_vp_offsets[] = {
+const int vop_remove_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_remove_args,a_dvp),
VOPARG_OFFSETOF(struct vop_remove_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_remove_desc = {
+const struct vnodeop_desc vop_remove_desc = {
0,
"vop_remove",
0 | VDESC_VP0_WILLPUT | VDESC_VP1_WILLPUT,
@@ -668,12 +668,12 @@ VOP_REMOVE(dvp, vp, cnp)
}
#endif
-int vop_link_vp_offsets[] = {
+const int vop_link_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_link_args,a_dvp),
VOPARG_OFFSETOF(struct vop_link_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_link_desc = {
+const struct vnodeop_desc vop_link_desc = {
0,
"vop_link",
0 | VDESC_VP0_WILLPUT,
@@ -700,14 +700,14 @@ VOP_LINK(dvp, vp, cnp)
}
#endif
-int vop_rename_vp_offsets[] = {
+const int vop_rename_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_rename_args,a_fdvp),
VOPARG_OFFSETOF(struct vop_rename_args,a_fvp),
VOPARG_OFFSETOF(struct vop_rename_args,a_tdvp),
VOPARG_OFFSETOF(struct vop_rename_args,a_tvp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_rename_desc = {
+const struct vnodeop_desc vop_rename_desc = {
0,
"vop_rename",
0 | VDESC_VP0_WILLRELE | VDESC_VP1_WILLRELE | VDESC_VP2_WILLPUT | VDESC_VP3_WILLRELE,
@@ -740,11 +740,11 @@ VOP_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp)
}
#endif
-int vop_mkdir_vp_offsets[] = {
+const int vop_mkdir_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_mkdir_args,a_dvp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_mkdir_desc = {
+const struct vnodeop_desc vop_mkdir_desc = {
0,
"vop_mkdir",
0 | VDESC_VP0_WILLPUT,
@@ -773,12 +773,12 @@ VOP_MKDIR(dvp, vpp, cnp, vap)
}
#endif
-int vop_rmdir_vp_offsets[] = {
+const int vop_rmdir_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_rmdir_args,a_dvp),
VOPARG_OFFSETOF(struct vop_rmdir_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_rmdir_desc = {
+const struct vnodeop_desc vop_rmdir_desc = {
0,
"vop_rmdir",
0 | VDESC_VP0_WILLPUT | VDESC_VP1_WILLPUT,
@@ -805,11 +805,11 @@ VOP_RMDIR(dvp, vp, cnp)
}
#endif
-int vop_symlink_vp_offsets[] = {
+const int vop_symlink_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_symlink_args,a_dvp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_symlink_desc = {
+const struct vnodeop_desc vop_symlink_desc = {
0,
"vop_symlink",
0 | VDESC_VP0_WILLPUT | VDESC_VPP_WILLRELE,
@@ -840,11 +840,11 @@ VOP_SYMLINK(dvp, vpp, cnp, vap, target)
}
#endif
-int vop_readdir_vp_offsets[] = {
+const int vop_readdir_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_readdir_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_readdir_desc = {
+const struct vnodeop_desc vop_readdir_desc = {
0,
"vop_readdir",
0,
@@ -877,11 +877,11 @@ VOP_READDIR(vp, uio, cred, eofflag, cookies, ncookies)
}
#endif
-int vop_readlink_vp_offsets[] = {
+const int vop_readlink_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_readlink_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_readlink_desc = {
+const struct vnodeop_desc vop_readlink_desc = {
0,
"vop_readlink",
0,
@@ -908,11 +908,11 @@ VOP_READLINK(vp, uio, cred)
}
#endif
-int vop_abortop_vp_offsets[] = {
+const int vop_abortop_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_abortop_args,a_dvp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_abortop_desc = {
+const struct vnodeop_desc vop_abortop_desc = {
0,
"vop_abortop",
0,
@@ -937,11 +937,11 @@ VOP_ABORTOP(dvp, cnp)
}
#endif
-int vop_inactive_vp_offsets[] = {
+const int vop_inactive_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_inactive_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_inactive_desc = {
+const struct vnodeop_desc vop_inactive_desc = {
0,
"vop_inactive",
0 | VDESC_VP0_WILLUNLOCK,
@@ -966,11 +966,11 @@ VOP_INACTIVE(vp, p)
}
#endif
-int vop_reclaim_vp_offsets[] = {
+const int vop_reclaim_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_reclaim_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_reclaim_desc = {
+const struct vnodeop_desc vop_reclaim_desc = {
0,
"vop_reclaim",
0,
@@ -995,11 +995,11 @@ VOP_RECLAIM(vp, p)
}
#endif
-int vop_lock_vp_offsets[] = {
+const int vop_lock_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_lock_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_lock_desc = {
+const struct vnodeop_desc vop_lock_desc = {
0,
"vop_lock",
0,
@@ -1024,11 +1024,11 @@ VOP_LOCK(vp, flags)
}
#endif
-int vop_unlock_vp_offsets[] = {
+const int vop_unlock_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_unlock_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_unlock_desc = {
+const struct vnodeop_desc vop_unlock_desc = {
0,
"vop_unlock",
0,
@@ -1053,11 +1053,11 @@ VOP_UNLOCK(vp, flags)
}
#endif
-int vop_bmap_vp_offsets[] = {
+const int vop_bmap_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_bmap_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_bmap_desc = {
+const struct vnodeop_desc vop_bmap_desc = {
0,
"vop_bmap",
0,
@@ -1088,11 +1088,11 @@ VOP_BMAP(vp, bn, vpp, bnp, runp)
}
#endif
-int vop_print_vp_offsets[] = {
+const int vop_print_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_print_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_print_desc = {
+const struct vnodeop_desc vop_print_desc = {
0,
"vop_print",
0,
@@ -1115,11 +1115,11 @@ VOP_PRINT(vp)
}
#endif
-int vop_islocked_vp_offsets[] = {
+const int vop_islocked_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_islocked_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_islocked_desc = {
+const struct vnodeop_desc vop_islocked_desc = {
0,
"vop_islocked",
0,
@@ -1142,11 +1142,11 @@ VOP_ISLOCKED(vp)
}
#endif
-int vop_pathconf_vp_offsets[] = {
+const int vop_pathconf_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_pathconf_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_pathconf_desc = {
+const struct vnodeop_desc vop_pathconf_desc = {
0,
"vop_pathconf",
0,
@@ -1173,11 +1173,11 @@ VOP_PATHCONF(vp, name, retval)
}
#endif
-int vop_advlock_vp_offsets[] = {
+const int vop_advlock_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_advlock_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_advlock_desc = {
+const struct vnodeop_desc vop_advlock_desc = {
0,
"vop_advlock",
0,
@@ -1208,11 +1208,11 @@ VOP_ADVLOCK(vp, id, op, fl, flags)
}
#endif
-int vop_blkatoff_vp_offsets[] = {
+const int vop_blkatoff_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_blkatoff_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_blkatoff_desc = {
+const struct vnodeop_desc vop_blkatoff_desc = {
0,
"vop_blkatoff",
0,
@@ -1241,11 +1241,11 @@ VOP_BLKATOFF(vp, offset, res, bpp)
}
#endif
-int vop_valloc_vp_offsets[] = {
+const int vop_valloc_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_valloc_args,a_pvp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_valloc_desc = {
+const struct vnodeop_desc vop_valloc_desc = {
0,
"vop_valloc",
0,
@@ -1274,11 +1274,11 @@ VOP_VALLOC(pvp, mode, cred, vpp)
}
#endif
-int vop_balloc_vp_offsets[] = {
+const int vop_balloc_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_balloc_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_balloc_desc = {
+const struct vnodeop_desc vop_balloc_desc = {
0,
"vop_balloc",
0,
@@ -1311,11 +1311,11 @@ VOP_BALLOC(vp, startoffset, size, cred, flags, bpp)
}
#endif
-int vop_ballocn_vp_offsets[] = {
+const int vop_ballocn_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_ballocn_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_ballocn_desc = {
+const struct vnodeop_desc vop_ballocn_desc = {
0,
"vop_ballocn",
0,
@@ -1346,11 +1346,11 @@ VOP_BALLOCN(vp, offset, length, cred, flags)
}
#endif
-int vop_reallocblks_vp_offsets[] = {
+const int vop_reallocblks_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_reallocblks_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_reallocblks_desc = {
+const struct vnodeop_desc vop_reallocblks_desc = {
0,
"vop_reallocblks",
0,
@@ -1375,11 +1375,11 @@ VOP_REALLOCBLKS(vp, buflist)
}
#endif
-int vop_vfree_vp_offsets[] = {
+const int vop_vfree_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_vfree_args,a_pvp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_vfree_desc = {
+const struct vnodeop_desc vop_vfree_desc = {
0,
"vop_vfree",
0,
@@ -1406,11 +1406,11 @@ VOP_VFREE(pvp, ino, mode)
}
#endif
-int vop_truncate_vp_offsets[] = {
+const int vop_truncate_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_truncate_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_truncate_desc = {
+const struct vnodeop_desc vop_truncate_desc = {
0,
"vop_truncate",
0,
@@ -1441,11 +1441,11 @@ VOP_TRUNCATE(vp, length, flags, cred, p)
}
#endif
-int vop_update_vp_offsets[] = {
+const int vop_update_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_update_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_update_desc = {
+const struct vnodeop_desc vop_update_desc = {
0,
"vop_update",
0,
@@ -1474,11 +1474,11 @@ VOP_UPDATE(vp, access, modify, flags)
}
#endif
-int vop_lease_vp_offsets[] = {
+const int vop_lease_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_lease_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_lease_desc = {
+const struct vnodeop_desc vop_lease_desc = {
0,
"vop_lease",
0,
@@ -1507,11 +1507,11 @@ VOP_LEASE(vp, p, cred, flag)
}
#endif
-int vop_whiteout_vp_offsets[] = {
+const int vop_whiteout_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_whiteout_args,a_dvp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_whiteout_desc = {
+const struct vnodeop_desc vop_whiteout_desc = {
0,
"vop_whiteout",
0,
@@ -1538,11 +1538,11 @@ VOP_WHITEOUT(dvp, cnp, flags)
}
#endif
-int vop_getpages_vp_offsets[] = {
+const int vop_getpages_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_getpages_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_getpages_desc = {
+const struct vnodeop_desc vop_getpages_desc = {
0,
"vop_getpages",
0,
@@ -1579,11 +1579,11 @@ VOP_GETPAGES(vp, offset, m, count, centeridx, access_type, advice, flags)
}
#endif
-int vop_putpages_vp_offsets[] = {
+const int vop_putpages_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_putpages_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_putpages_desc = {
+const struct vnodeop_desc vop_putpages_desc = {
0,
"vop_putpages",
0,
@@ -1614,11 +1614,11 @@ VOP_PUTPAGES(vp, m, count, flags, rtvals)
}
#endif
-int vop_size_vp_offsets[] = {
+const int vop_size_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_size_args,a_vp),
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_size_desc = {
+const struct vnodeop_desc vop_size_desc = {
0,
"vop_size",
0,
@@ -1647,10 +1647,10 @@ VOP_SIZE(vp, size, eobp)
/* Special cases: */
-int vop_strategy_vp_offsets[] = {
+const int vop_strategy_vp_offsets[] = {
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_strategy_desc = {
+const struct vnodeop_desc vop_strategy_desc = {
0,
"vop_strategy",
0,
@@ -1673,10 +1673,10 @@ VOP_STRATEGY(bp)
}
#endif
-int vop_bwrite_vp_offsets[] = {
+const int vop_bwrite_vp_offsets[] = {
VDESC_NO_OFFSET
};
-struct vnodeop_desc vop_bwrite_desc = {
+const struct vnodeop_desc vop_bwrite_desc = {
0,
"vop_bwrite",
0,
@@ -1701,7 +1701,7 @@ VOP_BWRITE(bp)
/* End of special cases. */
-struct vnodeop_desc *vfs_op_descs[] = {
+const struct vnodeop_desc *vfs_op_descs[] = {
&vop_default_desc, /* MUST BE FIRST */
&vop_strategy_desc, /* XXX: SPECIAL CASE */
&vop_bwrite_desc, /* XXX: SPECIAL CASE */
diff --git a/sys/kern/vnode_if.sh b/sys/kern/vnode_if.sh
index 1900d472762..5ce368301f7 100644
--- a/sys/kern/vnode_if.sh
+++ b/sys/kern/vnode_if.sh
@@ -33,7 +33,7 @@ copyright="\
* SUCH DAMAGE.
*/
"
-SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.25 2000/12/22 20:05:35 fvdl Exp $'
+SCRIPT_ID='$NetBSD: vnode_if.sh,v 1.26 2001/01/18 20:28:19 jdolecek Exp $'
# Script to produce VFS front-end sugar.
#
@@ -170,7 +170,7 @@ echo '#include "opt_vnode_op_noinline.h"'
echo '#endif'
echo '#endif /* _KERNEL */'
echo '
-extern struct vnodeop_desc vop_default_desc;
+extern const struct vnodeop_desc vop_default_desc;
'
# Body stuff
@@ -179,12 +179,12 @@ sed -e "$sed_prep" $src | $awk "$toupper"'
function doit() {
# Declare arg struct, descriptor.
printf("\nstruct %s_args {\n", name);
- printf("\tstruct vnodeop_desc * a_desc;\n");
+ printf("\tconst struct vnodeop_desc * a_desc;\n");
for (i=0; i<argc; i++) {
printf("\t%s a_%s;\n", argtype[i], argname[i]);
}
printf("};\n");
- printf("extern struct vnodeop_desc %s_desc;\n", name);
+ printf("extern const struct vnodeop_desc %s_desc;\n", name);
# Prototype it.
printf("#ifndef VNODE_OP_NOINLINE\n");
printf("static __inline\n");
@@ -277,7 +277,7 @@ echo '
#include <sys/buf.h>
#include <sys/vnode.h>
-struct vnodeop_desc vop_default_desc = {
+const struct vnodeop_desc vop_default_desc = {
0,
"default",
0,
@@ -306,7 +306,7 @@ function do_offset(typematch) {
function doit() {
# Define offsets array
- printf("\nint %s_vp_offsets[] = {\n", name);
+ printf("\nconst int %s_vp_offsets[] = {\n", name);
for (i=0; i<argc; i++) {
if (argtype[i] == "struct vnode *") {
printf ("\tVOPARG_OFFSETOF(struct %s_args,a_%s),\n",
@@ -316,7 +316,7 @@ function doit() {
print "\tVDESC_NO_OFFSET";
print "};";
# Define F_desc
- printf("struct vnodeop_desc %s_desc = {\n", name);
+ printf("const struct vnodeop_desc %s_desc = {\n", name);
# offset
printf ("\t0,\n");
# printable name
@@ -400,7 +400,7 @@ echo '
# Add the vfs_op_descs array to the C file.
# Begin stuff
echo '
-struct vnodeop_desc *vfs_op_descs[] = {
+const struct vnodeop_desc *vfs_op_descs[] = {
&vop_default_desc, /* MUST BE FIRST */
&vop_strategy_desc, /* XXX: SPECIAL CASE */
&vop_bwrite_desc, /* XXX: SPECIAL CASE */
diff --git a/sys/miscfs/procfs/procfs.h b/sys/miscfs/procfs/procfs.h
index de56e8c43f7..ea13f017463 100644
--- a/sys/miscfs/procfs/procfs.h
+++ b/sys/miscfs/procfs/procfs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs.h,v 1.31 2001/01/17 00:09:07 fvdl Exp $ */
+/* $NetBSD: procfs.h,v 1.32 2001/01/18 20:28:21 jdolecek Exp $ */
/*
* Copyright (c) 1993 Jan-Simon Pendry
@@ -123,7 +123,7 @@ struct vfs_namemap {
};
int vfs_getuserstr __P((struct uio *, char *, int *));
-vfs_namemap_t *vfs_findname __P((vfs_namemap_t *, char *, int));
+const vfs_namemap_t *vfs_findname __P((const vfs_namemap_t *, const char *, int));
#define PFIND(pid) ((pid) ? pfind(pid) : &proc0)
int procfs_freevp __P((struct vnode *));
diff --git a/sys/miscfs/procfs/procfs_ctl.c b/sys/miscfs/procfs/procfs_ctl.c
index f067e088b39..63a025bef37 100644
--- a/sys/miscfs/procfs/procfs_ctl.c
+++ b/sys/miscfs/procfs/procfs_ctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_ctl.c,v 1.18 2000/08/20 21:50:11 thorpej Exp $ */
+/* $NetBSD: procfs_ctl.c,v 1.19 2001/01/18 20:28:21 jdolecek Exp $ */
/*
* Copyright (c) 1993 Jan-Simon Pendry
@@ -59,7 +59,7 @@
#define PROCFS_CTL_RUN 4
#define PROCFS_CTL_WAIT 5
-static vfs_namemap_t ctlnames[] = {
+static const vfs_namemap_t ctlnames[] = {
/* special /proc commands */
{ "attach", PROCFS_CTL_ATTACH },
{ "detach", PROCFS_CTL_DETACH },
@@ -69,7 +69,7 @@ static vfs_namemap_t ctlnames[] = {
{ 0 },
};
-static vfs_namemap_t signames[] = {
+static const vfs_namemap_t signames[] = {
/* regular signal names */
{ "hup", SIGHUP }, { "int", SIGINT },
{ "quit", SIGQUIT }, { "ill", SIGILL },
@@ -292,7 +292,7 @@ procfs_doctl(curp, p, pfs, uio)
int xlen;
int error;
char msg[PROCFS_CTLLEN+1];
- vfs_namemap_t *nm;
+ const vfs_namemap_t *nm;
if (uio->uio_rw != UIO_WRITE)
return (EOPNOTSUPP);
diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c
index a28c279e720..4173c10d49c 100644
--- a/sys/miscfs/procfs/procfs_subr.c
+++ b/sys/miscfs/procfs/procfs_subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_subr.c,v 1.35 2001/01/17 00:09:08 fvdl Exp $ */
+/* $NetBSD: procfs_subr.c,v 1.36 2001/01/18 20:28:21 jdolecek Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou. All rights reserved.
@@ -303,10 +303,10 @@ vfs_getuserstr(uio, buf, buflenp)
return (0);
}
-vfs_namemap_t *
+const vfs_namemap_t *
vfs_findname(nm, buf, buflen)
- vfs_namemap_t *nm;
- char *buf;
+ const vfs_namemap_t *nm;
+ const char *buf;
int buflen;
{
diff --git a/sys/miscfs/umapfs/umap_vnops.c b/sys/miscfs/umapfs/umap_vnops.c
index 9ab2d2c7a19..1b96d060a8b 100644
--- a/sys/miscfs/umapfs/umap_vnops.c
+++ b/sys/miscfs/umapfs/umap_vnops.c
@@ -1,4 +1,4 @@
-/* $NetBSD: umap_vnops.c,v 1.16 1999/08/16 21:24:53 wrstuden Exp $ */
+/* $NetBSD: umap_vnops.c,v 1.17 2001/01/18 20:28:24 jdolecek Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -421,7 +421,7 @@ umap_getattr(v)
u_long (*mapdata)[2];
u_long (*gmapdata)[2];
struct vnode **vp1p;
- struct vnodeop_desc *descp = ap->a_desc;
+ const struct vnodeop_desc *descp = ap->a_desc;
if ((error = umap_bypass(ap)) != 0)
return (error);
diff --git a/sys/msdosfs/msdosfs_conv.c b/sys/msdosfs/msdosfs_conv.c
index 728b51ccf5d..0b90b62fec4 100644
--- a/sys/msdosfs/msdosfs_conv.c
+++ b/sys/msdosfs/msdosfs_conv.c
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_conv.c,v 1.28 2000/02/28 10:43:08 jdolecek Exp $ */
+/* $NetBSD: msdosfs_conv.c,v 1.29 2001/01/18 20:28:27 jdolecek Exp $ */
/*-
* Copyright (C) 1995, 1997 Wolfgang Solfrank.
@@ -66,7 +66,7 @@
/*
* Days in each month in a regular year.
*/
-u_short regyear[] = {
+u_short const regyear[] = {
31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31
};
@@ -74,7 +74,7 @@ u_short regyear[] = {
/*
* Days in each month in a leap year.
*/
-u_short leapyear[] = {
+u_short const leapyear[] = {
31, 29, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31
};
@@ -104,7 +104,7 @@ unix2dostime(tsp, ddp, dtp, dhp)
u_long inc;
u_long year;
u_long month;
- u_short *months;
+ const u_short *months;
/*
* If the time from the last conversion is the same as now, then
@@ -184,7 +184,7 @@ dos2unixtime(dd, dt, dh, tsp)
u_long m, month;
u_long y, year;
u_long days;
- u_short *months;
+ const u_short *months;
if (dd == 0) {
/*
@@ -229,7 +229,7 @@ dos2unixtime(dd, dt, dh, tsp)
tsp->tv_nsec = (dh % 100) * 10000000;
}
-static u_char
+static const u_char
unix2dos[256] = {
0, 0, 0, 0, 0, 0, 0, 0, /* 00-07 */
0, 0, 0, 0, 0, 0, 0, 0, /* 08-0f */
@@ -265,7 +265,7 @@ unix2dos[256] = {
0x9d, 0xeb, 0xe9, 0xea, 0x9a, 0xed, 0xe8, 0x98, /* f8-ff */
};
-static u_char
+static const u_char
dos2unix[256] = {
0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, /* 00-07 */
0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, /* 08-0f */
@@ -301,7 +301,7 @@ dos2unix[256] = {
0xb0, 0xa8, 0xb7, 0xb9, 0xb3, 0xb2, 0x3f, 0x3f, /* f8-ff */
};
-static u_char
+static const u_char
u2l[256] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 00-07 */
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 08-0f */
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c
index a7973ed67d9..213c21c560e 100644
--- a/sys/net/ppp_tty.c
+++ b/sys/net/ppp_tty.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ppp_tty.c,v 1.22 2000/12/12 18:00:31 thorpej Exp $ */
+/* $NetBSD: ppp_tty.c,v 1.23 2001/01/18 20:28:20 jdolecek Exp $ */
/* Id: ppp_tty.c,v 1.3 1996/07/01 01:04:11 paulus Exp */
/*
@@ -575,7 +575,7 @@ bail:
/*
* FCS lookup table as calculated by genfcstab.
*/
-static u_int16_t fcstab[256] = {
+static const u_int16_t fcstab[256] = {
0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
@@ -947,7 +947,7 @@ pppgetm(sc)
/*
* tty interface receiver interrupt.
*/
-static unsigned paritytab[8] = {
+static const unsigned paritytab[8] = {
0x96696996, 0x69969669, 0x69969669, 0x96696996,
0x69969669, 0x96696996, 0x96696996, 0x69969669
};
diff --git a/sys/net/zlib.c b/sys/net/zlib.c
index 24b4201d8a8..59e1c001ae5 100644
--- a/sys/net/zlib.c
+++ b/sys/net/zlib.c
@@ -1,4 +1,4 @@
-/* $NetBSD: zlib.c,v 1.11 2001/01/17 18:52:41 jdolecek Exp $ */
+/* $NetBSD: zlib.c,v 1.12 2001/01/18 20:28:20 jdolecek Exp $ */
/*
* This file is derived from various .h and .c files from the zlib-1.0.4
* distribution by Jean-loup Gailly and Mark Adler, with some additions
@@ -11,7 +11,7 @@
* - added inflateIncomp and deflateOutputPending
* - allow strm->next_out to be NULL, meaning discard the output
*
- * $Id: zlib.c,v 1.11 2001/01/17 18:52:41 jdolecek Exp $
+ * $Id: zlib.c,v 1.12 2001/01/18 20:28:20 jdolecek Exp $
*/
/*
@@ -1890,16 +1890,16 @@ local block_state deflate_slow(s, flush)
#define REPZ_11_138 18
/* repeat a zero length 11-138 times (7 bits of repeat count) */
-local int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
+local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
= {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
-local int extra_dbits[D_CODES] /* extra bits for each distance code */
+local const int extra_dbits[D_CODES] /* extra bits for each distance code */
= {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
-local int extra_blbits[BL_CODES]/* extra bits for each bit length code */
+local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
= {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
-local uch bl_order[BL_CODES]
+local const uch bl_order[BL_CODES]
= {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
/* The lengths of the bit length codes are sent in order of decreasing
* probability, to avoid transmitting the lengths for unused bit length codes.
@@ -1943,7 +1943,7 @@ local int base_dist[D_CODES];
struct static_tree_desc_s {
ct_data *static_tree; /* static tree or NULL */
- intf *extra_bits; /* extra bits for each code or NULL */
+ const intf *extra_bits; /* extra bits for each code or NULL */
int extra_base; /* base index for extra_bits */
int elems; /* max number of elements in the tree */
int max_length; /* max bit length for the codes */
@@ -2250,7 +2250,7 @@ local void gen_bitlen(s, desc)
ct_data *tree = desc->dyn_tree;
int max_code = desc->max_code;
ct_data *stree = desc->stat_desc->static_tree;
- intf *extra = desc->stat_desc->extra_bits;
+ const intf *extra = desc->stat_desc->extra_bits;
int base = desc->stat_desc->extra_base;
int max_length = desc->stat_desc->max_length;
int h; /* heap index */
@@ -3604,7 +3604,7 @@ struct inflate_blocks_state {
#define LOAD {LOADIN LOADOUT}
/* masks for lower bits (size given to avoid silly warnings with Visual C++) */
-extern uInt inflate_mask[17];
+extern const uInt inflate_mask[17];
/* copy as much as possible from the sliding window to the output area */
extern int inflate_flush OF((
@@ -4854,7 +4854,7 @@ struct inflate_codes_state {int dummy;}; /* for buggy compilers */
#endif
/* And'ing with mask[n] masks the lower n bits */
-uInt inflate_mask[17] = {
+uInt const inflate_mask[17] = {
0x0000,
0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
diff --git a/sys/netinet/fil.c b/sys/netinet/fil.c
index be463d4fe2b..5b9fac29712 100644
--- a/sys/netinet/fil.c
+++ b/sys/netinet/fil.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fil.c,v 1.43 2000/11/12 19:50:47 thorpej Exp $ */
+/* $NetBSD: fil.c,v 1.44 2001/01/18 20:28:22 jdolecek Exp $ */
/*
* Copyright (C) 1993-2000 by Darren Reed.
@@ -9,7 +9,7 @@
*/
#if !defined(lint)
#if defined(__NetBSD__)
-static const char rcsid[] = "$NetBSD: fil.c,v 1.43 2000/11/12 19:50:47 thorpej Exp $";
+static const char rcsid[] = "$NetBSD: fil.c,v 1.44 2001/01/18 20:28:22 jdolecek Exp $";
#else
static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed";
static const char rcsid[] = "@(#)Id: fil.c,v 2.35.2.19 2000/07/27 13:08:18 darrenr Exp";
@@ -160,7 +160,7 @@ static void frsynclist __P((frentry_t *));
/*
* bit values for identifying presence of individual IP options
*/
-struct optlist ipopts[20] = {
+const struct optlist ipopts[20] = {
{ IPOPT_NOP, 0x000001 },
{ IPOPT_RR, 0x000002 },
{ IPOPT_ZSU, 0x000004 },
@@ -186,7 +186,7 @@ struct optlist ipopts[20] = {
/*
* bit values for identifying presence of individual IP security options
*/
-struct optlist secopt[8] = {
+const struct optlist secopt[8] = {
{ IPSO_CLASS_RES4, 0x01 },
{ IPSO_CLASS_TOPS, 0x02 },
{ IPSO_CLASS_SECR, 0x04 },
@@ -210,7 +210,7 @@ fr_info_t *fin;
u_short optmsk = 0, secmsk = 0, auth = 0;
int i, mv, ol, off, p, plen, v;
fr_ip_t *fi = &fin->fin_fi;
- struct optlist *op;
+ const struct optlist *op;
u_char *s, opt;
tcphdr_t *tcp;
@@ -370,7 +370,7 @@ getports:
if (opt == (u_char)op->ol_val) {
optmsk |= op->ol_bit;
if (opt == IPOPT_SECURITY) {
- struct optlist *sp;
+ const struct optlist *sp;
u_char sec;
int j, m;
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 347c15df6e9..540a9189f7c 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_usrreq.c,v 1.58 2000/12/11 00:07:48 itojun Exp $ */
+/* $NetBSD: tcp_usrreq.c,v 1.59 2001/01/18 20:28:22 jdolecek Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -929,7 +929,7 @@ tcp_usrclosed(tp)
return (tp);
}
-static struct {
+static const struct {
unsigned int valid : 1;
unsigned int rdonly : 1;
int *var;
diff --git a/sys/netiso/tp_driver.c b/sys/netiso/tp_driver.c
index f59bd3321d1..a19f98a70a5 100644
--- a/sys/netiso/tp_driver.c
+++ b/sys/netiso/tp_driver.c
@@ -1,8 +1,8 @@
-/* $NetBSD: tp_driver.c,v 1.12 2000/03/30 13:10:12 augustss Exp $ */
+/* $NetBSD: tp_driver.c,v 1.13 2001/01/18 20:28:28 jdolecek Exp $ */
#include "tp_states.h"
-static struct act_ent {
+static const struct act_ent {
int a_newstate;
int a_action;
} statetable[] = {{
@@ -950,7 +950,7 @@ _Xebec_index(e, p)
return 0;
} /* end switch */
} /* _Xebec_index() */
-static int inx[26][9] =
+static const int inx[26][9] =
{
{0, 0, 0, 0, 0, 0, 0, 0, 0,},
{0x0, 0x0, 0x0, 0x0, 0x31, 0x0, 0x0, 0x0, 0x0,},
@@ -985,7 +985,7 @@ tp_driver(p, e)
struct tp_event *e;
{
int index, error = 0;
- struct act_ent *a;
+ const struct act_ent *a;
static struct act_ent erroraction = {0, -1};
index = inx[1 + e->ev_number][p->tp_state];
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index 3842d9f7ca4..e961ab3edc1 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_subs.c,v 1.89 2000/11/27 08:39:49 chs Exp $ */
+/* $NetBSD: nfs_subs.c,v 1.90 2001/01/18 20:28:28 jdolecek Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -130,12 +130,14 @@ u_int32_t nfs_prog, nqnfs_prog, nfs_true, nfs_false;
/* And other global data */
static u_int32_t nfs_xid = 0;
-nfstype nfsv2_type[9] = { NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFNON,
- NFCHR, NFNON };
-nfstype nfsv3_type[9] = { NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFSOCK,
- NFFIFO, NFNON };
-enum vtype nv2tov_type[8] = { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VNON, VNON };
-enum vtype nv3tov_type[8]={ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO };
+const nfstype nfsv2_type[9] =
+ { NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFNON, NFCHR, NFNON };
+const nfstype nfsv3_type[9] =
+ { NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFSOCK, NFFIFO, NFNON };
+const enum vtype nv2tov_type[8] =
+ { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VNON, VNON };
+const enum vtype nv3tov_type[8] =
+ { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO };
int nfs_ticks;
/* NFS client/server stats. */
@@ -144,7 +146,7 @@ struct nfsstats nfsstats;
/*
* Mapping of old NFS Version 2 RPC numbers to generic numbers.
*/
-int nfsv3_procid[NFS_NPROCS] = {
+const int nfsv3_procid[NFS_NPROCS] = {
NFSPROC_NULL,
NFSPROC_GETATTR,
NFSPROC_SETATTR,
@@ -176,7 +178,7 @@ int nfsv3_procid[NFS_NPROCS] = {
/*
* and the reverse mapping from generic to Version 2 procedure numbers
*/
-int nfsv2_procid[NFS_NPROCS] = {
+const int nfsv2_procid[NFS_NPROCS] = {
NFSV2PROC_NULL,
NFSV2PROC_GETATTR,
NFSV2PROC_SETATTR,
@@ -210,7 +212,7 @@ int nfsv2_procid[NFS_NPROCS] = {
* Use NFSERR_IO as the catch all for ones not specifically defined in
* RFC 1094.
*/
-static u_char nfsrv_v2errmap[ELAST] = {
+static const u_char nfsrv_v2errmap[ELAST] = {
NFSERR_PERM, NFSERR_NOENT, NFSERR_IO, NFSERR_IO, NFSERR_IO,
NFSERR_NXIO, NFSERR_IO, NFSERR_IO, NFSERR_IO, NFSERR_IO,
NFSERR_IO, NFSERR_IO, NFSERR_ACCES, NFSERR_IO, NFSERR_IO,
@@ -241,12 +243,12 @@ static u_char nfsrv_v2errmap[ELAST] = {
* The first entry is the default error return and the rest are the valid
* errors for that RPC in increasing numeric order.
*/
-static short nfsv3err_null[] = {
+static const short nfsv3err_null[] = {
0,
0,
};
-static short nfsv3err_getattr[] = {
+static const short nfsv3err_getattr[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_STALE,
@@ -255,7 +257,7 @@ static short nfsv3err_getattr[] = {
0,
};
-static short nfsv3err_setattr[] = {
+static const short nfsv3err_setattr[] = {
NFSERR_IO,
NFSERR_PERM,
NFSERR_IO,
@@ -271,7 +273,7 @@ static short nfsv3err_setattr[] = {
0,
};
-static short nfsv3err_lookup[] = {
+static const short nfsv3err_lookup[] = {
NFSERR_IO,
NFSERR_NOENT,
NFSERR_IO,
@@ -284,7 +286,7 @@ static short nfsv3err_lookup[] = {
0,
};
-static short nfsv3err_access[] = {
+static const short nfsv3err_access[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_STALE,
@@ -293,7 +295,7 @@ static short nfsv3err_access[] = {
0,
};
-static short nfsv3err_readlink[] = {
+static const short nfsv3err_readlink[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_ACCES,
@@ -305,7 +307,7 @@ static short nfsv3err_readlink[] = {
0,
};
-static short nfsv3err_read[] = {
+static const short nfsv3err_read[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_NXIO,
@@ -318,7 +320,7 @@ static short nfsv3err_read[] = {
0,
};
-static short nfsv3err_write[] = {
+static const short nfsv3err_write[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_ACCES,
@@ -334,7 +336,7 @@ static short nfsv3err_write[] = {
0,
};
-static short nfsv3err_create[] = {
+static const short nfsv3err_create[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_ACCES,
@@ -351,7 +353,7 @@ static short nfsv3err_create[] = {
0,
};
-static short nfsv3err_mkdir[] = {
+static const short nfsv3err_mkdir[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_ACCES,
@@ -368,7 +370,7 @@ static short nfsv3err_mkdir[] = {
0,
};
-static short nfsv3err_symlink[] = {
+static const short nfsv3err_symlink[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_ACCES,
@@ -385,7 +387,7 @@ static short nfsv3err_symlink[] = {
0,
};
-static short nfsv3err_mknod[] = {
+static const short nfsv3err_mknod[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_ACCES,
@@ -403,7 +405,7 @@ static short nfsv3err_mknod[] = {
0,
};
-static short nfsv3err_remove[] = {
+static const short nfsv3err_remove[] = {
NFSERR_IO,
NFSERR_NOENT,
NFSERR_IO,
@@ -417,7 +419,7 @@ static short nfsv3err_remove[] = {
0,
};
-static short nfsv3err_rmdir[] = {
+static const short nfsv3err_rmdir[] = {
NFSERR_IO,
NFSERR_NOENT,
NFSERR_IO,
@@ -435,7 +437,7 @@ static short nfsv3err_rmdir[] = {
0,
};
-static short nfsv3err_rename[] = {
+static const short nfsv3err_rename[] = {
NFSERR_IO,
NFSERR_NOENT,
NFSERR_IO,
@@ -458,7 +460,7 @@ static short nfsv3err_rename[] = {
0,
};
-static short nfsv3err_link[] = {
+static const short nfsv3err_link[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_ACCES,
@@ -478,7 +480,7 @@ static short nfsv3err_link[] = {
0,
};
-static short nfsv3err_readdir[] = {
+static const short nfsv3err_readdir[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_ACCES,
@@ -491,7 +493,7 @@ static short nfsv3err_readdir[] = {
0,
};
-static short nfsv3err_readdirplus[] = {
+static const short nfsv3err_readdirplus[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_ACCES,
@@ -505,7 +507,7 @@ static short nfsv3err_readdirplus[] = {
0,
};
-static short nfsv3err_fsstat[] = {
+static const short nfsv3err_fsstat[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_STALE,
@@ -514,7 +516,7 @@ static short nfsv3err_fsstat[] = {
0,
};
-static short nfsv3err_fsinfo[] = {
+static const short nfsv3err_fsinfo[] = {
NFSERR_STALE,
NFSERR_STALE,
NFSERR_BADHANDLE,
@@ -522,7 +524,7 @@ static short nfsv3err_fsinfo[] = {
0,
};
-static short nfsv3err_pathconf[] = {
+static const short nfsv3err_pathconf[] = {
NFSERR_STALE,
NFSERR_STALE,
NFSERR_BADHANDLE,
@@ -530,7 +532,7 @@ static short nfsv3err_pathconf[] = {
0,
};
-static short nfsv3err_commit[] = {
+static const short nfsv3err_commit[] = {
NFSERR_IO,
NFSERR_IO,
NFSERR_STALE,
@@ -539,7 +541,7 @@ static short nfsv3err_commit[] = {
0,
};
-static short *nfsrv_v3errmap[] = {
+static const short * const nfsrv_v3errmap[] = {
nfsv3err_null,
nfsv3err_getattr,
nfsv3err_setattr,
@@ -2593,7 +2595,7 @@ nfsrv_errmap(nd, err)
struct nfsrv_descript *nd;
int err;
{
- short *defaulterrp, *errp;
+ const short *defaulterrp, *errp;
if (nd->nd_flag & ND_NFSV3) {
if (nd->nd_procnum <= NFSPROC_COMMIT) {
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 5938d223d97..3093146a7b1 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -1,4 +1,4 @@
-/* $NetBSD: vnode.h,v 1.84 2000/11/27 08:39:52 chs Exp $ */
+/* $NetBSD: vnode.h,v 1.85 2001/01/18 20:28:23 jdolecek Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -377,7 +377,7 @@ extern struct vattr va_null; /* predefined null vattr structure */
*/
struct vnodeop_desc {
int vdesc_offset; /* offset in vector--first for speed */
- char *vdesc_name; /* a readable name for debugging */
+ const char *vdesc_name; /* a readable name for debugging */
int vdesc_flags; /* VDESC_* flags */
/*
@@ -386,7 +386,7 @@ struct vnodeop_desc {
* they are useful to (for example) transport layers.
* Nameidata is useful because it has a cred in it.
*/
- int *vdesc_vp_offsets; /* list ended by VDESC_NO_OFFSET */
+ const int *vdesc_vp_offsets; /* list ended by VDESC_NO_OFFSET */
int vdesc_vpp_offset; /* return vpp location */
int vdesc_cred_offset; /* cred location, if any */
int vdesc_proc_offset; /* proc location, if any */
@@ -429,7 +429,7 @@ extern struct simplelock mntvnode_slock;
* This structure is used to configure the new vnodeops vector.
*/
struct vnodeopv_entry_desc {
- struct vnodeop_desc *opve_op; /* which operation this is */
+ const struct vnodeop_desc *opve_op; /* which operation this is */
int (*opve_impl) __P((void *)); /* code implementing this operation */
};
struct vnodeopv_desc {
diff --git a/sys/sys/vnode_if.h b/sys/sys/vnode_if.h
index a3bf76d4c5d..3cb6fc38e89 100644
--- a/sys/sys/vnode_if.h
+++ b/sys/sys/vnode_if.h
@@ -1,4 +1,4 @@
-/* $NetBSD: vnode_if.h,v 1.30 2000/12/22 20:07:23 fvdl Exp $ */
+/* $NetBSD: vnode_if.h,v 1.31 2001/01/18 20:28:24 jdolecek Exp $ */
/*
* Warning: This file is generated automatically.
@@ -55,16 +55,16 @@
#endif
#endif /* _KERNEL */
-extern struct vnodeop_desc vop_default_desc;
+extern const struct vnodeop_desc vop_default_desc;
struct vop_lookup_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_dvp;
struct vnode **a_vpp;
struct componentname *a_cnp;
};
-extern struct vnodeop_desc vop_lookup_desc;
+extern const struct vnodeop_desc vop_lookup_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -89,13 +89,13 @@ static __inline int VOP_LOOKUP(dvp, vpp, cnp)
#endif
struct vop_create_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_dvp;
struct vnode **a_vpp;
struct componentname *a_cnp;
struct vattr *a_vap;
};
-extern struct vnodeop_desc vop_create_desc;
+extern const struct vnodeop_desc vop_create_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -123,13 +123,13 @@ static __inline int VOP_CREATE(dvp, vpp, cnp, vap)
#endif
struct vop_mknod_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_dvp;
struct vnode **a_vpp;
struct componentname *a_cnp;
struct vattr *a_vap;
};
-extern struct vnodeop_desc vop_mknod_desc;
+extern const struct vnodeop_desc vop_mknod_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -157,13 +157,13 @@ static __inline int VOP_MKNOD(dvp, vpp, cnp, vap)
#endif
struct vop_open_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
int a_mode;
struct ucred *a_cred;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_open_desc;
+extern const struct vnodeop_desc vop_open_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -190,13 +190,13 @@ static __inline int VOP_OPEN(vp, mode, cred, p)
#endif
struct vop_close_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
int a_fflag;
struct ucred *a_cred;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_close_desc;
+extern const struct vnodeop_desc vop_close_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -223,13 +223,13 @@ static __inline int VOP_CLOSE(vp, fflag, cred, p)
#endif
struct vop_access_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
int a_mode;
struct ucred *a_cred;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_access_desc;
+extern const struct vnodeop_desc vop_access_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -256,13 +256,13 @@ static __inline int VOP_ACCESS(vp, mode, cred, p)
#endif
struct vop_getattr_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
struct vattr *a_vap;
struct ucred *a_cred;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_getattr_desc;
+extern const struct vnodeop_desc vop_getattr_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -289,13 +289,13 @@ static __inline int VOP_GETATTR(vp, vap, cred, p)
#endif
struct vop_setattr_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
struct vattr *a_vap;
struct ucred *a_cred;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_setattr_desc;
+extern const struct vnodeop_desc vop_setattr_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -322,13 +322,13 @@ static __inline int VOP_SETATTR(vp, vap, cred, p)
#endif
struct vop_read_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
struct uio *a_uio;
int a_ioflag;
struct ucred *a_cred;
};
-extern struct vnodeop_desc vop_read_desc;
+extern const struct vnodeop_desc vop_read_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -355,13 +355,13 @@ static __inline int VOP_READ(vp, uio, ioflag, cred)
#endif
struct vop_write_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
struct uio *a_uio;
int a_ioflag;
struct ucred *a_cred;
};
-extern struct vnodeop_desc vop_write_desc;
+extern const struct vnodeop_desc vop_write_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -388,7 +388,7 @@ static __inline int VOP_WRITE(vp, uio, ioflag, cred)
#endif
struct vop_ioctl_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
u_long a_command;
caddr_t a_data;
@@ -396,7 +396,7 @@ struct vop_ioctl_args {
struct ucred *a_cred;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_ioctl_desc;
+extern const struct vnodeop_desc vop_ioctl_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -428,7 +428,7 @@ static __inline int VOP_IOCTL(vp, command, data, fflag, cred, p)
#endif
struct vop_fcntl_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
u_int a_command;
caddr_t a_data;
@@ -436,7 +436,7 @@ struct vop_fcntl_args {
struct ucred *a_cred;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_fcntl_desc;
+extern const struct vnodeop_desc vop_fcntl_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -468,12 +468,12 @@ static __inline int VOP_FCNTL(vp, command, data, fflag, cred, p)
#endif
struct vop_poll_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
int a_events;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_poll_desc;
+extern const struct vnodeop_desc vop_poll_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -498,11 +498,11 @@ static __inline int VOP_POLL(vp, events, p)
#endif
struct vop_revoke_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
int a_flags;
};
-extern struct vnodeop_desc vop_revoke_desc;
+extern const struct vnodeop_desc vop_revoke_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -525,13 +525,13 @@ static __inline int VOP_REVOKE(vp, flags)
#endif
struct vop_mmap_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
int a_fflags;
struct ucred *a_cred;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_mmap_desc;
+extern const struct vnodeop_desc vop_mmap_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -558,7 +558,7 @@ static __inline int VOP_MMAP(vp, fflags, cred, p)
#endif
struct vop_fsync_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
struct ucred *a_cred;
int a_flags;
@@ -566,7 +566,7 @@ struct vop_fsync_args {
off_t a_offhi;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_fsync_desc;
+extern const struct vnodeop_desc vop_fsync_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -598,13 +598,13 @@ static __inline int VOP_FSYNC(vp, cred, flags, offlo, offhi, p)
#endif
struct vop_seek_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
off_t a_oldoff;
off_t a_newoff;
struct ucred *a_cred;
};
-extern struct vnodeop_desc vop_seek_desc;
+extern const struct vnodeop_desc vop_seek_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -631,12 +631,12 @@ static __inline int VOP_SEEK(vp, oldoff, newoff, cred)
#endif
struct vop_remove_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_dvp;
struct vnode *a_vp;
struct componentname *a_cnp;
};
-extern struct vnodeop_desc vop_remove_desc;
+extern const struct vnodeop_desc vop_remove_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -661,12 +661,12 @@ static __inline int VOP_REMOVE(dvp, vp, cnp)
#endif
struct vop_link_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_dvp;
struct vnode *a_vp;
struct componentname *a_cnp;
};
-extern struct vnodeop_desc vop_link_desc;
+extern const struct vnodeop_desc vop_link_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -691,7 +691,7 @@ static __inline int VOP_LINK(dvp, vp, cnp)
#endif
struct vop_rename_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_fdvp;
struct vnode *a_fvp;
struct componentname *a_fcnp;
@@ -699,7 +699,7 @@ struct vop_rename_args {
struct vnode *a_tvp;
struct componentname *a_tcnp;
};
-extern struct vnodeop_desc vop_rename_desc;
+extern const struct vnodeop_desc vop_rename_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -731,13 +731,13 @@ static __inline int VOP_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp)
#endif
struct vop_mkdir_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_dvp;
struct vnode **a_vpp;
struct componentname *a_cnp;
struct vattr *a_vap;
};
-extern struct vnodeop_desc vop_mkdir_desc;
+extern const struct vnodeop_desc vop_mkdir_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -765,12 +765,12 @@ static __inline int VOP_MKDIR(dvp, vpp, cnp, vap)
#endif
struct vop_rmdir_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_dvp;
struct vnode *a_vp;
struct componentname *a_cnp;
};
-extern struct vnodeop_desc vop_rmdir_desc;
+extern const struct vnodeop_desc vop_rmdir_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -795,14 +795,14 @@ static __inline int VOP_RMDIR(dvp, vp, cnp)
#endif
struct vop_symlink_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_dvp;
struct vnode **a_vpp;
struct componentname *a_cnp;
struct vattr *a_vap;
char *a_target;
};
-extern struct vnodeop_desc vop_symlink_desc;
+extern const struct vnodeop_desc vop_symlink_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -832,7 +832,7 @@ static __inline int VOP_SYMLINK(dvp, vpp, cnp, vap, target)
#endif
struct vop_readdir_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
struct uio *a_uio;
struct ucred *a_cred;
@@ -840,7 +840,7 @@ struct vop_readdir_args {
off_t **a_cookies;
int *a_ncookies;
};
-extern struct vnodeop_desc vop_readdir_desc;
+extern const struct vnodeop_desc vop_readdir_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -872,12 +872,12 @@ static __inline int VOP_READDIR(vp, uio, cred, eofflag, cookies, ncookies)
#endif
struct vop_readlink_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
struct uio *a_uio;
struct ucred *a_cred;
};
-extern struct vnodeop_desc vop_readlink_desc;
+extern const struct vnodeop_desc vop_readlink_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -902,11 +902,11 @@ static __inline int VOP_READLINK(vp, uio, cred)
#endif
struct vop_abortop_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_dvp;
struct componentname *a_cnp;
};
-extern struct vnodeop_desc vop_abortop_desc;
+extern const struct vnodeop_desc vop_abortop_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -929,11 +929,11 @@ static __inline int VOP_ABORTOP(dvp, cnp)
#endif
struct vop_inactive_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_inactive_desc;
+extern const struct vnodeop_desc vop_inactive_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -956,11 +956,11 @@ static __inline int VOP_INACTIVE(vp, p)
#endif
struct vop_reclaim_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_reclaim_desc;
+extern const struct vnodeop_desc vop_reclaim_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -983,11 +983,11 @@ static __inline int VOP_RECLAIM(vp, p)
#endif
struct vop_lock_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
int a_flags;
};
-extern struct vnodeop_desc vop_lock_desc;
+extern const struct vnodeop_desc vop_lock_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1010,11 +1010,11 @@ static __inline int VOP_LOCK(vp, flags)
#endif
struct vop_unlock_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
int a_flags;
};
-extern struct vnodeop_desc vop_unlock_desc;
+extern const struct vnodeop_desc vop_unlock_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1037,14 +1037,14 @@ static __inline int VOP_UNLOCK(vp, flags)
#endif
struct vop_bmap_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
daddr_t a_bn;
struct vnode **a_vpp;
daddr_t *a_bnp;
int *a_runp;
};
-extern struct vnodeop_desc vop_bmap_desc;
+extern const struct vnodeop_desc vop_bmap_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1073,10 +1073,10 @@ static __inline int VOP_BMAP(vp, bn, vpp, bnp, runp)
#endif
struct vop_print_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
};
-extern struct vnodeop_desc vop_print_desc;
+extern const struct vnodeop_desc vop_print_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1097,10 +1097,10 @@ static __inline int VOP_PRINT(vp)
#endif
struct vop_islocked_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
};
-extern struct vnodeop_desc vop_islocked_desc;
+extern const struct vnodeop_desc vop_islocked_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1121,12 +1121,12 @@ static __inline int VOP_ISLOCKED(vp)
#endif
struct vop_pathconf_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
int a_name;
register_t *a_retval;
};
-extern struct vnodeop_desc vop_pathconf_desc;
+extern const struct vnodeop_desc vop_pathconf_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1151,14 +1151,14 @@ static __inline int VOP_PATHCONF(vp, name, retval)
#endif
struct vop_advlock_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
caddr_t a_id;
int a_op;
struct flock *a_fl;
int a_flags;
};
-extern struct vnodeop_desc vop_advlock_desc;
+extern const struct vnodeop_desc vop_advlock_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1187,13 +1187,13 @@ static __inline int VOP_ADVLOCK(vp, id, op, fl, flags)
#endif
struct vop_blkatoff_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
off_t a_offset;
char **a_res;
struct buf **a_bpp;
};
-extern struct vnodeop_desc vop_blkatoff_desc;
+extern const struct vnodeop_desc vop_blkatoff_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1220,13 +1220,13 @@ static __inline int VOP_BLKATOFF(vp, offset, res, bpp)
#endif
struct vop_valloc_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_pvp;
int a_mode;
struct ucred *a_cred;
struct vnode **a_vpp;
};
-extern struct vnodeop_desc vop_valloc_desc;
+extern const struct vnodeop_desc vop_valloc_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1253,7 +1253,7 @@ static __inline int VOP_VALLOC(pvp, mode, cred, vpp)
#endif
struct vop_balloc_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
off_t a_startoffset;
int a_size;
@@ -1261,7 +1261,7 @@ struct vop_balloc_args {
int a_flags;
struct buf **a_bpp;
};
-extern struct vnodeop_desc vop_balloc_desc;
+extern const struct vnodeop_desc vop_balloc_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1292,14 +1292,14 @@ static __inline int VOP_BALLOC(vp, startoffset, size, cred, flags, bpp)
#endif
struct vop_ballocn_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
off_t a_offset;
off_t a_length;
struct ucred *a_cred;
int a_flags;
};
-extern struct vnodeop_desc vop_ballocn_desc;
+extern const struct vnodeop_desc vop_ballocn_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1328,11 +1328,11 @@ static __inline int VOP_BALLOCN(vp, offset, length, cred, flags)
#endif
struct vop_reallocblks_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
struct cluster_save *a_buflist;
};
-extern struct vnodeop_desc vop_reallocblks_desc;
+extern const struct vnodeop_desc vop_reallocblks_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1355,12 +1355,12 @@ static __inline int VOP_REALLOCBLKS(vp, buflist)
#endif
struct vop_vfree_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_pvp;
ino_t a_ino;
int a_mode;
};
-extern struct vnodeop_desc vop_vfree_desc;
+extern const struct vnodeop_desc vop_vfree_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1385,14 +1385,14 @@ static __inline int VOP_VFREE(pvp, ino, mode)
#endif
struct vop_truncate_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
off_t a_length;
int a_flags;
struct ucred *a_cred;
struct proc *a_p;
};
-extern struct vnodeop_desc vop_truncate_desc;
+extern const struct vnodeop_desc vop_truncate_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1421,13 +1421,13 @@ static __inline int VOP_TRUNCATE(vp, length, flags, cred, p)
#endif
struct vop_update_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
struct timespec *a_access;
struct timespec *a_modify;
int a_flags;
};
-extern struct vnodeop_desc vop_update_desc;
+extern const struct vnodeop_desc vop_update_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1454,13 +1454,13 @@ static __inline int VOP_UPDATE(vp, access, modify, flags)
#endif
struct vop_lease_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
struct proc *a_p;
struct ucred *a_cred;
int a_flag;
};
-extern struct vnodeop_desc vop_lease_desc;
+extern const struct vnodeop_desc vop_lease_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1487,12 +1487,12 @@ static __inline int VOP_LEASE(vp, p, cred, flag)
#endif
struct vop_whiteout_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_dvp;
struct componentname *a_cnp;
int a_flags;
};
-extern struct vnodeop_desc vop_whiteout_desc;
+extern const struct vnodeop_desc vop_whiteout_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1517,7 +1517,7 @@ static __inline int VOP_WHITEOUT(dvp, cnp, flags)
#endif
struct vop_getpages_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
voff_t a_offset;
vm_page_t *a_m;
@@ -1527,7 +1527,7 @@ struct vop_getpages_args {
int a_advice;
int a_flags;
};
-extern struct vnodeop_desc vop_getpages_desc;
+extern const struct vnodeop_desc vop_getpages_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1563,14 +1563,14 @@ static __inline int VOP_GETPAGES(vp, offset, m, count, centeridx, access_type, a
#endif
struct vop_putpages_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
vm_page_t *a_m;
int a_count;
int a_flags;
int *a_rtvals;
};
-extern struct vnodeop_desc vop_putpages_desc;
+extern const struct vnodeop_desc vop_putpages_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1599,12 +1599,12 @@ static __inline int VOP_PUTPAGES(vp, m, count, flags, rtvals)
#endif
struct vop_size_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
off_t a_size;
off_t *a_eobp;
};
-extern struct vnodeop_desc vop_size_desc;
+extern const struct vnodeop_desc vop_size_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1632,10 +1632,10 @@ static __inline int VOP_SIZE(vp, size, eobp)
#include <sys/buf.h>
struct vop_strategy_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct buf *a_bp;
};
-extern struct vnodeop_desc vop_strategy_desc;
+extern const struct vnodeop_desc vop_strategy_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
@@ -1656,10 +1656,10 @@ static __inline int VOP_STRATEGY(bp)
#endif
struct vop_bwrite_args {
- struct vnodeop_desc *a_desc;
+ const struct vnodeop_desc *a_desc;
struct buf *a_bp;
};
-extern struct vnodeop_desc vop_bwrite_desc;
+extern const struct vnodeop_desc vop_bwrite_desc;
#ifndef VNODE_OP_NOINLINE
static __inline
#endif
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index da49e1db2b2..1fbc39d6601 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_alloc.c,v 1.39 2000/11/30 20:56:10 nathanw Exp $ */
+/* $NetBSD: ffs_alloc.c,v 1.40 2001/01/18 20:28:19 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -79,8 +79,8 @@ static int ffs_checkblk __P((struct inode *, ufs_daddr_t, long size));
int ffs_log_changeopt = 0;
/* in ffs_tables.c */
-extern int inside[], around[];
-extern u_char *fragtbl[];
+extern const int inside[], around[];
+extern const u_char * const fragtbl[];
/*
* Allocate a block in the file system.
diff --git a/sys/ufs/ffs/ffs_tables.c b/sys/ufs/ffs/ffs_tables.c
index d4b0997f073..da51f0a55cf 100644
--- a/sys/ufs/ffs/ffs_tables.c
+++ b/sys/ufs/ffs/ffs_tables.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_tables.c,v 1.2 1994/06/29 06:46:35 cgd Exp $ */
+/* $NetBSD: ffs_tables.c,v 1.3 2001/01/18 20:28:19 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -41,10 +41,10 @@
* Bit patterns for identifying fragments in the block map
* used as ((map & around) == inside)
*/
-int around[9] = {
+const int around[9] = {
0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, 0x1ff, 0x3ff
};
-int inside[9] = {
+const int inside[9] = {
0x0, 0x2, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe
};
@@ -60,7 +60,7 @@ int inside[9] = {
* These tables are used by the scanc instruction on the VAX to
* quickly find an appropriate fragment.
*/
-u_char fragtbl124[256] = {
+const u_char fragtbl124[256] = {
0x00, 0x16, 0x16, 0x2a, 0x16, 0x16, 0x26, 0x4e,
0x16, 0x16, 0x16, 0x3e, 0x2a, 0x3e, 0x4e, 0x8a,
0x16, 0x16, 0x16, 0x3e, 0x16, 0x16, 0x36, 0x5e,
@@ -95,7 +95,7 @@ u_char fragtbl124[256] = {
0x9e, 0x9e, 0x9e, 0xbe, 0xaa, 0xbe, 0xce, 0x8a,
};
-u_char fragtbl8[256] = {
+const u_char fragtbl8[256] = {
0x00, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x04,
0x01, 0x01, 0x01, 0x03, 0x02, 0x03, 0x04, 0x08,
0x01, 0x01, 0x01, 0x03, 0x01, 0x01, 0x03, 0x05,
@@ -133,6 +133,6 @@ u_char fragtbl8[256] = {
/*
* The actual fragtbl array.
*/
-u_char *fragtbl[MAXFRAG + 1] = {
+const u_char * const fragtbl[MAXFRAG + 1] = {
0, fragtbl124, fragtbl124, 0, fragtbl124, 0, 0, 0, fragtbl8,
};