sprinkle COMPAT_50

This commit is contained in:
pooka 2015-04-22 17:07:24 +00:00
parent 459ac4c7e6
commit aa5447362f
1 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs_compat.c,v 1.3 2014/11/10 18:46:33 maxv Exp $ */
/* $NetBSD: puffs_compat.c,v 1.4 2015/04/22 17:07:24 pooka Exp $ */
/*
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: puffs_compat.c,v 1.3 2014/11/10 18:46:33 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: puffs_compat.c,v 1.4 2015/04/22 17:07:24 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@ -157,6 +157,7 @@ struct puffs50_vnmsg_symlink {
* vattr translation routines
*/
#ifdef COMPAT_50
static void
vattr_to_50(const struct vattr *va, struct vattr50 *va50)
{
@ -206,6 +207,7 @@ vattr_from_50(const struct vattr50 *va50, struct vattr *va)
va->va_filerev = va50->va_filerev;
va->va_vaflags = va50->va_flags;
}
#endif /* COMPAT_50 */
/*
* XXX: cannot assert that sleeping is possible
@ -225,9 +227,10 @@ bool
puffs_compat_outgoing(struct puffs_req *oreq,
struct puffs_req **creqp, ssize_t *deltap)
{
bool rv = false;
#ifdef COMPAT_50
struct puffs_req *creq = NULL;
ssize_t delta = 0;
bool rv = false;
if (PUFFSOP_OPCLASS(oreq->preq_opclass) == PUFFSOP_VFS
&& oreq->preq_optype == PUFFS_VFS_FHTOVP) {
@ -330,6 +333,7 @@ puffs_compat_outgoing(struct puffs_req *oreq,
*deltap = delta;
rv = true;
}
#endif
return rv;
}
@ -346,6 +350,7 @@ void
puffs_compat_incoming(struct puffs_req *preq, struct puffs_req *creq)
{
#ifdef COMPAT_50
if (PUFFSOP_OPCLASS(preq->preq_opclass) == PUFFSOP_VFS
&& preq->preq_optype == PUFFS_VFS_FHTOVP) {
INIT(vfsmsg_fhtonode);
@ -433,4 +438,5 @@ puffs_compat_incoming(struct puffs_req *preq, struct puffs_req *creq)
panic("puffs compat ops come in pairs");
}
}
#endif /* COMPAT_50 */
}