From owner-freebsd-hackers Sat Dec 4 11:43:50 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from foo.sics.se (foo.sics.se [193.10.66.234]) by hub.freebsd.org (Postfix) with ESMTP id F268015062 for ; Sat, 4 Dec 1999 11:43:38 -0800 (PST) (envelope-from assar@foo.sics.se) Received: (from assar@localhost) by foo.sics.se (8.9.3/8.9.3) id UAA39818; Sat, 4 Dec 1999 20:42:37 +0100 (CET) (envelope-from assar) To: Garance A Drosihn Cc: Wes Peters , Randell Jesup , Robert Watson , freebsd-hackers@FreeBSD.ORG Subject: Re: Portable way to compare struct stat's? References: <3845712D.F4D51A70@softweyr.com> From: Assar Westerlund Date: 04 Dec 1999 20:42:37 +0100 In-Reply-To: Garance A Drosihn's message of "Thu, 2 Dec 1999 21:13:56 -0500" Message-ID: <5lwvqu7as2.fsf@foo.sics.se> Lines: 21 User-Agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Garance A Drosihn writes: > In the case of AFS, I think you'd want to expand the size of st_dev. > All files in an AFS volume are "one device", I would think. If the > "device" is gone (ie, the volume is not mounted), then all files in > that "device" (volume) will not be available. I'm confused. Did you mean `st_ino' there? I agree that you want to see the whole AFS space as a single device. > I don't know what would be best for other distributed file systems, > though. Maybe both variables would have to increase in size. Maybe > 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. /assar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message