From 03aea31db41ffe8b8558c1e73a812e0094045230 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Fri, 3 Jun 2005 15:04:21 +0000 Subject: [PATCH] Constify. --- sys/arch/sun3/dev/fd.c | 10 +++++----- sys/arch/sun3/dev/if_ie_sebuf.c | 10 +++++----- sys/arch/sun3/dev/if_ie_vme.c | 10 +++++----- sys/arch/sun3/dev/memerr.c | 8 ++++---- sys/arch/sun3/dev/sevar.h | 4 ++-- sys/arch/sun3/dev/xy.c | 8 ++++---- sys/arch/sun3/dev/zs.c | 6 +++--- sys/arch/sun3/include/mon.h | 6 +++--- sys/arch/sun3/sun3/autoconf.c | 6 +++--- sys/arch/sun3/sun3/fpu.c | 8 ++++---- sys/arch/sun3/sun3/locore2.c | 6 +++--- sys/arch/sun3/sun3/machdep.h | 4 ++-- sys/arch/sun3/sun3/sunmon.c | 6 +++--- sys/arch/sun3/sun3/trap.c | 6 +++--- sys/arch/sun3/sun3x/machdep.c | 6 +++--- 15 files changed, 52 insertions(+), 52 deletions(-) diff --git a/sys/arch/sun3/dev/fd.c b/sys/arch/sun3/dev/fd.c index f3c03c879444..9d929b21ba52 100644 --- a/sys/arch/sun3/dev/fd.c +++ b/sys/arch/sun3/dev/fd.c @@ -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 -__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]; diff --git a/sys/arch/sun3/dev/if_ie_sebuf.c b/sys/arch/sun3/dev/if_ie_sebuf.c index 9bfc88dd7f4a..49069ca5b316 100644 --- a/sys/arch/sun3/dev/if_ie_sebuf.c +++ b/sys/arch/sun3/dev/if_ie_sebuf.c @@ -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 -__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; diff --git a/sys/arch/sun3/dev/if_ie_vme.c b/sys/arch/sun3/dev/if_ie_vme.c index f1aefec14c03..9a921c895f0a 100644 --- a/sys/arch/sun3/dev/if_ie_vme.c +++ b/sys/arch/sun3/dev/if_ie_vme.c @@ -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 -__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; diff --git a/sys/arch/sun3/dev/memerr.c b/sys/arch/sun3/dev/memerr.c index f786afa44d7f..5952bf836969 100644 --- a/sys/arch/sun3/dev/memerr.c +++ b/sys/arch/sun3/dev/memerr.c @@ -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 -__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 #include @@ -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? */ }; diff --git a/sys/arch/sun3/dev/sevar.h b/sys/arch/sun3/dev/sevar.h index 2256d47cbca3..c5afcafc6e83 100644 --- a/sys/arch/sun3/dev/sevar.h +++ b/sys/arch/sun3/dev/sevar.h @@ -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. */ diff --git a/sys/arch/sun3/dev/xy.c b/sys/arch/sun3/dev/xy.c index 16fc522899b6..c0a1300a76ee 100644 --- a/sys/arch/sun3/dev/xy.c +++ b/sys/arch/sun3/dev/xy.c @@ -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 -__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) { diff --git a/sys/arch/sun3/dev/zs.c b/sys/arch/sun3/dev/zs.c index 7b89a73bcd26..68493a3b6158 100644 --- a/sys/arch/sun3/dev/zs.c +++ b/sys/arch/sun3/dev/zs.c @@ -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 -__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" }; diff --git a/sys/arch/sun3/include/mon.h b/sys/arch/sun3/include/mon.h index d76b5ce51835..d7b63b7d5eb1 100644 --- a/sys/arch/sun3/include/mon.h +++ b/sys/arch/sun3/include/mon.h @@ -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 */ /* diff --git a/sys/arch/sun3/sun3/autoconf.c b/sys/arch/sun3/sun3/autoconf.c index ba1f9c428398..0f594546ab85 100644 --- a/sys/arch/sun3/sun3/autoconf.c +++ b/sys/arch/sun3/sun3/autoconf.c @@ -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 -__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 #include @@ -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]; diff --git a/sys/arch/sun3/sun3/fpu.c b/sys/arch/sun3/sun3/fpu.c index fbab98d007db..c3c847e2edd2 100644 --- a/sys/arch/sun3/sun3/fpu.c +++ b/sys/arch/sun3/sun3/fpu.c @@ -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 -__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" */ diff --git a/sys/arch/sun3/sun3/locore2.c b/sys/arch/sun3/sun3/locore2.c index 804efe91e47c..84b718d6a2fd 100644 --- a/sys/arch/sun3/sun3/locore2.c +++ b/sys/arch/sun3/sun3/locore2.c @@ -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 -__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; /* diff --git a/sys/arch/sun3/sun3/machdep.h b/sys/arch/sun3/sun3/machdep.h index e5de52560a52..543377ead022 100644 --- a/sys/arch/sun3/sun3/machdep.h +++ b/sys/arch/sun3/sun3/machdep.h @@ -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); diff --git a/sys/arch/sun3/sun3/sunmon.c b/sys/arch/sun3/sun3/sunmon.c index 4fb105ecbebf..38c9c7a103d8 100644 --- a/sys/arch/sun3/sun3/sunmon.c +++ b/sys/arch/sun3/sun3/sunmon.c @@ -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 -__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 #include @@ -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(); diff --git a/sys/arch/sun3/sun3/trap.c b/sys/arch/sun3/sun3/trap.c index 20c36c7bf47e..06078d4ec602 100644 --- a/sys/arch/sun3/sun3/trap.c +++ b/sys/arch/sun3/sun3/trap.c @@ -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 -__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", diff --git a/sys/arch/sun3/sun3x/machdep.c b/sys/arch/sun3/sun3x/machdep.c index 5dca9727f278..db53d8f19fdb 100644 --- a/sys/arch/sun3/sun3x/machdep.c +++ b/sys/arch/sun3/sun3x/machdep.c @@ -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 -__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;