summaryrefslogtreecommitdiff
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-08-26 16:10:58 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-08-26 16:10:58 +0000
commita0a0312e6f3f9885eeb318860cd884c7132fa23e (patch)
tree5285939d58453625566d1d270153fe04a561342e /sys/ufs/ffs
parent2104dfd054ea5c2131737dd3200cb8c9b686f753 (diff)
constify ffs_tables
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_tables.c13
-rw-r--r--sys/ufs/ffs/fs.h6
2 files changed, 10 insertions, 9 deletions
diff --git a/sys/ufs/ffs/ffs_tables.c b/sys/ufs/ffs/ffs_tables.c
index 5146599f611..9ab52b5c43b 100644
--- a/sys/ufs/ffs/ffs_tables.c
+++ b/sys/ufs/ffs/ffs_tables.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_tables.c,v 1.4 2003/06/02 23:28:23 millert Exp $ */
+/* $OpenBSD: ffs_tables.c,v 1.5 2003/08/26 16:10:57 mickey Exp $ */
/* $NetBSD: ffs_tables.c,v 1.2 1994/06/29 06:46:35 cgd Exp $ */
/*
@@ -33,15 +33,16 @@
*/
#include <sys/param.h>
+#include <ufs/ffs/fs.h>
/*
* 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
};
@@ -57,7 +58,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,
@@ -92,7 +93,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,
@@ -130,6 +131,6 @@ u_char fragtbl8[256] = {
/*
* The actual fragtbl array.
*/
-u_char *fragtbl[MAXFRAG + 1] = {
+const u_char *fragtbl[MAXFRAG + 1] = {
0, fragtbl124, fragtbl124, 0, fragtbl124, 0, 0, 0, fragtbl8,
};
diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h
index 7e58d88d679..231c9719039 100644
--- a/sys/ufs/ffs/fs.h
+++ b/sys/ufs/ffs/fs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fs.h,v 1.14 2003/08/25 23:26:55 tedu Exp $ */
+/* $OpenBSD: fs.h,v 1.15 2003/08/26 16:10:57 mickey Exp $ */
/* $NetBSD: fs.h,v 1.6 1995/04/12 21:21:02 mycroft Exp $ */
/*
@@ -530,5 +530,5 @@ struct ocg {
*/
#define NINDIR(fs) ((fs)->fs_nindir)
-extern int inside[], around[];
-extern u_char *fragtbl[];
+extern const int inside[], around[];
+extern const u_char *fragtbl[];