From owner-freebsd-hackers Tue Nov 16 12: 6: 0 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from kronos.alcnet.com (kronos.alcnet.com [63.69.28.22]) by hub.freebsd.org (Postfix) with ESMTP id C87CD14D2A for ; Tue, 16 Nov 1999 12:05:53 -0800 (PST) (envelope-from kbyanc@posi.net) X-Provider: ALC Communications, Inc. http://www.alcnet.com/ Received: from localhost (kbyanc@localhost) by kronos.alcnet.com (8.9.3/8.9.3/antispam) with ESMTP id PAA87182; Tue, 16 Nov 1999 15:05:45 -0500 (EST) Date: Tue, 16 Nov 1999 15:05:45 -0500 (EST) From: Kelly Yancey X-Sender: kbyanc@kronos.alcnet.com To: Wes Peters Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Portable way to compare struct stat's? In-Reply-To: <3830F80F.6456DC5@softweyr.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 15 Nov 1999, Wes Peters wrote: > Kelly Yancey wrote: > > > > Is there a portable method for determining if the contents of two struct > > stat's are identical? > > On a single system, if st_dev and st_ino are equal, you must be referring > to the same object. If not, I'd like to hear about it. > The problem is that I need to be able to determine if the file's metadata has changed, not necessarily if two paths refer to the same file. I would use the st_ctime field except that not all file systems implement it. Kelly -- Kelly Yancey - kbyanc@posi.net - Richmond, VA Director of Technical Services, ALC Communications http://www.alcnet.com/ Maintainer, BSD Driver Database http://www.posi.net/freebsd/drivers/ Coordinator, Team FreeBSD http://www.posi.net/freebsd/Team-FreeBSD/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message