Constify.

This commit is contained in:
tsutsui 2005-06-03 15:04:21 +00:00
parent 65ae0ba36c
commit 03aea31db4
15 changed files with 52 additions and 52 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fd.c,v 1.42 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: fd.c,v 1.43 2005/06/03 15:04:21 tsutsui Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.42 2005/01/22 15:36:10 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.43 2005/06/03 15:04:21 tsutsui Exp $");
#include "opt_ddb.h"
@ -211,7 +211,7 @@ struct fd_type {
int rate; /* transfer speed code */
int fillbyte; /* format fill byte */
int interleave; /* interleave factor (formatting) */
char *name;
const char *name;
};
/* The order of entries in the following table is important -- BEWARE! */
@ -297,7 +297,7 @@ void fd_motor_on(void *);
int fdcresult(struct fdc_softc *);
int out_fdc(struct fdc_softc *, u_char);
void fdcstart(struct fdc_softc *);
void fdcstatus(struct device *, int, char *);
void fdcstatus(struct device *, int, const char *);
void fdc_reset(struct fdc_softc *);
void fdctimeout(void *);
void fdcpseudointr(void *);
@ -933,7 +933,7 @@ fdcstart(struct fdc_softc *fdc)
}
void
fdcstatus(struct device *dv, int n, char *s)
fdcstatus(struct device *dv, int n, const char *s)
{
struct fdc_softc *fdc = (void *)dv->dv_parent;
char bits[64];

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie_sebuf.c,v 1.11 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: if_ie_sebuf.c,v 1.12 2005/06/03 15:04:21 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ie_sebuf.c,v 1.11 2005/01/22 15:36:10 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ie_sebuf.c,v 1.12 2005/06/03 15:04:21 tsutsui Exp $");
#include "opt_inet.h"
@ -261,7 +261,7 @@ wmemcpy(void *dst, const void *src, size_t l)
{
const u_char *b1e, *b1 = src;
u_char *b2 = dst;
u_short *sp;
const u_short *sp;
int bstore = 0;
if (l == 0)
@ -274,13 +274,13 @@ wmemcpy(void *dst, const void *src, size_t l)
}
/* middle, */
sp = (u_short *)b1;
sp = (const u_short *)b1;
b1e = b1 + l;
if (l & 1)
b1e--;
bstore = (u_long)b2 & 1;
while (sp < (u_short *)b1e) {
while (sp < (const u_short *)b1e) {
if (bstore) {
b2[1] = *sp & 0xff;
b2[0] = *sp >> 8;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie_vme.c,v 1.18 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: if_ie_vme.c,v 1.19 2005/06/03 15:04:21 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ie_vme.c,v 1.18 2005/01/22 15:36:10 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ie_vme.c,v 1.19 2005/06/03 15:04:21 tsutsui Exp $");
#include "opt_inet.h"
@ -265,7 +265,7 @@ wmemcpy(void *dst, const void *src, size_t l)
{
const u_char *b1e, *b1 = src;
u_char *b2 = dst;
u_short *sp;
const u_short *sp;
int bstore = 0;
if (l == 0)
@ -278,13 +278,13 @@ wmemcpy(void *dst, const void *src, size_t l)
}
/* middle, */
sp = (u_short *)b1;
sp = (const u_short *)b1;
b1e = b1 + l;
if (l & 1)
b1e--;
bstore = (u_long)b2 & 1;
while (sp < (u_short *)b1e) {
while (sp < (const u_short *)b1e) {
if (bstore) {
b2[1] = *sp & 0xff;
b2[0] = *sp >> 8;

View File

@ -1,4 +1,4 @@
/* $NetBSD: memerr.c,v 1.17 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: memerr.c,v 1.18 2005/06/03 15:04:21 tsutsui Exp $ */
/*
* Copyright (c) 1992, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: memerr.c,v 1.17 2005/01/22 15:36:10 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: memerr.c,v 1.18 2005/06/03 15:04:21 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -66,8 +66,8 @@ struct memerr_softc {
struct device sc_dev;
struct memerr *sc_reg;
enum memerr_type sc_type;
char *sc_typename; /* "Parity" or "ECC" */
char *sc_csrbits; /* how to print csr bits */
const char *sc_typename; /* "Parity" or "ECC" */
const char *sc_csrbits; /* how to print csr bits */
/* XXX: counters? */
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: sevar.h,v 1.1 1997/10/17 03:39:50 gwr Exp $ */
/* $NetBSD: sevar.h,v 1.2 2005/06/03 15:04:21 tsutsui Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
struct sebuf_attach_args {
struct confargs ca;
char *name; /* name of child (se, ie) */
const char *name; /* name of child (se, ie) */
char *buf; /* KVA, pre-mapped. */
int blen; /* length of above */
void *regs; /* KVA of regs. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: xy.c,v 1.50 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: xy.c,v 1.51 2005/06/03 15:04:21 tsutsui Exp $ */
/*
*
@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.50 2005/01/22 15:36:10 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.51 2005/06/03 15:04:21 tsutsui Exp $");
#undef XYC_DEBUG /* full debug */
#undef XYC_DIAG /* extra sanity checks */
@ -160,7 +160,7 @@ __KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.50 2005/01/22 15:36:10 chs Exp $");
/* internals */
struct xy_iopb *xyc_chain(struct xyc_softc *, struct xy_iorq *);
int xyc_cmd(struct xyc_softc *, int, int, int, int, int, char *, int);
char *xyc_e2str(int);
const char *xyc_e2str(int);
int xyc_entoact(int);
int xyc_error(struct xyc_softc *, struct xy_iorq *, struct xy_iopb *, int);
int xyc_ioctlcmd(struct xy_softc *, dev_t dev, struct xd_iocmd *);
@ -1981,7 +1981,7 @@ done:
/*
* xyc_e2str: convert error code number into an error string
*/
char *
const char *
xyc_e2str(int no)
{
switch (no) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: zs.c,v 1.73 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: zs.c,v 1.74 2005/06/03 15:04:21 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.73 2005/01/22 15:36:10 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.74 2005/06/03 15:04:21 tsutsui Exp $");
#include "opt_kgdb.h"
@ -780,7 +780,7 @@ static struct {
{ 0, 1 }, /* ttyd */
};
static char *prom_inSrc_name[] = {
static const char *prom_inSrc_name[] = {
"keyboard/display",
"ttya", "ttyb",
"ttyc", "ttyd" };

View File

@ -1,4 +1,4 @@
/* $NetBSD: mon.h,v 1.25 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: mon.h,v 1.26 2005/06/03 15:04:21 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -161,7 +161,7 @@ struct sunromvec {
* Reboot interface routine -- resets and reboots system. No return.
*/
int (*reBoot)(char *); /* e.g. reBoot("xy()vmunix") */
int (*reBoot)(const char *); /* e.g. reBoot("xy()vmunix") */
/*
* Line input and parsing
@ -180,7 +180,7 @@ struct sunromvec {
* Print formatted output to current output sink
*/
int (*printf)(char *, ...); /* Like kernel printf */
int (*printf)(const char *, ...); /* Like kernel printf */
int (*printHex)(int, int); /* Format N digits in hex */
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.62 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: autoconf.c,v 1.63 2005/06/03 15:04:21 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.62 2005/01/22 15:36:10 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.63 2005/06/03 15:04:21 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -195,7 +195,7 @@ cpu_rootconf(void)
struct prom_n2f *nf;
struct device *boot_device;
int boot_partition;
char *devname;
const char *devname;
findfunc_t find;
char promname[4];
char partname[4];

View File

@ -1,4 +1,4 @@
/* $NetBSD: fpu.c,v 1.20 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: fpu.c,v 1.21 2005/06/03 15:04:21 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.20 2005/01/22 15:36:10 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.21 2005/06/03 15:04:21 tsutsui Exp $");
#include "opt_fpu_emulate.h"
@ -56,7 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.20 2005/01/22 15:36:10 chs Exp $");
static int fpu_probe(void);
static char *fpu_descr[] = {
static const char *fpu_descr[] = {
#ifdef FPU_EMULATE
"emulator", /* 0 */
#else
@ -71,7 +71,7 @@ static char *fpu_descr[] = {
void
initfpu(void)
{
char *descr;
const char *descr;
int maxtype = sizeof(fpu_descr) / sizeof(fpu_descr[0]) - 1;
/* Set the FPU bit in the "system enable register" */

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore2.c,v 1.84 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: locore2.c,v 1.85 2005/06/03 15:04:21 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.84 2005/01/22 15:36:10 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.85 2005/06/03 15:04:21 tsutsui Exp $");
#include "opt_ddb.h"
@ -92,7 +92,7 @@ int mmutype = MMU_SUN;
*/
u_char cpu_machine_id = 0;
char *cpu_string = NULL;
const char *cpu_string = NULL;
int cpu_has_vme = 0;
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.h,v 1.32 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: machdep.h,v 1.33 2005/06/03 15:04:21 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@ -140,7 +140,7 @@ void setvbr(void **);
void sunmon_abort(void);
void sunmon_halt(void);
void sunmon_init(void);
void sunmon_reboot(char *);
void sunmon_reboot(const char *);
void swapconf(void);

View File

@ -1,4 +1,4 @@
/* $NetBSD: sunmon.c,v 1.14 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: sunmon.c,v 1.15 2005/06/03 15:04:21 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sunmon.c,v 1.14 2005/01/22 15:36:10 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: sunmon.c,v 1.15 2005/06/03 15:04:21 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -148,7 +148,7 @@ sunmon_halt(void)
* Caller must pass a string that is in our data segment.
*/
void
sunmon_reboot(char *bs)
sunmon_reboot(const char *bs)
{
(void) splhigh();

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.118 2005/01/22 15:36:10 chs Exp $ */
/* $NetBSD: trap.c,v 1.119 2005/06/03 15:04:21 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.118 2005/01/22 15:36:10 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.119 2005/06/03 15:04:21 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_execfmt.h"
@ -153,7 +153,7 @@ static void userret(struct lwp *, struct trapframe *, u_quad_t);
int astpending;
int want_resched;
char *trap_type[] = {
const char *trap_type[] = {
"Bus error",
"Address error",
"Illegal instruction",

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.99 2005/04/25 15:02:07 lukem Exp $ */
/* $NetBSD: machdep.c,v 1.100 2005/06/03 15:04:21 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.99 2005/04/25 15:02:07 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.100 2005/06/03 15:04:21 tsutsui Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@ -159,7 +159,7 @@ union sun3sir sun3sir;
int safepri = PSL_LOWIPL;
u_char cpu_machine_id = 0;
char *cpu_string = NULL;
const char *cpu_string = NULL;
int cpu_has_vme = 0;
int has_iocache = 0;