From: Dale Ghent Date: Thu, 28 Dec 2006 22:25:41 +0000 (+0000) Subject: null-terminate-solaris-ops-20061228 X-Git-Tag: BP-openafs-windows-kdfs-ifs~891 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c4c90e33be7ce0954b603455c0aa77b667803d7a;p=packages%2Fo%2Fopenafs.git null-terminate-solaris-ops-20061228 FIXES 50340 vfsops and vnodeops need a NULL at the end of the structs --- diff --git a/src/afs/SOLARIS/osi_vfsops.c b/src/afs/SOLARIS/osi_vfsops.c index e287fe91a..d253a38d6 100644 --- a/src/afs/SOLARIS/osi_vfsops.c +++ b/src/afs/SOLARIS/osi_vfsops.c @@ -238,15 +238,17 @@ afs_swapvp(struct vfs *afsp, struct vnode **avpp, char *nm) #ifdef AFS_SUN510_ENV -struct fs_operation_def afs_vfsops_template[] = { - { VFSNAME_MOUNT, afs_mount }, - { VFSNAME_UNMOUNT, afs_unmount }, - { VFSNAME_ROOT, afs_root }, - { VFSNAME_STATVFS, afs_statvfs }, - { VFSNAME_SYNC, afs_sync }, - { VFSNAME_VGET, afs_vget }, - { VFSNAME_MOUNTROOT, afs_mountroot }, - { VFSNAME_FREEVFS, fs_freevfs }, +/* The following list must always be NULL-terminated */ +const fs_operation_def_t afs_vfsops_template[] = { + VFSNAME_MOUNT, afs_mount, + VFSNAME_UNMOUNT, afs_unmount, + VFSNAME_ROOT, afs_root, + VFSNAME_STATVFS, afs_statvfs, + VFSNAME_SYNC, afs_sync, + VFSNAME_VGET, afs_vget, + VFSNAME_MOUNTROOT, afs_mountroot, + VFSNAME_FREEVFS, fs_freevfs, + NULL, NULL }; struct vfsops *afs_vfsopsp; #else diff --git a/src/afs/SOLARIS/osi_vnodeops.c b/src/afs/SOLARIS/osi_vnodeops.c index d55387ded..05b027385 100644 --- a/src/afs/SOLARIS/osi_vnodeops.c +++ b/src/afs/SOLARIS/osi_vnodeops.c @@ -1442,51 +1442,52 @@ extern int afs_lockctl(); extern void gafs_inactive(); #ifdef AFS_SUN510_ENV -struct fs_operation_def afs_vnodeops_template[] = { - { VOPNAME_OPEN, gafs_open }, - { VOPNAME_CLOSE, gafs_close }, - { VOPNAME_READ, afs_vmread }, - { VOPNAME_WRITE, afs_vmwrite }, - { VOPNAME_IOCTL, afs_ioctl }, - { VOPNAME_SETFL, fs_setfl }, - { VOPNAME_GETATTR, gafs_getattr }, - { VOPNAME_SETATTR, gafs_setattr }, - { VOPNAME_ACCESS, gafs_access }, - { VOPNAME_LOOKUP, gafs_lookup }, - { VOPNAME_CREATE, gafs_create }, - { VOPNAME_REMOVE, gafs_remove }, - { VOPNAME_LINK, gafs_link }, - { VOPNAME_RENAME, gafs_rename }, - { VOPNAME_MKDIR, gafs_mkdir }, - { VOPNAME_RMDIR, gafs_rmdir }, - { VOPNAME_READDIR, gafs_readdir }, - { VOPNAME_SYMLINK, gafs_symlink }, - { VOPNAME_READLINK, gafs_readlink }, - { VOPNAME_FSYNC, gafs_fsync }, - { VOPNAME_INACTIVE, gafs_inactive }, - { VOPNAME_FID, gafs_fid }, - { VOPNAME_RWLOCK, afs_rwlock }, - { VOPNAME_RWUNLOCK, afs_rwunlock }, - { VOPNAME_SEEK, afs_seek }, - { VOPNAME_CMP, afs_cmp }, - { VOPNAME_FRLOCK, afs_frlock }, - { VOPNAME_SPACE, afs_space }, - { VOPNAME_REALVP, afs_realvp }, - { VOPNAME_GETPAGE, afs_getpage }, - { VOPNAME_PUTPAGE, afs_putpage }, - { VOPNAME_MAP, afs_map }, - { VOPNAME_ADDMAP, afs_addmap }, - { VOPNAME_DELMAP, afs_delmap }, - { VOPNAME_POLL, fs_poll }, - { VOPNAME_DUMP, afs_dump }, - { VOPNAME_PATHCONF, afs_pathconf }, - { VOPNAME_PAGEIO, afs_pageio }, - { VOPNAME_DUMPCTL, afs_dumpctl }, - { VOPNAME_DISPOSE, afs_dispose }, - { VOPNAME_GETSECATTR, afs_getsecattr }, - { VOPNAME_SETSECATTR, afs_setsecattr }, - { VOPNAME_SHRLOCK, fs_shrlock }, - NULL, +/* The following list must always be NULL-terminated */ +const fs_operation_def_t afs_vnodeops_template[] = { + VOPNAME_OPEN, gafs_open, + VOPNAME_CLOSE, gafs_close, + VOPNAME_READ, afs_vmread, + VOPNAME_WRITE, afs_vmwrite, + VOPNAME_IOCTL, afs_ioctl, + VOPNAME_SETFL, fs_setfl, + VOPNAME_GETATTR, gafs_getattr, + VOPNAME_SETATTR, gafs_setattr, + VOPNAME_ACCESS, gafs_access, + VOPNAME_LOOKUP, gafs_lookup, + VOPNAME_CREATE, gafs_create, + VOPNAME_REMOVE, gafs_remove, + VOPNAME_LINK, gafs_link, + VOPNAME_RENAME, gafs_rename, + VOPNAME_MKDIR, gafs_mkdir, + VOPNAME_RMDIR, gafs_rmdir, + VOPNAME_READDIR, gafs_readdir, + VOPNAME_SYMLINK, gafs_symlink, + VOPNAME_READLINK, gafs_readlink, + VOPNAME_FSYNC, gafs_fsync, + VOPNAME_INACTIVE, gafs_inactive, + VOPNAME_FID, gafs_fid, + VOPNAME_RWLOCK, afs_rwlock, + VOPNAME_RWUNLOCK, afs_rwunlock, + VOPNAME_SEEK, afs_seek, + VOPNAME_CMP, afs_cmp, + VOPNAME_FRLOCK, afs_frlock, + VOPNAME_SPACE, afs_space, + VOPNAME_REALVP, afs_realvp, + VOPNAME_GETPAGE, afs_getpage, + VOPNAME_PUTPAGE, afs_putpage, + VOPNAME_MAP, afs_map, + VOPNAME_ADDMAP, afs_addmap, + VOPNAME_DELMAP, afs_delmap, + VOPNAME_POLL, fs_poll, + VOPNAME_DUMP, afs_dump, + VOPNAME_PATHCONF, afs_pathconf, + VOPNAME_PAGEIO, afs_pageio, + VOPNAME_DUMPCTL, afs_dumpctl, + VOPNAME_DISPOSE, afs_dispose, + VOPNAME_GETSECATTR, afs_getsecattr, + VOPNAME_SETSECATTR, afs_setsecattr, + VOPNAME_SHRLOCK, fs_shrlock, + NULL, NULL }; struct vnodeops *afs_ops; #else