From aa5447362ff123bd1733ea95fc4ae651f2e298d1 Mon Sep 17 00:00:00 2001 From: pooka Date: Wed, 22 Apr 2015 17:07:24 +0000 Subject: [PATCH] sprinkle COMPAT_50 --- sys/fs/puffs/puffs_compat.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/fs/puffs/puffs_compat.c b/sys/fs/puffs/puffs_compat.c index f3f15a3ac76a..31072b67f061 100644 --- a/sys/fs/puffs/puffs_compat.c +++ b/sys/fs/puffs/puffs_compat.c @@ -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 -__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 #include @@ -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 */ }