make iftovt_tab[] const

This commit is contained in:
jdolecek 2003-02-25 23:01:39 +00:00
parent eb5e5b35c1
commit b06fa82f3e
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_subr.c,v 1.188 2003/02/18 20:37:38 jdolecek Exp $ */
/* $NetBSD: vfs_subr.c,v 1.189 2003/02/25 23:01:40 jdolecek Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.188 2003/02/18 20:37:38 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.189 2003/02/25 23:01:40 jdolecek Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@ -119,7 +119,7 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.188 2003/02/18 20:37:38 jdolecek Exp
#include <sys/sysctl.h>
enum vtype iftovt_tab[16] = {
const enum vtype iftovt_tab[16] = {
VNON, VFIFO, VCHR, VNON, VDIR, VNON, VBLK, VNON,
VREG, VNON, VLNK, VNON, VSOCK, VNON, VNON, VBAD,
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: vnode.h,v 1.103 2003/02/05 21:38:43 pk Exp $ */
/* $NetBSD: vnode.h,v 1.104 2003/02/25 23:01:39 jdolecek Exp $ */
/*
* Copyright (c) 1989, 1993
@ -241,7 +241,7 @@ struct vattr {
* Convert between vnode types and inode formats (since POSIX.1
* defines mode word of stat structure in terms of inode formats).
*/
extern enum vtype iftovt_tab[];
extern const enum vtype iftovt_tab[];
extern const int vttoif_tab[];
#define IFTOVT(mode) (iftovt_tab[((mode) & S_IFMT) >> 12])
#define VTTOIF(indx) (vttoif_tab[(int)(indx)])