Polytropon <[EMAIL PROTECTED]> wrote:

> ... It will force me to
> do what I originally intended to do: Iterate from 2 up
> to the maximal number and then check the availability,
> and, if given, "trace back" the ".. chain" to an existing
> directory entry point - or re-create one, if it is missing,
> too. Will be a lot of work, but I think I can learn much
> from this.

You may be able to reuse some code from dump(8).

When doing an incremental dump, it reads through the inodes, makes
a list of those which are newer than the previous dump, then
recursively locates all parent directories of selected inodes and
adds them to the list.  (When doing a level 0 dump, it does the same
thing but by definition every inode is selected.)  Having done all
that, it dumps all the selected directories followed by the rest of
the selected inodes.

Dump's purpose is to ensure that the dump will be complete in the
sense of containing the full path to any file that is on the tape,
and your purpose is different, but I suspect much of the "find
parent" logic may be reusable.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to