[4491] in arla-drinkers
PATCH: Arla 0.90 on OpenBSD 4.4 (and 4.3)
daemon@ATHENA.MIT.EDU (=?ISO-8859-1?Q?Bo_Brant=E9n?=)
Sat Nov 1 08:47:33 2008
From arla-drinkers-bounces@stacken.kth.se Sat Nov 01 12:47:33 2008
Return-Path: <arla-drinkers-bounces@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 7151 invoked from network); 1 Nov 2008 12:47:32 -0000
Received: from mx3.kth.se (130.237.48.97)
by charon.mit.edu with SMTP; 1 Nov 2008 12:47:32 -0000
Received: from localhost (localhost [127.0.0.1])
by mx3.kth.se (Postfix) with ESMTP id 57A0769720;
Sat, 1 Nov 2008 13:47:31 +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 Vxoh2QeC+Rt4; Sat, 1 Nov 2008 13:47:26 +0100 (CET)
Received: from tapas.stacken.kth.se (tapas.stacken.kth.se [130.237.234.140])
by mx3.kth.se (Postfix) with ESMTP id 2E7C46813F;
Sat, 1 Nov 2008 13:47:11 +0100 (CET)
Received: from tapas.stacken.kth.se (localhost [127.0.0.1])
by tapas.stacken.kth.se (Postfix) with ESMTP id E80FD51DEA;
Sat, 1 Nov 2008 13:47:10 +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 7CF8C51DEA
for <arla-drinkers@tapas.stacken.kth.se>;
Sat, 1 Nov 2008 13:47:08 +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 mA1Cl7vG023116
for <arla-drinkers@stacken.kth.se>; Sat, 1 Nov 2008 13:47:08 +0100 (MET)
Received: from localhost (localhost [127.0.0.1])
by mx3.kth.se (Postfix) with ESMTP id C57E16813F
for <arla-drinkers@stacken.kth.se>;
Sat, 1 Nov 2008 13:47:02 +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 7x7Y8JRZvewG for <arla-drinkers@stacken.kth.se>;
Sat, 1 Nov 2008 13:46:58 +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 0C60A68134
for <arla-drinkers@stacken.kth.se>;
Sat, 1 Nov 2008 13:46:55 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
by amavisd-new (Postfix) with ESMTP id A3BD44B8
for <arla-drinkers@stacken.kth.se>;
Sat, 1 Nov 2008 13:46:51 +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 151224B6
for <arla-drinkers@stacken.kth.se>;
Sat, 1 Nov 2008 13:46:47 +0100 (MET)
Received: by stalin.acc.umu.se (Postfix, from userid 10005)
id E9B7C2C; Sat, 1 Nov 2008 13:46:46 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
by stalin.acc.umu.se (Postfix) with ESMTP id D9A202B
for <arla-drinkers@stacken.kth.se>;
Sat, 1 Nov 2008 13:46:46 +0100 (CET)
Date: Sat, 1 Nov 2008 13:46:46 +0100 (CET)
From: =?ISO-8859-1?Q?Bo_Brant=E9n?= <bosse@acc.umu.se>
To: arla-drinkers@stacken.kth.se
Subject: PATCH: Arla 0.90 on OpenBSD 4.4 (and 4.3)
Message-ID: <Pine.A41.4.64.0811011343240.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 0.90 on OpenBSD 4.4 and 4.3.
diff -uprN arla-0.90/nnpfs/bsd/nnpfs/nnpfs_node.h arla-0.90-new/nnpfs/bsd/nnpfs/nnpfs_node.h
--- arla-0.90/nnpfs/bsd/nnpfs/nnpfs_node.h 2006-10-24 18:33:19.000000000 +0200
+++ arla-0.90-new/nnpfs/bsd/nnpfs/nnpfs_node.h 2008-10-22 22:53:28.000000000 +0200
@@ -114,7 +114,7 @@ typedef struct lock nnpfs_vnode_lock;
#else
#define nnpfs_vrele(vp) vrele(vp)
-#define nnpfs_vrecycle(vp, foo, bar) vrecycle(vp, foo, bar)
+#define nnpfs_vrecycle(vp, foo, bar) vrecycle(vp, bar)
#define nnpfs_vput(vp) vput(vp)
#define nnpfs_vref(vp) VREF(vp)
#define nnpfs_vletgo(vn) nnpfs_vrele(vn)
diff -uprN arla-0.90/nnpfs/bsd/nnpfs_common-bsd.c arla-0.90-new/nnpfs/bsd/nnpfs_common-bsd.c
--- arla-0.90/nnpfs/bsd/nnpfs_common-bsd.c 2006-10-24 18:33:02.000000000 +0200
+++ arla-0.90-new/nnpfs/bsd/nnpfs_common-bsd.c 2008-11-01 14:59:33.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-0.90/nnpfs/bsd/nnpfs_dev-openbsd.c arla-0.90-new/nnpfs/bsd/nnpfs_dev-openbsd.c
--- arla-0.90/nnpfs/bsd/nnpfs_dev-openbsd.c 2005-11-22 19:20:10.000000000 +0100
+++ arla-0.90-new/nnpfs/bsd/nnpfs_dev-openbsd.c 2008-10-24 17:43:40.000000000 +0200
@@ -54,6 +54,19 @@ nnpfs_dev_unlock(struct nnpfs *chan)
}
int
+nnpfs_dev_msleep(struct nnpfs *chan, caddr_t waitobj, int flags, const char *msg)
+{
+ int ret;
+ NNPFSDEB(XDEBDEV, ("nnpfs_dev_msleep %p %x %s\n", waitobj, flags, msg));
+
+ simple_unlock(&chan->dev_lock);
+ ret = nnpfs_tsleep(waitobj, flags, msg);
+ simple_lock(&chan->dev_lock);
+
+ return ret;
+}
+
+int
nnpfs_dev_initlock(struct nnpfs *chan)
{
simple_lock_init(&chan->dev_lock);
diff -uprN arla-0.90/nnpfs/bsd/nnpfs_vfsops-openbsd.c arla-0.90-new/nnpfs/bsd/nnpfs_vfsops-openbsd.c
--- arla-0.90/nnpfs/bsd/nnpfs_vfsops-openbsd.c 2005-10-28 16:33:39.000000000 +0200
+++ arla-0.90-new/nnpfs/bsd/nnpfs_vfsops-openbsd.c 2008-11-01 15:02:14.000000000 +0100
@@ -112,7 +112,9 @@ static struct vfsconf nnpfs_vfc = {
0,
0,
0,
+#if (OpenBSD < 200811)
NULL,
+#endif
NULL
};
diff -uprN arla-0.90/nnpfs/bsd/nnpfs_vnodeops-bsd.c arla-0.90-new/nnpfs/bsd/nnpfs_vnodeops-bsd.c
--- arla-0.90/nnpfs/bsd/nnpfs_vnodeops-bsd.c 2006-10-31 13:40:06.000000000 +0100
+++ arla-0.90-new/nnpfs/bsd/nnpfs_vnodeops-bsd.c 2008-11-01 15:04:32.000000000 +0100
@@ -576,8 +576,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)) {
@@ -786,7 +790,7 @@ nnpfs_lock(struct vop_lock_args * ap)
ret = lockmgr(l, flags, &vp->v_interlock, NNPFS_AP_PROC(ap));
#endif
#else
- ret = lockmgr(l, flags, &vp->v_interlock);
+ ret = lockmgr(l, flags, NULL);
#endif
#else
ret = debuglockmgr(l, flags, &vp->v_interlock, NNPFS_AP_PROC(ap),
@@ -835,7 +839,7 @@ nnpfs_unlock(struct vop_unlock_args * ap
ret = lockmgr (l, flags | LK_RELEASE, &vp->v_interlock, NNPFS_AP_PROC(ap));
#endif
#else
- ret = lockmgr (l, flags | LK_RELEASE, &vp->v_interlock);
+ ret = lockmgr (l, flags | LK_RELEASE, NULL);
#endif
#else
ret = debuglockmgr (l, flags | LK_RELEASE, &vp->v_interlock, NNPFS_AP_PROC(ap),
_______________________________________________
Arla-drinkers mailing list
Arla-drinkers@stacken.kth.se
https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers