Remove COMPAT ifdefs that might as well be comments (i.e., they cost us

almost nothing).
This commit is contained in:
ad 2008-11-14 13:33:55 +00:00
parent 462f2a64a0
commit df8183316d
4 changed files with 10 additions and 18 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_export.c,v 1.38 2008/05/10 02:26:10 rumble Exp $ */
/* $NetBSD: nfs_export.c,v 1.39 2008/11/14 13:33:55 ad Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005, 2008 The NetBSD Foundation, Inc.
@ -75,9 +75,8 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nfs_export.c,v 1.38 2008/05/10 02:26:10 rumble Exp $");
__KERNEL_RCSID(0, "$NetBSD: nfs_export.c,v 1.39 2008/11/14 13:33:55 ad Exp $");
#include "opt_compat_netbsd.h"
#include "opt_inet.h"
#include <sys/param.h>
@ -374,7 +373,6 @@ netexport_check(const fsid_t *fsid, struct mbuf *mb, struct mount **mpp,
return 0;
}
#ifdef COMPAT_30
/*
* Handles legacy export requests. In this case, the export information
* is hardcoded in a specific place of the mount arguments structure (given
@ -410,7 +408,6 @@ nfs_update_exports_30(struct mount *mp, const char *path,
return mountd_set_exports_list(&mel, l);
}
#endif
/*
* INTERNAL FUNCTIONS

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_syscalls.c,v 1.140 2008/10/09 14:38:21 christos Exp $ */
/* $NetBSD: nfs_syscalls.c,v 1.141 2008/11/14 13:33:56 ad Exp $ */
/*
* Copyright (c) 1989, 1993
@ -35,14 +35,13 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nfs_syscalls.c,v 1.140 2008/10/09 14:38:21 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: nfs_syscalls.c,v 1.141 2008/11/14 13:33:56 ad Exp $");
#include "fs_nfs.h"
#include "opt_nfs.h"
#include "opt_nfsserver.h"
#include "opt_iso.h"
#include "opt_inet.h"
#include "opt_compat_netbsd.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -182,8 +181,9 @@ sys_nfssvc(struct lwp *l, const struct sys_nfssvc_args *uap, register_t *retval)
mutex_exit(&nfsd_lock);
#endif
if (SCARG(uap, flag) & NFSSVC_BIOD) {
#if defined(NFS) && defined(COMPAT_14)
error = kpause("nfsbiod", true, 0, NULL); /* dummy impl */
#if defined(NFS)
/* Dummy implementation of nfsios for 1.4 and earlier. */
error = kpause("nfsbiod", true, 0, NULL);
#else
error = ENOSYS;
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_var.h,v 1.82 2008/10/22 12:29:35 matt Exp $ */
/* $NetBSD: nfs_var.h,v 1.83 2008/11/14 13:33:56 ad Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -298,8 +298,6 @@ int netexport_check(const fsid_t *, struct mbuf *, struct mount **, int *,
kauth_cred_t *);
void netexport_rdlock(void);
void netexport_rdunlock(void);
#ifdef COMPAT_30
int nfs_update_exports_30(struct mount *, const char *,
struct mnt_export_args30 *, struct lwp *);
#endif
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_vfsops.c,v 1.203 2008/10/22 12:29:35 matt Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.204 2008/11/14 13:33:56 ad Exp $ */
/*
* Copyright (c) 1989, 1993, 1995
@ -35,10 +35,9 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.203 2008/10/22 12:29:35 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.204 2008/11/14 13:33:56 ad Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
#include "opt_nfs.h"
#endif
@ -214,11 +213,9 @@ nfs_statvfs(mp, sbp)
tquad = ((quad_t)tquad / (quad_t)NFS_FABLKSIZE);
sbp->f_bresvd = sbp->f_bfree - tquad;
sbp->f_bavail = tquad;
#ifdef COMPAT_20
/* Handle older NFS servers returning negative values */
if ((quad_t)sbp->f_bavail < 0)
sbp->f_bavail = 0;
#endif
tquad = fxdr_hyper(&sfp->sf_tfiles);
sbp->f_files = tquad;
tquad = fxdr_hyper(&sfp->sf_ffiles);