From owner-freebsd-emulation Wed Dec 12 6: 0:18 2001 Delivered-To: freebsd-emulation@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 5066F37B419 for ; Wed, 12 Dec 2001 06:00:10 -0800 (PST) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id JAA26979; Wed, 12 Dec 2001 09:00:04 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.3/8.9.1) id fBCDxd223177; Wed, 12 Dec 2001 08:59:39 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15383.25291.595785.323779@grasshopper.cs.duke.edu> Date: Wed, 12 Dec 2001 08:59:39 -0500 (EST) To: Willem van Engen Cc: freebsd-emulation@freebsd.org Subject: Re: flexlm: works with linux_base-6, fails with linux_base-7 In-Reply-To: <20011212142154.2fcf4740.wvengen@stack.nl> References: <20011210115204.6ddde325.wvengen@stack.nl> <15382.5752.295875.987980@grasshopper.cs.duke.edu> <20011211184131.0425b1fd.wvengen@stack.nl> <15382.23861.710621.118157@grasshopper.cs.duke.edu> <20011212142154.2fcf4740.wvengen@stack.nl> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Willem van Engen writes: > > I don't see anything obvious either. Are you sure that the > > bsd_flock contains the same thing in the linux_base-6 case? > Acutally no, there is a difference. I got lost in printf %[l][l]x stuff. > > linux_base-7: > linux(2810): fcntl64(4, 00000006, *) > > fcntl_bsd(4, F_SETLK, flock) > > bsd.l_start = 0, lin.l_start = 0 > > bsd.l_len = bfbff15000000000, lin.l_len = bfbff15000000000 > > bsd.l_pid= 280cbc80, lin.l_pid = 280cbc80 > > bsd.l_type= 3, lin.l_type = 1 > > bsd.l_whence= 1, lin.l_whence = 1 > linux_base-6: > linux(2801): fcntl(4, 00000006, *) > > fcntl_bsd(4, F_SETLK, flock) > > bsd.l_start = 0, lin.l_start = 0 > > bsd.l_len = 0, lin.l_len = 0 > > bsd.l_pid= 0, lin.l_pid = 0 > > bsd.l_type= 3, lin.l_type = 1 > > bsd.l_whence= 1, lin.l_whence = 1 I think that linux ignores at least the pid field & replaces it with the pid of the current process. I haven't looked at the guts of their flock to see if they ignore len as well. I think if you zero those 2 fields in linux_to_bsd_flock64, you'll be fine. Hopefully, Marcel will have some idea of what the "right" thing to do here is. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message