From a5403d89c2ba8a650798cf29f2b84282f25a08a7 Mon Sep 17 00:00:00 2001 From: imp Date: Thu, 1 Jun 2006 19:01:47 +0000 Subject: Cope with -Wundef. This means including xfs_macros.h early in a few more files and changing #if XXXKAN -> #ifdef XXXKAN. # this is just compile tested, since I don't have xfs partitions. --- sys/gnu/fs/xfs/FreeBSD/xfs_frw.c | 7 ++++--- sys/gnu/fs/xfs/FreeBSD/xfs_fs_subr.c | 6 +++--- sys/gnu/fs/xfs/FreeBSD/xfs_iget.c | 4 ++-- sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c | 3 ++- sys/gnu/fs/xfs/FreeBSD/xfs_super.c | 1 + sys/gnu/fs/xfs/xfs_attr.c | 6 +++--- sys/gnu/fs/xfs/xfs_dfrag.c | 2 +- sys/gnu/fs/xfs/xfs_dir2_trace.c | 1 + sys/gnu/fs/xfs/xfs_inode.c | 6 +++--- sys/gnu/fs/xfs/xfs_iomap.c | 1 + sys/gnu/fs/xfs/xfs_trans.c | 2 +- sys/gnu/fs/xfs/xfs_vfsops.c | 2 +- sys/gnu/fs/xfs/xfs_vnodeops.c | 2 +- 13 files changed, 24 insertions(+), 19 deletions(-) (limited to 'sys/gnu') diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_frw.c b/sys/gnu/fs/xfs/FreeBSD/xfs_frw.c index ac9f2dc..6007d41 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_frw.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_frw.c @@ -36,6 +36,7 @@ #include "xfs.h" +#include "xfs_macros.h" #include "xfs_fs.h" #include "xfs_inum.h" #include "xfs_log.h" @@ -156,7 +157,7 @@ xfs_iozero( size_t count, /* size of data to zero */ loff_t end_size) /* max file size to set */ { -#if XXXKAN +#ifdef XXXKAN unsigned bytes; struct page *page; struct address_space *mapping; @@ -307,7 +308,7 @@ xfs_read( if (!(ioflags & IO_ISLOCKED)) xfs_ilock(ip, XFS_IOLOCK_SHARED); -#if XXXKAN +#ifdef XXXKAN if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) && !(ioflags & IO_INVIS)) { int error; @@ -581,7 +582,7 @@ xfs_write( int ioflags, cred_t *credp) { -#if XXXKAN +#ifdef XXXKAN xfs_inode_t *xip; xfs_mount_t *mp; ssize_t ret; diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_fs_subr.c b/sys/gnu/fs/xfs/FreeBSD/xfs_fs_subr.c index 5a581ab..dec6e2f 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_fs_subr.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_fs_subr.c @@ -70,7 +70,7 @@ fs_tosspages( xfs_off_t last, int fiopt) { -#if XXXKAN +#ifdef XXXKAN vnode_t *vp = BHV_TO_VNODE(bdp); struct inode *ip = LINVFS_GET_IP(vp); @@ -91,7 +91,7 @@ fs_flushinval_pages( xfs_off_t last, int fiopt) { -#if XXXKAN +#ifdef XXXKAN vnode_t *vp = BHV_TO_VNODE(bdp); struct inode *ip = LINVFS_GET_IP(vp); @@ -117,7 +117,7 @@ fs_flush_pages( uint64_t flags, int fiopt) { -#if XXXKAN +#ifdef XXXKAN vnode_t *vp = BHV_TO_VNODE(bdp); struct inode *ip = LINVFS_GET_IP(vp); diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_iget.c b/sys/gnu/fs/xfs/FreeBSD/xfs_iget.c index 45485bb..766d8c2 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_iget.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_iget.c @@ -435,7 +435,7 @@ xfs_inode_lock_init( mrlock_init(&ip->i_lock, MRLOCK_ALLOW_EQUAL_PRI|MRLOCK_BARRIER, "xfsino", (long)vp->v_number); mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", vp->v_number); -#if XXXKAN +#ifdef XXXKAN init_waitqueue_head(&ip->i_ipin_wait); #endif atomic_set(&ip->i_pincount, 0); @@ -653,7 +653,7 @@ xfs_iextract( } } -#if XXXKAN +#ifdef XXXKAN /* * Not sure if while i_reclaim crap is needed on * FreeBSD, will revisit this later. diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c b/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c index 40c3159..323a1c0 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c @@ -32,6 +32,7 @@ #include "xfs.h" +#include "xfs_macros.h" #include "xfs_fs.h" #include "xfs_inum.h" #include "xfs_log.h" @@ -68,7 +69,7 @@ #include "xfs_fsops.h" -#if XXXKAN +#ifdef XXXKAN /* * ioctl commands that are used by Linux filesystems */ diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_super.c b/sys/gnu/fs/xfs/FreeBSD/xfs_super.c index 7f23f42..b971287 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_super.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_super.c @@ -32,6 +32,7 @@ #include "xfs.h" +#include "xfs_macros.h" #include "xfs_inum.h" #include "xfs_log.h" #include "xfs_clnt.h" diff --git a/sys/gnu/fs/xfs/xfs_attr.c b/sys/gnu/fs/xfs/xfs_attr.c index 0399c45..edf26d4 100644 --- a/sys/gnu/fs/xfs/xfs_attr.c +++ b/sys/gnu/fs/xfs/xfs_attr.c @@ -2560,7 +2560,7 @@ attr_user_capable( struct xfs_vnode *vp, cred_t *cred) { -#if XXXKAN +#ifdef XXXKAN struct inode *inode = LINVFS_GET_IP(vp); if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) @@ -2580,7 +2580,7 @@ attr_trusted_capable( struct xfs_vnode *vp, cred_t *cred) { -#if XXXKAN +#ifdef XXXKAN struct inode *inode = LINVFS_GET_IP(vp); if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) @@ -2613,7 +2613,7 @@ attr_system_set( if (!namesp) return -EOPNOTSUPP; error = namesp->attr_set(vp, name, data, size, xflags); -#if XXXKAN +#ifdef XXXKAN if (!error) error = vn_revalidate(vp); #endif diff --git a/sys/gnu/fs/xfs/xfs_dfrag.c b/sys/gnu/fs/xfs/xfs_dfrag.c index dcd0939..c6dd0ad 100644 --- a/sys/gnu/fs/xfs/xfs_dfrag.c +++ b/sys/gnu/fs/xfs/xfs_dfrag.c @@ -350,7 +350,7 @@ xfs_swapext( break; } -#if XXXKAN /* Not necessary, vnodes are vrefed already by fgetvp */ +#ifdef XXXKAN /* Not necessary, vnodes are vrefed already by fgetvp */ /* * Increment vnode ref counts since xfs_trans_commit & * xfs_trans_cancel will both unlock the inodes and diff --git a/sys/gnu/fs/xfs/xfs_dir2_trace.c b/sys/gnu/fs/xfs/xfs_dir2_trace.c index c674716..296b7b8 100644 --- a/sys/gnu/fs/xfs/xfs_dir2_trace.c +++ b/sys/gnu/fs/xfs/xfs_dir2_trace.c @@ -36,6 +36,7 @@ */ #include "xfs.h" +#include "xfs_macros.h" #include "xfs_types.h" #include "xfs_inum.h" #include "xfs_dir.h" diff --git a/sys/gnu/fs/xfs/xfs_inode.c b/sys/gnu/fs/xfs/xfs_inode.c index 0d02ccc..c639de6 100644 --- a/sys/gnu/fs/xfs/xfs_inode.c +++ b/sys/gnu/fs/xfs/xfs_inode.c @@ -2762,7 +2762,7 @@ xfs_iunpin( ASSERT(atomic_read(&ip->i_pincount) > 0); if (atomic_dec_and_test(&ip->i_pincount)) { -#if XXXKAN +#ifdef XXXKAN /* * Should I mark FreeBSD vnode as dirty here? */ @@ -3645,7 +3645,7 @@ xfs_iaccess( (S_ISREG(imode) || S_ISDIR(imode) || S_ISLNK(imode))) return XFS_ERROR(EROFS); -#if XXXKAN +#ifdef XXXKAN if (IS_IMMUTABLE(inode)) return XFS_ERROR(EACCES); #endif @@ -3750,7 +3750,7 @@ xfs_ichgtime(xfs_inode_t *ip, */ SYNCHRONIZE(); ip->i_update_core = 1; -#if XXXKAN +#ifdef XXXKAN if (!(inode->i_state & I_LOCK)) mark_inode_dirty_sync(inode); diff --git a/sys/gnu/fs/xfs/xfs_iomap.c b/sys/gnu/fs/xfs/xfs_iomap.c index 460dbcc..8d4a79a 100644 --- a/sys/gnu/fs/xfs/xfs_iomap.c +++ b/sys/gnu/fs/xfs/xfs_iomap.c @@ -32,6 +32,7 @@ #include "xfs.h" +#include "xfs_macros.h" #include "xfs_fs.h" #include "xfs_inum.h" #include "xfs_log.h" diff --git a/sys/gnu/fs/xfs/xfs_trans.c b/sys/gnu/fs/xfs/xfs_trans.c index 720c822..d614ab3 100644 --- a/sys/gnu/fs/xfs/xfs_trans.c +++ b/sys/gnu/fs/xfs/xfs_trans.c @@ -537,7 +537,7 @@ xfs_trans_apply_sb_deltas( offsetof(xfs_sb_t, sb_frextents) + sizeof(sbp->sb_frextents) - 1); -#if XXXKAN +#ifdef XXXKAN XFS_MTOVFS(tp->t_mountp)->vfs_super->s_dirt = 1; #endif printf("XFS_MTOVFS(tp->t_mountp)->vfs_super->s_dirt = 1;"); diff --git a/sys/gnu/fs/xfs/xfs_vfsops.c b/sys/gnu/fs/xfs/xfs_vfsops.c index 0151891..2aa2932 100644 --- a/sys/gnu/fs/xfs/xfs_vfsops.c +++ b/sys/gnu/fs/xfs/xfs_vfsops.c @@ -834,7 +834,7 @@ xfs_statvfs( statp->f_fsid.val[0] = dev2udev(mp->m_dev); statp->f_fsid.val[1] = 0; -#if XXXKAN /* not defined for FreeBSD */ +#ifdef XXXKAN /* not defined for FreeBSD */ statp->f_namelen = MAXNAMELEN - 1; #endif return 0; diff --git a/sys/gnu/fs/xfs/xfs_vnodeops.c b/sys/gnu/fs/xfs/xfs_vnodeops.c index 8b33054..b35950e 100644 --- a/sys/gnu/fs/xfs/xfs_vnodeops.c +++ b/sys/gnu/fs/xfs/xfs_vnodeops.c @@ -3424,7 +3424,7 @@ xfs_symlink( udqp = gdqp = NULL; -#if XXXKAN +#ifdef XXXKAN if (vap->va_mask & XFS_AT_PROJID) prid = (xfs_prid_t)vap->va_projid; else -- cgit v1.1