Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Add const.
details: https://anonhg.NetBSD.org/src/rev/f1a43fbf4166
branches: trunk
changeset: 581695:f1a43fbf4166
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Jun 03 21:57:16 2005 +0000
description:
Add const.
diffstat:
sys/arch/sun68k/sun68k/autoconf.c | 8 ++++----
sys/arch/sun68k/sun68k/disksubr.c | 8 ++++----
sys/dev/vme/if_ie_vme.c | 12 ++++++------
sys/dev/vme/xy.c | 8 ++++----
4 files changed, 18 insertions(+), 18 deletions(-)
diffs (149 lines):
diff -r 7c6a18c2f14c -r f1a43fbf4166 sys/arch/sun68k/sun68k/autoconf.c
--- a/sys/arch/sun68k/sun68k/autoconf.c Fri Jun 03 21:40:56 2005 +0000
+++ b/sys/arch/sun68k/sun68k/autoconf.c Fri Jun 03 21:57:16 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.14 2005/01/22 15:36:12 chs Exp $ */
+/* $NetBSD: autoconf.c,v 1.15 2005/06/03 21:57:16 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.14 2005/01/22 15:36:12 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.15 2005/06/03 21:57:16 tsutsui Exp $");
#include "opt_kgdb.h"
@@ -309,7 +309,7 @@
int c;
for(val = 0;; val = (val << 4) + c, p++) {
- c = *((unsigned char *) p);
+ c = *((const unsigned char *) p);
if (c >= 'a') c-= ('a' + 10);
else if (c >= 'A') c -= ('A' + 10);
else if (c >= '0') c -= '0';
@@ -328,7 +328,7 @@
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 -r 7c6a18c2f14c -r f1a43fbf4166 sys/arch/sun68k/sun68k/disksubr.c
--- a/sys/arch/sun68k/sun68k/disksubr.c Fri Jun 03 21:40:56 2005 +0000
+++ b/sys/arch/sun68k/sun68k/disksubr.c Fri Jun 03 21:57:16 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.9 2005/01/22 15:36:12 chs Exp $ */
+/* $NetBSD: disksubr.c,v 1.10 2005/06/03 21:57:16 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -102,7 +102,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.9 2005/01/22 15:36:12 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.10 2005/06/03 21:57:16 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -118,7 +118,7 @@
#error "Default value of LABELSECTOR no longer zero?"
#endif
-static char * disklabel_sun_to_bsd(char *, struct disklabel *);
+static const char * disklabel_sun_to_bsd(char *, struct disklabel *);
static int disklabel_bsd_to_sun(struct disklabel *, char *);
/*
@@ -369,7 +369,7 @@
*
* The BSD label is cleared out before this is called.
*/
-static char *
+static const char *
disklabel_sun_to_bsd(char *cp, struct disklabel *lp)
{
struct sun_disklabel *sl;
diff -r 7c6a18c2f14c -r f1a43fbf4166 sys/dev/vme/if_ie_vme.c
--- a/sys/dev/vme/if_ie_vme.c Fri Jun 03 21:40:56 2005 +0000
+++ b/sys/dev/vme/if_ie_vme.c Fri Jun 03 21:57:16 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie_vme.c,v 1.20 2005/02/27 00:27:51 perry Exp $ */
+/* $NetBSD: if_ie_vme.c,v 1.21 2005/06/03 22:00:34 tsutsui Exp $ */
/*-
* Copyright (c) 1995 Charles D. Cranor
@@ -145,7 +145,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie_vme.c,v 1.20 2005/02/27 00:27:51 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie_vme.c,v 1.21 2005/06/03 22:00:34 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -365,9 +365,9 @@
size_t help;
if ((offset & 1) && ((u_long)p & 1) && size > 0) {
- bus_space_write_1(sc->bt, sc->bh, offset, *(u_int8_t *)p);
+ bus_space_write_1(sc->bt, sc->bh, offset, *(const u_int8_t *)p);
offset++;
- p = (u_int8_t *)p + 1;
+ p = (const u_int8_t *)p + 1;
size--;
}
@@ -382,8 +382,8 @@
return;
offset += 2 * help;
- p = (u_int16_t *)p + help;
- bus_space_write_1(sc->bt, sc->bh, offset, *(u_int8_t *)p);
+ p = (const u_int16_t *)p + help;
+ bus_space_write_1(sc->bt, sc->bh, offset, *(const u_int8_t *)p);
}
/* read a 16-bit value at BH offset */
diff -r 7c6a18c2f14c -r f1a43fbf4166 sys/dev/vme/xy.c
--- a/sys/dev/vme/xy.c Fri Jun 03 21:40:56 2005 +0000
+++ b/sys/dev/vme/xy.c Fri Jun 03 21:57:16 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xy.c,v 1.58 2005/02/27 00:27:51 perry Exp $ */
+/* $NetBSD: xy.c,v 1.59 2005/06/03 22:00:34 tsutsui Exp $ */
/*
*
@@ -51,7 +51,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.58 2005/02/27 00:27:51 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.59 2005/06/03 22:00:34 tsutsui Exp $");
#undef XYC_DEBUG /* full debug */
#undef XYC_DIAG /* extra sanity checks */
@@ -152,7 +152,7 @@
/* 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);
@@ -2289,7 +2289,7 @@
/*
* xyc_e2str: convert error code number into an error string
*/
-char *
+const char *
xyc_e2str(no)
int no;
{
Home |
Main Index |
Thread Index |
Old Index