diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-19 21:37:11 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-19 21:37:11 +0000 |
commit | b9721c272fdafa69ae8dde540ba28b38d58c30ec (patch) | |
tree | 5018992ff3070ae9b84caaa4aca5a1282ce4f1ea /sys | |
parent | 8a506a17e82b35a1f7c64e5f12d0209684db28d6 (diff) |
Constify.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sgi/sgi/autoconf.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sys/arch/sgi/sgi/autoconf.c b/sys/arch/sgi/sgi/autoconf.c index 981548945e8..99568a2d8fb 100644 --- a/sys/arch/sgi/sgi/autoconf.c +++ b/sys/arch/sgi/sgi/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.9 2004/12/25 23:02:25 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.10 2005/12/19 21:37:10 miod Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom * Copyright (c) 1995 Theo de Raadt @@ -63,19 +63,19 @@ void disk_configure(void); void rootconf(void); void swapconf(void); extern void dumpconf(void); -static int findblkmajor(struct device *); -static struct device * getdisk(char *, int, int, dev_t *); +int findblkmajor(struct device *); +struct device * getdisk(char *, int, int, dev_t *); struct device *getdevunit(char *, int); -struct devmap *boot_findtype(char *); +const struct devmap *boot_findtype(char *); int makebootdev(const char *, int); const char *boot_get_path_component(const char *, char *, int *); const char *boot_getnr(const char *, int *); /* Struct translating from ARCS to bsd. */ struct devmap { - char *att; - char *dev; - int what; + const char *att; + const char *dev; + int what; }; #define DEVMAP_TYPE 0x01 #define DEVMAP_UNIT 0x02 @@ -141,15 +141,15 @@ swapconf() * code in the sparc port to nuke the "options GENERIC" stuff. */ -static struct nam2blk { - char *name; +const struct nam2blk { + const char *name; int maj; } nam2blk[] = { { "sd", 0 }, /* 0 = sd */ { "wd", 4 }, /* 4 = wd */ }; -static int +int findblkmajor(dv) struct device *dv; { @@ -162,7 +162,7 @@ findblkmajor(dv) return (-1); } -static struct device * +struct device * getdisk(str, len, defpart, devp) char *str; int len, defpart; @@ -449,17 +449,17 @@ getdevunit(name, unit) return dev; } -struct devmap * +const struct devmap * boot_findtype(char *s) { - static struct devmap devmap[] = { + const struct devmap devmap[] = { { "scsi", "sd", DEVMAP_TYPE }, { "disk", "", DEVMAP_UNIT }, { "part", "", DEVMAP_PART }, { "partition", "", DEVMAP_PART }, { NULL, NULL } }; - struct devmap *dp = &devmap[0]; + const struct devmap *dp = &devmap[0]; while (dp->att) { if (strcmp (s, dp->att) == 0) { @@ -468,7 +468,7 @@ boot_findtype(char *s) dp++; } if (dp->att) - return dp ; + return dp; else return NULL; } @@ -485,7 +485,7 @@ makebootdev(const char *bp, int offs) char namebuf[256]; const char *cp, *ncp, *ecp, *devname; int i, unit, partition; - struct devmap *dp; + const struct devmap *dp; if (bp == NULL) return -1; |