On Sat, Aug 23, 2003 at 07:54:45PM -0700, Tim Kientzle wrote: +> I'm working on some archiving programs and need to (for various +> reasons) keep track of a very large number of files so that I +> can revisit them at the end of the operation. For example, +> on extract, I need to set directory access times and permissions +> after the complete extract is finished, which requires me to +> record every created directory. (No, there is no way around +> this short of re-scanning the entire archive a second +> time, which is impractical at best.) +> +> Right now, I'm storing the full pathname of each such +> file, but that is taking up a lot of memory, so I'm looking +> for a more compact approach. It occurred to me that +> the device number/inode (as returned by stat(2)) is another +> way to uniquely identify a file. As it turns out, I need to +> stat() everything anyway, so collecting such identifiers is easy. +> But, I can't find any system calls that actually use this information. +> +> Question: Are there any system calls that allow you to +> access/modify a file based only on the device number/inode number?
Check getfh(2)/fhopen(2) syscall if you are root. -- Pawel Jakub Dawidek [EMAIL PROTECTED] UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net
pgp00000.pgp
Description: PGP signature