[4492] in arla-drinkers
PATCH: Arla CVS Current on OpenBSD 4.4 (and 4.3)
daemon@ATHENA.MIT.EDU (=?ISO-8859-1?Q?Bo_Brant=E9n?=)
Sat Nov 1 08:52:02 2008
From arla-drinkers-bounces@stacken.kth.se Sat Nov 01 12:52:02 2008
Return-Path: <arla-drinkers-bounces@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 7593 invoked from network); 1 Nov 2008 12:52:02 -0000
Received: from mx2.kth.se (130.237.48.98)
by charon.mit.edu with SMTP; 1 Nov 2008 12:52:02 -0000
Received: from localhost (localhost [127.0.0.1])
by mx2.kth.se (Postfix) with ESMTP id 289671097D2;
Sat, 1 Nov 2008 13:52:00 +0100 (CET)
X-Virus-Scanned: by amavisd-new at kth.se
Received: from mx2.kth.se ([127.0.0.1])
by localhost (mx2.kth.se [127.0.0.1]) (amavisd-new, port 10024)
with LMTP id e9QUHiqXSkPL; Sat, 1 Nov 2008 13:51:58 +0100 (CET)
Received: from tapas.stacken.kth.se (tapas.stacken.kth.se [130.237.234.140])
by mx2.kth.se (Postfix) with ESMTP id 4907A109707;
Sat, 1 Nov 2008 13:51:53 +0100 (CET)
Received: from tapas.stacken.kth.se (localhost [127.0.0.1])
by tapas.stacken.kth.se (Postfix) with ESMTP id A606851DEA;
Sat, 1 Nov 2008 13:51:52 +0100 (CET)
X-Original-To: arla-drinkers@tapas.stacken.kth.se
Delivered-To: arla-drinkers@tapas.stacken.kth.se
Received: from brev.stacken.kth.se (brev.stacken.kth.se [130.237.234.84])
by tapas.stacken.kth.se (Postfix) with ESMTP id EAD0551DEA
for <arla-drinkers@tapas.stacken.kth.se>;
Sat, 1 Nov 2008 13:51:49 +0100 (CET)
Received: from mx3.kth.se (mx3.kth.se [130.237.48.97])
by brev.stacken.kth.se (8.12.10/8.12.10) with ESMTP id mA1CpnvG023137
for <arla-drinkers@stacken.kth.se>; Sat, 1 Nov 2008 13:51:49 +0100 (MET)
Received: from localhost (localhost [127.0.0.1])
by mx3.kth.se (Postfix) with ESMTP id D536A681BC
for <arla-drinkers@stacken.kth.se>;
Sat, 1 Nov 2008 13:51:43 +0100 (CET)
X-Virus-Scanned: by amavisd-new at kth.se
Received: from mx3.kth.se ([127.0.0.1])
by localhost (mx3.kth.se [127.0.0.1]) (amavisd-new, port 10024)
with LMTP id 6de2pPuYFXbk for <arla-drinkers@stacken.kth.se>;
Sat, 1 Nov 2008 13:51:40 +0100 (CET)
Received: from mail.acc.umu.se (mail.acc.umu.se [IPv6:2001:6b0:e:2018::156])
by mx3.kth.se (Postfix) with ESMTP id 6372168134
for <arla-drinkers@stacken.kth.se>;
Sat, 1 Nov 2008 13:51:40 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
by amavisd-new (Postfix) with ESMTP id 329FA53B
for <arla-drinkers@stacken.kth.se>;
Sat, 1 Nov 2008 13:51:40 +0100 (MET)
X-Virus-Scanned: amavisd-new at acc.umu.se
Received: from stalin.acc.umu.se (stalin.acc.umu.se [130.239.18.135])
by mail.acc.umu.se (Postfix) with ESMTP id B765953A
for <arla-drinkers@stacken.kth.se>;
Sat, 1 Nov 2008 13:51:38 +0100 (MET)
Received: by stalin.acc.umu.se (Postfix, from userid 10005)
id 948C42C; Sat, 1 Nov 2008 13:51:38 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
by stalin.acc.umu.se (Postfix) with ESMTP id 816D72B
for <arla-drinkers@stacken.kth.se>;
Sat, 1 Nov 2008 13:51:38 +0100 (CET)
Date: Sat, 1 Nov 2008 13:51:38 +0100 (CET)
From: =?ISO-8859-1?Q?Bo_Brant=E9n?= <bosse@acc.umu.se>
To: arla-drinkers@stacken.kth.se
Subject: PATCH: Arla CVS Current on OpenBSD 4.4 (and 4.3)
Message-ID: <Pine.A41.4.64.0811011347150.790648@stalin.acc.umu.se>
MIME-Version: 1.0
X-BeenThere: arla-drinkers@stacken.kth.se
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: Arla discussions <arla-drinkers.stacken.kth.se>
List-Unsubscribe: <https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers>,
<mailto:arla-drinkers-request@stacken.kth.se?subject=unsubscribe>
List-Archive: <http://lists.stacken.kth.se/pipermail/arla-drinkers>
List-Post: <mailto:arla-drinkers@stacken.kth.se>
List-Help: <mailto:arla-drinkers-request@stacken.kth.se?subject=help>
List-Subscribe: <https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers>,
<mailto:arla-drinkers-request@stacken.kth.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: arla-drinkers-bounces@stacken.kth.se
Errors-To: arla-drinkers-bounces@stacken.kth.se
Here is a patch for Arla CVS Current on OpenBSD 4.4 and 4.3.
diff -uprN arla-cvs/nnpfs/bsd/nnpfs/nnpfs_node.h arla-cvs-new/nnpfs/bsd/nnpfs/nnpfs_node.h
--- arla-cvs/nnpfs/bsd/nnpfs/nnpfs_node.h 2007-03-06 17:01:56.000000000 +0100
+++ arla-cvs-new/nnpfs/bsd/nnpfs/nnpfs_node.h 2008-10-30 20:11:43.000000000 +0100
@@ -113,7 +113,7 @@ typedef struct lock nnpfs_vnode_lock;
#else
-#if defined(__FreeBSD__) && __FreeBSD_version >= 600000
+#if (defined(__FreeBSD__) && __FreeBSD_version >= 600000 || defined(__OpenBSD__) && OpenBSD >= 200805)
#define nnpfs_vrecycle(vp, foo, bar) vrecycle(vp, bar)
#else
#define nnpfs_vrecycle(vp, foo, bar) vrecycle(vp, foo, bar)
diff -uprN arla-cvs/nnpfs/bsd/nnpfs/nnpfs_vfsops-bsd.h arla-cvs-new/nnpfs/bsd/nnpfs/nnpfs_vfsops-bsd.h
--- arla-cvs/nnpfs/bsd/nnpfs/nnpfs_vfsops-bsd.h 2008-02-26 22:59:18.000000000 +0100
+++ arla-cvs-new/nnpfs/bsd/nnpfs/nnpfs_vfsops-bsd.h 2008-10-30 20:13:19.000000000 +0100
@@ -79,7 +79,7 @@ int
nnpfs_root(struct mount *mp, struct vnode **vpp);
int
-#ifdef HAVE_VFS_QUOTACTL_CADDR
+#if (defined(HAVE_VFS_QUOTACTL_CADDR) || defined (__OpenBSD__) && OpenBSD >= 200805)
nnpfs_quotactl(struct mount *mp, int cmd, uid_t uid, caddr_t arg, d_thread_t *p);
#else
nnpfs_quotactl(struct mount *mp, int cmd, uid_t uid, void *arg, d_thread_t *p);
diff -uprN arla-cvs/nnpfs/bsd/nnpfs_blocks.c arla-cvs-new/nnpfs/bsd/nnpfs_blocks.c
--- arla-cvs/nnpfs/bsd/nnpfs_blocks.c 2008-02-27 23:16:21.000000000 +0100
+++ arla-cvs-new/nnpfs/bsd/nnpfs_blocks.c 2008-10-23 18:44:04.000000000 +0200
@@ -469,8 +469,8 @@ open_file(struct vnode *cachedir, char *
#ifdef __FreeBSD__
(void)vn_start_write(cachedir, &mp, V_WAIT); /* V_NOWAIT? */
-#endif
VOP_LEASE(cachedir, p, cred, LEASE_WRITE);
+#endif
error = VOP_CREATE(cachedir, vpp, &nd.ni_cnd, &vat);
#ifdef __FreeBSD__
diff -uprN arla-cvs/nnpfs/bsd/nnpfs_common-bsd.c arla-cvs-new/nnpfs/bsd/nnpfs_common-bsd.c
--- arla-cvs/nnpfs/bsd/nnpfs_common-bsd.c 2008-02-26 22:59:06.000000000 +0100
+++ arla-cvs-new/nnpfs/bsd/nnpfs_common-bsd.c 2008-11-01 15:14:25.000000000 +0100
@@ -58,7 +58,11 @@ nnpfs_alloc(u_int size, nnpfs_malloc_typ
NNPFSDEB(XDEBMEM, ("nnpfs_alloc: nnpfs_allocs - nnpfs_frees %d\n",
nnpfs_allocs - nnpfs_frees));
+#if (defined(__OpenBSD__) && OpenBSD >= 200811)
+ ret = malloc(size, type, M_WAITOK);
+#else
MALLOC(ret, void *, size, type, M_WAITOK);
+#endif
return ret;
}
@@ -66,7 +70,11 @@ void
nnpfs_free(void *ptr, u_int size, nnpfs_malloc_type type)
{
nnpfs_frees++;
+#if (defined(__OpenBSD__) && OpenBSD >= 200811)
+ free(ptr, type);
+#else
FREE(ptr, type);
+#endif
}
#endif /* NNPFS_DEBUG */
diff -uprN arla-cvs/nnpfs/bsd/nnpfs_vfsops-bsd.c arla-cvs-new/nnpfs/bsd/nnpfs_vfsops-bsd.c
--- arla-cvs/nnpfs/bsd/nnpfs_vfsops-bsd.c 2008-02-26 22:59:11.000000000 +0100
+++ arla-cvs-new/nnpfs/bsd/nnpfs_vfsops-bsd.c 2008-10-30 20:14:39.000000000 +0100
@@ -84,7 +84,7 @@ nnpfs_root(struct mount *mp, struct vnod
}
int
-#ifdef HAVE_VFS_QUOTACTL_CADDR
+#if (defined(HAVE_VFS_QUOTACTL_CADDR) || defined (__OpenBSD__) && OpenBSD >= 200805)
nnpfs_quotactl(struct mount *mp, int cmd, uid_t uid, caddr_t arg, d_thread_t *p)
#else
nnpfs_quotactl(struct mount *mp, int cmd, uid_t uid, void *arg, d_thread_t *p)
diff -uprN arla-cvs/nnpfs/bsd/nnpfs_vfsops-openbsd.c arla-cvs-new/nnpfs/bsd/nnpfs_vfsops-openbsd.c
--- arla-cvs/nnpfs/bsd/nnpfs_vfsops-openbsd.c 2005-10-28 16:33:39.000000000 +0200
+++ arla-cvs-new/nnpfs/bsd/nnpfs_vfsops-openbsd.c 2008-11-01 15:10:44.000000000 +0100
@@ -112,7 +112,9 @@ static struct vfsconf nnpfs_vfc = {
0,
0,
0,
+#if (OpenBSD < 200811)
NULL,
+#endif
NULL
};
diff -uprN arla-cvs/nnpfs/bsd/nnpfs_vnodeops-bsd.c arla-cvs-new/nnpfs/bsd/nnpfs_vnodeops-bsd.c
--- arla-cvs/nnpfs/bsd/nnpfs_vnodeops-bsd.c 2008-02-27 23:14:34.000000000 +0100
+++ arla-cvs-new/nnpfs/bsd/nnpfs_vnodeops-bsd.c 2008-11-01 15:16:57.000000000 +0100
@@ -596,8 +596,12 @@ nnpfs_readdir(struct vop_readdir_args *
ncookies++;
}
+#if (defined(__OpenBSD__) && OpenBSD >= 200811)
+ cookies = malloc(ncookies * sizeof(nnpfs_cookie_t), M_TEMP, M_WAITOK);
+#else
MALLOC(cookies, nnpfs_cookie_t *, ncookies * sizeof(nnpfs_cookie_t),
M_TEMP, M_WAITOK);
+#endif
for (dp = dp_start, cookiep = cookies;
dp < dp_end;
dp = (const struct dirent *)((const char *) dp + dp->d_reclen)) {
@@ -902,8 +906,12 @@ nnpfs_lock(struct vop_lock_args * ap)
ret = lockmgr(l, flags, &vp->v_interlock, NNPFS_AP_PROC(ap));
#endif
#else
+#if (defined(__OpenBSD__) && OpenBSD >= 200805)
+ ret = lockmgr(l, flags, NULL);
+#else
ret = lockmgr(l, flags, &vp->v_interlock);
#endif
+#endif
#else
ret = debuglockmgr(l, flags, &vp->v_interlock, NNPFS_AP_PROC(ap),
"nnpfs_lock", ap->a_vp->filename, ap->a_vp->line);
@@ -948,8 +956,12 @@ nnpfs_unlock(struct vop_unlock_args * ap
ret = lockmgr (l, flags | LK_RELEASE, &vp->v_interlock, NNPFS_AP_PROC(ap));
#endif
#else
+#if (defined(__OpenBSD__) && OpenBSD >= 200805)
+ ret = lockmgr (l, flags | LK_RELEASE, NULL);
+#else
ret = lockmgr (l, flags | LK_RELEASE, &vp->v_interlock);
#endif
+#endif
#else
ret = debuglockmgr (l, flags | LK_RELEASE, &vp->v_interlock, NNPFS_AP_PROC(ap),
"nnpfs_lock", ap->a_vp->filename, ap->a_vp->line);
diff -uprN arla-cvs/nnpfs/bsd/nnpfs_vnodeops-common.c arla-cvs-new/nnpfs/bsd/nnpfs_vnodeops-common.c
--- arla-cvs/nnpfs/bsd/nnpfs_vnodeops-common.c 2008-02-26 22:59:13.000000000 +0100
+++ arla-cvs-new/nnpfs/bsd/nnpfs_vnodeops-common.c 2008-10-23 19:54:31.000000000 +0200
@@ -1440,9 +1440,7 @@ nnpfs_readlink_common(struct vnode *vp,
int error = 0;
nnpfs_cred cred;
struct nnpfs *nnpfsp = NNPFS_FROM_VNODE(vp);
-#ifdef HAVE_THREE_ARGUMENT_VOP_UNLOCK
d_thread_t *proc = nnpfs_vfs_context_proc(ctx);
-#endif
NNPFSDEB(XDEBVNOPS, ("nnpfs_readlink\n"));
_______________________________________________
Arla-drinkers mailing list
Arla-drinkers@stacken.kth.se
https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers