From owner-freebsd-hackers Sat Dec 4 20:11:40 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.tvol.com (mail.wgate.com [38.219.83.4]) by hub.freebsd.org (Postfix) with ESMTP id 77FED153C7 for ; Sat, 4 Dec 1999 20:11:36 -0800 (PST) (envelope-from rjesup@wgate.com) Received: from jesup.eng.tvol.net (jesup.eng.tvol.net [10.32.2.26]) by mail.tvol.com (8.8.8/8.8.3) with ESMTP id XAA20346; Sat, 4 Dec 1999 23:10:35 -0500 (EST) Reply-To: Randell Jesup To: Assar Westerlund Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Portable way to compare struct stat's? References: <3845712D.F4D51A70@softweyr.com> <5lwvqu7as2.fsf@foo.sics.se> <5laenqz34x.fsf@foo.sics.se> From: Randell Jesup Date: 04 Dec 1999 23:12:54 -0500 In-Reply-To: Assar Westerlund's message of "05 Dec 1999 00:40:14 +0100" Message-ID: X-Mailer: Gnus v5.6.43/Emacs 20.4 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Assar Westerlund writes: >Randell Jesup writes: >> Sounds like what we'd want to build it upon. If the FS doesn't >> support it, use st_dev/st_ino. > >Actually, since it's in the kernel, the default implementation of the >vnode operation might be: > >int >vop_default_cmp (struct vnode *v1, struct vnode *v2) >{ > return v1 == v2; >} Sure, depending on what's in a vnode (I haven't looked). I was really thinking of the kernel; I don't know how much of the interior filesystem structure is exposed to the kernel; I was assuming that vnodes are something that's opaque (or mostly so) to the kernel, and are interpreted by the filesystem that created them. >Or did you mean a fallback in the library function for when the kernel >doesn't provide the fdcmp (or whatever) system call? That could be >something like: That's what I was thinking of, partially. It makes binaries more transportable, and source if we can get Linux/etc to add it to their libraries. >> The real problem is getting people to switch. > >You mean application programs? Sure, but the only thing we can do >about that is implementing support for it, right? Right; that's where to start. -- Randell Jesup, Worldgate Communications, ex-Scala, ex-Amiga OS team ('88-94) rjesup@wgate.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message