From owner-freebsd-hackers Sat Dec 4 12:49:46 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 6A21E14A2A for ; Sat, 4 Dec 1999 12:49:42 -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 PAA05671 for ; Sat, 4 Dec 1999 15:47:39 -0500 (EST) Reply-To: Randell Jesup To: freebsd-hackers@FreeBSD.ORG Subject: Re: Portable way to compare struct stat's? References: <3845712D.F4D51A70@softweyr.com> <5lwvqu7as2.fsf@foo.sics.se> From: Randell Jesup Date: 04 Dec 1999 15:49:59 -0500 In-Reply-To: Assar Westerlund's message of "04 Dec 1999 20:42:37 +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: >> we should start by creating an "fcompare()" routine, which you'd >> pass two file descriptors to and it would say if they're the same >> file. Initially that routine could just do two fstat()'s, and >> compare st_dev and st_ino. We could then expand it to do better >> comparisons for other file-systems. > >In solaris there's a vnode operation vop_cmp that does exactly that. >But it's not exported to userland in any way. Sounds like what we'd want to build it upon. If the FS doesn't support it, use st_dev/st_ino. The real problem is getting people to switch. -- 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