Date: 04 Dec 1999 15:49:59 -0500 From: Randell Jesup <rjesup@wgate.com> To: freebsd-hackers@FreeBSD.ORG Subject: Re: Portable way to compare struct stat's? Message-ID: <ybuk8muh1mw.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net> In-Reply-To: Assar Westerlund's message of "04 Dec 1999 20:42:37 %2B0100" References: <ybu4se3lomv.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net> <3845712D.F4D51A70@softweyr.com> <v04210100b46cd2f23ff6@[128.113.24.47]> <5lwvqu7as2.fsf@foo.sics.se>
next in thread | previous in thread | raw e-mail | index | archive | help
Assar Westerlund <assar@sics.se> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ybuk8muh1mw.fsf>